/**
 * 礼品卡检测系统 - 主样式文件
 * 标准前端项目结构
 */

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: #6b7280;
}

.user-role.admin {
    color: #ef4444;
}

.balance {
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.balance-amount {
    color: #667eea;
}

.btn-logout {
    padding: 8px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #dc2626;
}

/* ==================== 主容器 ==================== */
.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 12px 24px;
}

/* ==================== Admin Tabs ==================== */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-tab {
    padding: 14px 28px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.admin-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.admin-tab:hover::before {
    opacity: 1;
}

.admin-tab:hover {
    color: #4f46e5;
    transform: translateY(-2px);
}

.admin-tab.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.admin-tab.active::before {
    opacity: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.page-description {
    font-size: 14px;
    color: #6b7280;
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 90px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #d1fae5;
    color: #065f46;
}

.stat-icon.red {
    background: #fee2e2;
    color: #991b1b;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-icon.gray {
    background: #f3f4f6;
    color: #6b7280;
}

/* ==================== 内容卡片 ==================== */
.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ==================== 卡片表格 ==================== */
.cards-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    table-layout: auto;
    /* Auto layout allows columns to shrink/expand based on content and visible columns */
}

.cards-table thead {
    background: #f9fafb;
}

.cards-table th {
    padding: 10px 8px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.cards-table td {
    padding: 10px 8px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    height: 44px;
    vertical-align: middle;
}

.cards-table tbody tr {
    transition: background 0.2s, box-shadow 0.2s;
}

.cards-table tbody tr:hover {
    background: #f5f9ff;
    box-shadow: 0 0 0 1px #93b4e8 inset;
}

/* 可复制单元格样式 */
.cards-table td.copyable {
    cursor: pointer;
    position: relative;
}

.cards-table td.copyable:hover {
    background: #eff6ff;
    color: #2563eb;
}

.cards-table td.copyable:active {
    background: #dbeafe;
}

/* 管理员表格可复制单元格样式 */
.admin-table td.copyable {
    cursor: pointer;
    position: relative;
}

.admin-table td.copyable:hover {
    background: #eff6ff;
    color: #2563eb;
}

.admin-table td.copyable:active {
    background: #dbeafe;
}

/* Column styling - No width restrictions for responsive behavior */
/* User table columns (14 total): Card Number, Expiry, CVV, BIN, Type, Brand, Country, Status, Check, Check Time, Bank, Card Info, Remark, Delete */
/* Columns auto-size based on content and available space */

/* Column 1: Card Number - prevent overflow */
.cards-table th:nth-child(1),
.cards-table td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column 2: Expiry Date - keep on one line */
.cards-table th:nth-child(2),
.cards-table td:nth-child(2) {
    white-space: nowrap;
}

/* Column 3: CVV - 保持和表格一致 */
.cards-table th:nth-child(3),
.cards-table td:nth-child(3) {
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Column 9: Check Button - center aligned */
.cards-table th:nth-child(9),
.cards-table td:nth-child(9) {
    text-align: center;
    padding: 6px 2px;
}

/* Column 10: Check Time - custom padding */
.cards-table th:nth-child(10),
.cards-table td:nth-child(10) {
    padding: 6px 4px;
}

/* Column 12: Card Info - left padding */
.cards-table th:nth-child(12),
.cards-table td:nth-child(12) {
    padding-left: 8px;
}

/* ==================== Admin Table Column Styling - Auto responsive ==================== */
/* Admin table columns (15 total): User, Card Number, Expiry, CVV, BIN, Type, Brand, Country, Status, Check, Check Time, Bank, Card Info, Remark, Check Log */
/* Columns auto-size based on content and available space */

/* Column 2: Card Number - prevent overflow, same as dashboard */
.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column 3: Expiry Date - keep on one line */
.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    white-space: nowrap;
}

/* Column 4: CVV - 保持和表格一致 */
.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Column 10: Check Button - center aligned */
.admin-table th:nth-child(10),
.admin-table td:nth-child(10) {
    text-align: center;
    padding: 6px 2px;
}

/* Column 11: Check Time - custom padding */
.admin-table th:nth-child(11),
.admin-table td:nth-child(11) {
    padding: 6px 4px;
}

/* Column 13: Card Info - left padding */
.admin-table th:nth-child(13),
.admin-table td:nth-child(13) {
    padding-left: 8px;
}

/* Admin表格响应式断点 */
/* 横向滚动容器 - 恢复可拉动查看功能 */
.scrollable-cell {
    max-width: 200px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    cursor: grab;
    display: inline-block;
    font-size: 12px;
    /* 隐藏滚动条但保留滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.scrollable-cell:active {
    cursor: grabbing;
}

/* 隐藏 WebKit 浏览器的滚动条 */
.scrollable-cell::-webkit-scrollbar {
    display: none;
}

/* 银行列 - 缩小宽度，可横向滚动 */
.cards-table td:nth-child(11) .scrollable-cell {
    max-width: 90px;
}

/* Admin面板银行列（第12列） */
.admin-table td:nth-child(12) .scrollable-cell {
    max-width: 90px;
}

/* 卡信息列（user_info）- 缩小宽度，可横向滚动 */
.cards-table td .scrollable-cell[title] {
    max-width: 125px;
}

/* Admin面板卡信息列（第13列） */
.admin-table td:nth-child(13) .scrollable-cell {
    max-width: 125px;
}

/* 备注列 - 输入框样式，固定宽度不抖动 */
.remark-input {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    height: 32px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    line-height: 1.4;
}

.remark-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 检测日志列 - 可横向滚动，和备注、银行列宽度一致 */
.admin-table td:nth-child(15) .scrollable-cell {
    max-width: 90px;
    font-size: 13px;
    color: #6b7280;
}

/* ==================== 状态标签 ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    text-transform: lowercase;
    line-height: 1.2;
    vertical-align: middle;
    height: 22px;
    box-sizing: border-box;
    min-width: 50px;
    text-align: center;
}

.status-badge.checking {
    background: #f0f4ff;
    color: #6366f1;
    border: 1px solid #c7d2fe;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
    padding: 5px 16px;
    height: 28px;
    border-radius: 14px;
    min-width: 50px;
}

.status-badge.pending {
    background: #f9fafb;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    font-size: 10.5px;
}

.status-badge.live {
    background: #10b981;
    color: #ffffff;
    font-weight: 600;
}

.status-badge.die {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.error {
    background: #f3f4f6;
    color: #6b7280;
}

/* ==================== 列显示控制 ==================== */
.column-visibility-control {
    position: relative;
    display: inline-block;
}

.column-visibility-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.column-visibility-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f8fafc;
}

.column-visibility-btn .arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.column-visibility-control.active .column-visibility-btn .arrow {
    transform: rotate(180deg);
}

.column-visibility-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

.column-visibility-control.active .column-visibility-menu {
    display: block;
}

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

.column-presets {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.preset-btn {
    flex: 1;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.preset-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.column-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0 12px;
}

.column-options {
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 13px;
    color: #1e293b;
}

.column-option:hover {
    background: #f1f5f9;
}

.column-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.column-option.disabled:hover {
    background: transparent;
}

.column-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6366f1;
}

.column-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.column-option span {
    user-select: none;
}

/* ==================== 卡号和CVV显示 ==================== */
.card-number {
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #1f2937;
}

code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #1f2937;
    background: transparent;
}

.preview-table .card-number {
    font-size: 13px;
}

.preview-table code {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ==================== 类型和品牌标签 ==================== */
.funding-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.brand-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
}


/* ==================== 检测按钮 ==================== */
.check-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #667eea;
    color: white;
}

.check-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
}

.check-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.check-btn.checking {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.check-btn.completed {
    background: #10b981;
    color: white;
    cursor: default;
    animation: pulse-success 0.3s ease;
}

@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==================== 备注输入框 ==================== */
.remark-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
    color: #374151;
    background: white;
    transition: all 0.2s;
    outline: none;
}

.remark-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.remark-input:hover {
    border-color: #cbd5e1;
}

.remark-input::placeholder {
    color: #d1d5db;
    opacity: 0.6;
}

/* ==================== 操作区域 ==================== */
.action-bar {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

/* ==================== 筛选区域 ==================== */
.filter-section {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 新版筛选组：标题在上，输入框在下 */
.filter-group-v2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.filter-input {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: #667eea;
}

.filter-input.small {
    width: 120px;
}

.filter-input.medium {
    width: 180px;
}

/* 可展开的输入框 - 点击时放大 */
.filter-input.expandable {
    width: 100px;
    transition: width 0.3s ease;
}

.filter-input.expandable:focus,
.filter-input.expandable.has-value {
    width: 180px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    background: white;
    transition: border-color 0.2s;
    max-width: 100px;
    min-width: 100px;
}

.filter-select.small {
    max-width: 90px;
    min-width: 90px;
}

.filter-select:focus {
    border-color: #667eea;
}

/* Combo-box 组件 (可输入+下拉选择) */
.combo-box-wrapper {
    position: relative;
    display: inline-block;
}

.combo-box-input {
    padding: 6px 28px 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: white;
    width: 120px;
}

.combo-box-input:focus {
    border-color: #667eea;
}

.combo-box-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 12px;
}

.combo-box-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.combo-box-dropdown.show {
    display: block;
}

.combo-box-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.1s;
}

.combo-box-option:hover {
    background-color: #f3f4f6;
}

.combo-box-option.selected {
    background-color: #eef2ff;
    color: #667eea;
}

.combo-box-option.hidden {
    display: none;
}

/* 状态筛选按钮 */
.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.refresh-btn {
    padding: 6px 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #5568d3;
}

.btn-export-excel {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-export-excel:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-export-excel:active {
    transform: translateY(0);
}

.clear-filter-btn {
    padding: 6px 14px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.5;
    pointer-events: none;
}

.clear-filter-btn.active {
    opacity: 1;
    pointer-events: auto;
    background: #667eea;
    color: white;
    cursor: pointer;
}

.clear-filter-btn.active:hover {
    background: #5568d3;
}

/* ==================== 测卡按钮 ==================== */
.btn-add-card {
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 28px rgba(16, 185, 129, 0.85), 0 0 45px rgba(16, 185, 129, 0.5);
        transform: scale(1.04);
    }
}

/* 点击后停止动画 */
.btn-add-card.clicked {
    animation: none !important;
}

.btn-add-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

.btn-add-card.clicked::after {
    animation: none !important;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50%, 100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.btn-add-card:hover::before {
    width: 300px;
    height: 300px;
}

.btn-add-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
    animation: none;
}

.btn-add-card:active {
    transform: translateY(-1px) scale(1);
}

/* ==================== 输入模式区域 ==================== */
.input-mode-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

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

.input-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.input-mode-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.btn-close-input {
    padding: 6px 16px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-input:hover {
    background: #e2e8f0;
    color: #475569;
}

.input-mode-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

#cardInputArea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

#cardInputArea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-parse {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-parse:hover {
    background: #5568d3;
}

.btn-upload {
    padding: 6px 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.btn-upload:hover {
    background: #059669;
}

/* ==================== 预览区域 ==================== */
.preview-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.3s ease-out;
}

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

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 16px;
}

.preview-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.preview-stats {
    display: flex;
    gap: 16px;
}

.preview-stat {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.preview-stat.valid {
    background: #d1fae5;
    color: #065f46;
}

.preview-stat.expired {
    background: #fee2e2;
    color: #991b1b;
}

.preview-table-container {
    flex: 1;
    overflow-y: auto;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    min-height: 400px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-weight: 500;
    table-layout: fixed;
}

/* 预览表格列宽设置 */
.preview-table th:nth-child(1),
.preview-table td:nth-child(1) { width: 170px; }

.preview-table th:nth-child(2),
.preview-table td:nth-child(2) { width: 120px; }

.preview-table th:nth-child(3),
.preview-table td:nth-child(3) { width: 80px; }

.preview-table th:nth-child(4),
.preview-table td:nth-child(4) { width: 250px; }

.preview-table th:nth-child(5),
.preview-table td:nth-child(5) { width: 100px; }

.preview-table th:nth-child(6),
.preview-table td:nth-child(6) { width: 100px; }

.preview-table thead {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}

.preview-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e5e7eb;
    font-size: 13px;
}

.preview-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

.preview-table td input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    transition: border-color 0.2s;
    line-height: 1.5;
}

.preview-table td input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.preview-table td textarea {
    width: 100%;
    padding: 4px 6px 8px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    resize: none;
    min-height: 32px;
    line-height: 1.5;
    transition: border-color 0.2s;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.preview-table td textarea::-webkit-scrollbar {
    height: 4px;
}

.preview-table td textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.preview-table td textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.preview-table td textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.preview-table td textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.preview-table tr.expired {
    background: #fef2f2;
    opacity: 0.6;
}

.parse-tips {
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.5;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-submit {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-submit:disabled,
.btn-reparse:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.btn-delete-card {
    padding: 4px 8px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-card:hover {
    background: #fecaca;
    border-color: #fca5a5;
}

.btn-reparse {
    flex: 1;
    padding: 8px 12px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-reparse:hover {
    background: #e2e8f0;
}

/* ==================== 加载动画 ==================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* iOS风格菊花加载动画 - 简洁圆环效果 */
.ios-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    position: relative;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #6366f1;
    border-right-color: rgba(99, 102, 241, 0.3);
    animation: ios-spin 0.8s linear infinite;
}

@keyframes ios-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    color: #6b7280;
}

/* ==================== 管理员标识 ==================== */
.admin-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* ==================== 登录页面样式 ==================== */
body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo p {
    color: #6b7280;
    font-size: 14px;
}

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

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

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input.error {
    border-color: #ef4444;
}

.captcha-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.captcha-input {
    flex: 1;
}

.captcha-image-wrapper {
    position: relative;
    width: 120px;
    height: 50px;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-image-wrapper:hover {
    border-color: #667eea;
}

.captcha-refresh {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.error-message.show {
    display: block;
}

.error-message.success {
    color: #10b981;
    font-weight: 600;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 24px;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.footer {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 13px;
}

.hidden {
    display: none;
}

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

.user-menu-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-menu-trigger:hover {
    background: #f3f4f6;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    display: none;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

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

.user-menu-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.user-menu-header .user-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.user-menu-header .user-role {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.user-menu-balance {
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-size: 13px;
    color: #6b7280;
}

.balance-value {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.user-menu-items {
    padding: 8px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
}

.user-menu-item:hover {
    background: #f3f4f6;
}

.user-menu-item.danger {
    color: #ef4444;
}

.user-menu-item.danger:hover {
    background: #fee2e2;
}

.user-menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* ==================== 模态框升级版 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 20px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #334155;
    transform: scale(1.05);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafbfc;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* USDT充值地址显示 */
.recharge-content {
    text-align: center;
}

.recharge-address {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #374151;
    border: 2px dashed #e5e7eb;
}

.recharge-qr {
    margin: 20px 0;
}

.recharge-qr img {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: block;
}

.recharge-tips {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-top: 16px;
    text-align: left;
}

.recharge-tips li {
    margin-bottom: 8px;
}

.copy-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.copy-btn:hover {
    background: #059669;
}

/* ==================== 全屏Loading遮罩 ==================== */
.fullscreen-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.fullscreen-loading.show {
    display: flex;
}

.fullscreen-loading-content {
    background: white;
    padding: 40px 60px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fullscreen-loading-spinner {
    width: 64px;
    height: 64px;
    border: 6px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.fullscreen-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.fullscreen-loading-subtext {
    font-size: 14px;
    color: #6b7280;
}

/* ==================== Badge Styles ==================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.badge-primary {
    background: #6366f1;
}

.badge-success {
    background: #10b981;
}

.badge-danger {
    background: #ef4444;
}

.badge-warning {
    background: #f59e0b;
}

.badge-info {
    background: #3b82f6;
}

.badge-secondary {
    background: #6b7280;
}

/* ==================== Data Table Styles ==================== */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1e293b;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== Button Small Styles ==================== */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ==================== Warning Button Style ==================== */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* ==================== 用户管理和代理管理专用样式 ==================== */

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-disabled {
    background: #fee2e2;
    color: #991b1b;
}

.status-checking {
    background: #fef3c7;
    color: #92400e;
}

.status-admin {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
}

/* IP类型样式 */
.ip-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ip-type-static {
    background: #e0f2fe;
    color: #0369a1;
}

.ip-type-dynamic {
    background: #fff7ed;
    color: #c2410c;
}

.status-user {
    background: #e0e7ff;
    color: #4338ca;
}

.status-unknown {
    background: #f3f4f6;
    color: #6b7280;
}

/* 表格操作按钮组 */
.data-table td .btn {
    margin-right: 8px;
}

.data-table td .btn:last-child {
    margin-right: 0;
}

/* 表格特殊列样式 */
.data-table .col-actions {
    min-width: 200px;
    white-space: nowrap;
}

.data-table .col-status {
    min-width: 100px;
}

.data-table .col-balance {
    font-weight: 600;
    color: #6366f1;
}

.data-table .col-proxy-url {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #475569;
}

/* 代理类型徽章 */
.proxy-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #64748b;
}

.proxy-type.socks5 {
    background: #dbeafe;
    color: #1e40af;
}

.proxy-type.http {
    background: #fce7f3;
    color: #9f1239;
}

.proxy-type.https {
    background: #dcfce7;
    color: #166534;
}

/* 响应时间显示 */
.response-time {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
}

.response-time.slow {
    color: #f59e0b;
}

.response-time.very-slow {
    color: #ef4444;
}

/* 表格内的文本省略 */
.text-ellipsis {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 表格hover效果增强 */
.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 空状态提示 */
.table-empty {
    padding: 60px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.table-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* 国家变量标识 */
.country-var-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* 表格头部筛选器 */
.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.table-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
}

.table-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-stat-value {
    font-weight: 600;
    color: #1e293b;
}

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

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

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.form-hint.info {
    color: #3b82f6;
}

.form-hint.warning {
    color: #f59e0b;
}

.form-hint.error {
    color: #ef4444;
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* 按钮组样式升级 */
.btn-group {
    display: flex;
    gap: 12px;
}

.btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    border-radius: 6px;
    font-weight: 500;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-success:disabled,
.btn-danger:disabled,
.btn-info:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* ==================== 广告样式 ==================== */

/* 登录页侧边栏广告 */
.ad-sidebar {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 50;
}

.ad-sidebar-content {
    width: 100%;
    height: 100%;
}

.ad-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.ad-title {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    background: #f9fafb;
}

.ad-text-container {
    padding: 20px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.ad-text-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
}

.ad-text-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    padding: 16px;
}

.ad-text-content {
    animation: scrollText 15s linear infinite;
    line-height: 1.8;
    color: #374151;
    font-size: 14px;
}

@keyframes scrollText {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* 首页横幅广告 */
.ad-banner {
    width: 100%;
    height: 80px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

/* 登录页横幅广告特殊定位 */
.login-page .ad-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin-bottom: 0;
}

.ad-banner-content {
    width: 100%;
    height: 100%;
}

.ad-banner-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
}

.ad-banner-scroll {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ad-banner-rainbow-text {
    display: inline-block;
    white-space: nowrap;
    animation: scrollBanner 20s linear infinite;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg,
        #ff0000 0%,
        #ff7f00 14%,
        #ffff00 28%,
        #00ff00 42%,
        #0000ff 57%,
        #4b0082 71%,
        #9400d3 85%,
        #ff0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: scrollBanner 20s linear infinite, rainbowFlow 3s linear infinite;
}

@keyframes scrollBanner {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes rainbowFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 首页浮动侧边广告 */
.ad-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 300px;
    max-height: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
}

.ad-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.ad-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.ad-float-content {
    width: 100%;
    height: 100%;
}

.ad-float-image img {
    width: 100%;
    height: auto;
}

.ad-float-title {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    background: #f9fafb;
}

.ad-float-text {
    padding: 16px;
    height: 250px;
    display: flex;
    flex-direction: column;
}

.ad-float-text-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    text-align: center;
}

.ad-float-text-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-radius: 8px;
    padding: 12px;
}

.ad-float-text-content {
    animation: scrollText 12s linear infinite;
    line-height: 1.6;
    color: #374151;
    font-size: 13px;
}

/* ==================== 余额不足警告动画 ==================== */
@keyframes pulsateWarning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        transform: scale(1.05);
    }
}

#rechargeBtn.warning {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    animation: pulsateWarning 2s ease-in-out infinite;
}

#rechargeBtn.warning:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: scale(1.08) !important;
}

/* ==================== Toast 提示组件 ==================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 500px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #3b82f6;
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    white-space: pre-line;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.toast-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* ==================== 访问日志样式 ==================== */

/* 请求方法标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-get {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.method-post {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.method-put {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.method-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.method-patch {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.method-other {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

/* 状态码样式扩展 */
.status-badge.status-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* 用户状态样式 */
.status-badge.status-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* ==================== 分页样式 ==================== */
.pagination-container {
    margin-top: 24px;
    padding: 20px 0;
}

.pagination {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    background: #f5f7ff;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    background: #f9fafb;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-ellipsis {
    color: #9ca3af;
    font-weight: 600;
    padding: 0 8px;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-buttons {
        gap: 6px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }

    .pagination-info {
        font-size: 13px;
    }
}

/* ==================== 悬浮翻页按钮 ==================== */
.pagination-float-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 999;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
}

.pagination-float-btn:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pagination-float-btn:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
}

.pagination-float-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-float-btn.prev {
    left: 20px;
}

.pagination-float-btn.next {
    right: 20px;
}

/* 显示悬浮按钮 */
.pagination-float-btn.show {
    display: flex;
}

/* 响应式 - 移动端调整位置 */
@media (max-width: 768px) {
    .pagination-float-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .pagination-float-btn.prev {
        left: 10px;
    }

    .pagination-float-btn.next {
        right: 10px;
    }
}

/* ==================== 批量操作下拉菜单 ==================== */
.btn-batch-action {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-batch-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.batch-actions-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.batch-actions-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
}

.batch-actions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.batch-actions-btn .arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.batch-actions-dropdown.active .arrow {
    transform: rotate(180deg);
}

.batch-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
    z-index: 1000;
}

.batch-actions-dropdown.active .batch-actions-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.batch-actions-menu-item {
    padding: 12px 20px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.batch-actions-menu-item:hover {
    background: #f3f4f6;
}

.batch-actions-menu-item.danger {
    color: #ef4444;
}

.batch-actions-menu-item.danger:hover {
    background: #fef2f2;
}

.batch-actions-menu-item.warning {
    color: #f59e0b;
}

.batch-actions-menu-item.warning:hover {
    background: #fffbeb;
}

/* ==================== Dashboard 移动端适配 (仅对 max-width: 768px 生效) ==================== */
@media (max-width: 768px) {
    /* 0. 防止页面横向滚动 */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    body {
        position: relative;
    }

    /* 所有容器不允许横向溢出 */
    * {
        max-width: 100%;
    }

    /* 1. 导航栏适配 - 横向滚动版 */
    .navbar {
        padding: 0 12px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        z-index: 100;
    }

    .navbar::-webkit-scrollbar {
        display: none;
    }

    .navbar-content {
        min-height: 56px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        padding: 8px 0;
        align-items: center;
        min-width: max-content;
    }

    .navbar-brand {
        display: none !important; /* 手机端隐藏品牌标识 */
    }

    .navbar-brand img {
        display: none !important;
    }

    /* 手机端隐藏导航栏按钮和余额显示 */
    .navbar-actions {
        display: none !important;
    }

    /* 显示用户详情但紧凑 */
    .user-menu {
        flex: 0 0 auto;
        order: 999;
        position: relative;
        z-index: 1001;
    }

    .user-menu-trigger {
        padding: 4px 8px;
        gap: 6px;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .user-details {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
    }

    .user-name {
        font-size: 11px;
        white-space: nowrap;
    }

    .user-package {
        font-size: 10px !important;
    }

    /* 显示导航按钮区域 */
    .navbar-user {
        display: flex !important;
        flex-direction: row;
        gap: 6px;
        align-items: center;
        flex-wrap: nowrap;
        flex: 0 0 auto;
    }

    /* 余额显示 - 紧凑 */
    .navbar-user > div:has(#headerBalanceAmount) {
        display: flex !important;
        padding: 6px 10px;
        background: rgba(16, 185, 129, 0.1);
        border-radius: 6px;
        border: 1px solid rgba(16, 185, 129, 0.2);
        white-space: nowrap;
        font-size: 11px !important;
        gap: 6px;
    }

    .navbar-user > div:has(#headerBalanceAmount) > div {
        font-size: 11px !important;
        font-weight: 600;
    }

    /* 强制"可测卡片"文字大小 */
    .navbar-user > div:has(#headerBalanceAmount) > div:first-child,
    .navbar-user > div:has(#headerBalanceAmount) > div:first-child * {
        font-size: 11px !important;
    }

    .navbar-user > div:has(#headerBalanceAmount) > div > span {
        font-size: 11px !important;
    }

    #headerBalanceAmount {
        font-weight: 700 !important;
        font-size: 11px !important;
    }

    /* 确保整个余额显示区域的所有文字都是11px */
    .navbar-user > div:has(#headerBalanceAmount),
    .navbar-user > div:has(#headerBalanceAmount) * {
        font-size: 11px !important;
    }

    /* 所有导航按钮统一大小 */
    #apiDocsNavBtn,
    #adminPanelNavBtn,
    #rechargeBtn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    /* 2. 主容器适配 - 仅调整padding */
    .container {
        padding: 12px;
    }

    /* 3. Tab 导航适配 */
    .admin-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-top: 12px;
        margin-bottom: 12px;
        padding: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-tab {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        transform: none !important;
    }

    .admin-tab:hover {
        transform: none !important;
    }

    .admin-tab.active {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    }

    /* 4. 内容卡片适配 - 极度紧凑间距 */
    .content-card {
        padding: 6px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .card-title {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        font-size: 12px;
        margin-bottom: 8px;
    }

    /* card-title 标题文字行 */
    .card-title > span {
        font-weight: 600;
        margin-bottom: 0;
        font-size: 12px;
        order: 0;
        width: 100%;
    }

    /* 第一行：包含标题和导出Excel按钮的容器 */
    .card-title > div:first-of-type:has(.btn-export-excel) {
        display: flex !important;
        flex-direction: column !important;
        gap: 0px !important; /* 去除gap，避免影响按钮大小 */
        width: 100% !important;
        order: -1 !important;
    }

    /* 让标题和按钮分开显示 */
    .card-title > div:has(.btn-export-excel) > span {
        width: 100%;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 6px;
        display: block;
    }

    /* 导出Excel按钮 - 与刷新按钮样式完全一致 */
    .btn-export-excel {
        width: 100% !important;
        display: block !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        margin-top: 12px !important;
        text-align: center !important;
        line-height: normal !important;
    }

    /* 列显示按钮 - 第二行 */
    .column-visibility-control {
        width: 100%;
        order: 10;
    }

    .column-visibility-btn {
        padding: 7px 6px !important;
        font-size: 11px !important;
        justify-content: center;
        width: 100%;
    }

    /* 筛选按钮容器（包含活卡、死卡等按钮） - 第三行，3列网格 */
    .card-title > div:has(.filter-buttons) {
        width: 100%;
        order: 20;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    /* 筛选按钮组 - 自适应网格布局 */
    .filter-buttons {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    .filter-btn {
        font-size: 12px !important;
        padding: 8px 6px !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* 隐藏的筛选按钮不占空间 */
    .filter-btn[style*="display: none"] {
        display: none !important;
    }

    /* 刷新按钮（如果在筛选按钮同一个div） */
    .card-title > div:has(.filter-buttons) .refresh-btn {
        width: 100%;
        padding: 7px 6px !important;
        font-size: 11px !important;
        white-space: nowrap;
        min-width: 0 !important;
        margin-top: 0;
    }

    /* 5. 筛选区域适配 - 横向并排 */
    .filter-section {
        padding: 8px;
    }

    .filter-row {
        flex-direction: row;
        gap: 6px;
        align-items: center;
        flex-wrap: wrap;
    }

    .filter-group {
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }

    .filter-group-v2 {
        flex: 1 1 auto;
        min-width: 0;
    }

    .filter-label {
        font-size: 11px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* 筛选输入框 - 紧凑 */
    .filter-input {
        flex: 1 1 auto;
        min-width: 60px !important;
        width: auto !important;
        padding: 6px 8px !important;
        font-size: 12px !important;
    }

    /* 筛选下拉框 - 紧凑 */
    .filter-select {
        flex: 1 1 auto;
        min-width: 70px !important;
        width: auto !important;
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    .filter-input.small,
    .filter-input.medium,
    .filter-input.expandable {
        width: auto !important;
        flex: 1 1 auto;
        min-width: 60px !important;
    }

    /* 6. 按钮组适配 - 已在上面定义 */

    /* 7. 表格横向滚动适配 */
    .content-card {
        overflow-x: visible;
        max-width: 100%;
    }

    /* 表格容器 - 只有这里允许横向滚动 */
    #cardsContainer {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        width: fit-content; /* 容器宽度适应内容 */
    }

    .cards-table {
        width: auto !important; /* 改为 auto，不强制 100% 宽度 */
        min-width: 0 !important; /* 取消最小宽度限制 */
        font-size: 11px;
        table-layout: auto !important; /* 自动布局，列宽自适应内容 */
        display: table !important;
        border-collapse: collapse !important;
    }

    .cards-table th,
    .cards-table td {
        padding: 4px 5px !important; /* 增加padding提升可读性 */
        font-size: 11px; /* 从 9px 改为 11px */
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3;
        width: 1% !important; /* 强制所有列收缩到最小 */
    }

    .cards-table th {
        font-size: 10px; /* 从 8px 改为 10px */
        padding: 4px 5px !important;
        font-weight: 600;
    }

    /* 移动端精简模式优化 - 让所有列自动收紧 */
    /* 卡号列 */
    .cards-table th:nth-child(1),
    .cards-table td:nth-child(1) {
        width: 1% !important;
        max-width: none;
    }

    /* 有效期列 */
    .cards-table th:nth-child(2),
    .cards-table td:nth-child(2) {
        width: 1% !important;
    }

    /* CVV列 */
    .cards-table th:nth-child(3),
    .cards-table td:nth-child(3) {
        width: 1% !important;
        font-size: 10px !important; /* 从 8px 改为 10px */
    }

    /* 状态列 */
    .cards-table th:nth-child(8),
    .cards-table td:nth-child(8) {
        width: 1% !important;
    }

    /* 检测列 */
    .cards-table th:nth-child(9),
    .cards-table td:nth-child(9) {
        width: 1% !important;
        text-align: center;
    }

    /* 银行列（第11列）- 限制宽度，支持横向滚动 */
    .cards-table th:nth-child(11),
    .cards-table td:nth-child(11) {
        max-width: 120px !important;
        min-width: 80px !important;
    }

    .cards-table td:nth-child(11) .scrollable-cell {
        max-width: 120px !important;
        font-size: 10px !important;
        line-height: 1.3 !important;
    }

    /* 卡信息列（第12列）- 限制宽度，支持横向滚动 */
    .cards-table th:nth-child(12),
    .cards-table td:nth-child(12) {
        max-width: 150px !important;
        min-width: 100px !important;
    }

    .cards-table td:nth-child(12) .scrollable-cell {
        max-width: 150px !important;
        font-size: 10px !important;
        line-height: 1.3 !important;
    }

    /* scrollable-cell 在移动端的优化 */
    .scrollable-cell {
        cursor: grab !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 2px 0 !important;
    }

    .scrollable-cell:active {
        cursor: grabbing !important;
    }

    /* 隐藏的列：完全移除，不占空间 */
    .cards-table th.column-hidden,
    .cards-table td.column-hidden {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        border: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* 卡号字体 */
    .card-number {
        font-size: 11px; /* 从 9px 改为 11px */
        letter-spacing: -0.2px;
    }

    /* 状态徽章 */
    .status-badge {
        padding: 3px 6px;
        font-size: 10px;
        height: 20px;
        line-height: 1.2;
        border-radius: 6px;
        box-sizing: border-box;
    }

    /* 移动端转圈动画 */
    .ios-spinner {
        width: 14px;
        height: 14px;
    }

    /* 按钮 */
    .check-btn {
        padding: 4px 8px; /* 从 3px 6px 改为 4px 8px */
        font-size: 10px; /* 从 8px 改为 10px */
        border-radius: 4px;
    }

    /* 备注输入框 */
    .remark-input {
        padding: 3px 6px;
        font-size: 11px;
    }


    .column-visibility-menu {
        left: 0;
        right: 0;
        min-width: auto;
        width: 100%;
    }

    .column-presets {
        gap: 6px;
        padding: 10px;
    }

    .preset-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .column-options {
        padding: 6px;
        max-height: 300px;
    }

    .column-option {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* 9. 统计卡片适配 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        gap: 8px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    /* 10. 模态框适配 */
    .modal {
        max-width: 95%;
        margin: 10px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-title-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
    }

    /* 11. 输入模式区域适配 */
    .input-mode-section {
        padding: 16px;
    }

    .input-mode-header h2 {
        font-size: 16px;
    }

    #cardInputArea {
        min-height: 100px;
        font-size: 12px;
        padding: 12px;
    }

    /* 12. 预览区域适配 */
    .preview-table-container {
        min-height: 300px;
    }

    .preview-table {
        font-size: 12px;
    }

    .preview-table th,
    .preview-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .preview-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-reparse {
        width: 100%;
    }

    /* 13. Toast 提示适配 */
    .toast-container {
        left: 10px;
        right: 10px;
        top: 70px;
    }

    .toast {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
    }

    .toast-icon {
        font-size: 20px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }

    /* 14. 表单适配 */
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* 15. 操作区域（添加测卡按钮区）适配 */
    .action-bar {
        padding: 10px !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

    /* action-bar 内的按钮容器 */
    .action-bar > div {
        display: flex !important;
        gap: 6px !important;
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    /* 添加测卡按钮 - 加大尺寸 */
    .btn-add-card {
        padding: 10px 16px !important;
        font-size: 13px !important;
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        border-radius: 8px !important;
    }

    /* 一键测活按钮 - 加大尺寸 */
    .btn-check-all,
    .btn-batch-action {
        padding: 10px 16px !important;
        font-size: 13px !important;
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        border-radius: 8px !important;
    }

    /* 批量操作下拉菜单 */
    .batch-actions-dropdown {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .batch-actions-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
        width: 100% !important;
        border-radius: 8px !important;
    }

    /* 批量操作按钮组容器 */
    #batchActionsGroup {
        margin-left: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .batch-actions-menu {
        left: 0;
        right: 0;
        width: 100%;
    }

    /* 16. 分页适配 */
    .pagination {
        gap: 12px;
    }

    .pagination-info {
        font-size: 12px;
        text-align: center;
    }

    .pagination-buttons {
        gap: 4px;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    /* 17. 用户菜单下拉适配 */
    .user-menu-dropdown {
        min-width: 200px;
        max-width: 280px;
        right: 0;
        left: auto;
        margin-top: 8px;
        z-index: 9999 !important; /* 提高z-index确保在最上层 */
        position: fixed !important; /* 改为fixed定位 */
        top: 60px !important; /* 从顶部60px开始 */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    .user-menu-dropdown.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 18. 刷新按钮适配 - 手机端长条形 */
    .refresh-btn {
        width: 100% !important;
        display: block !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        margin-top: 12px !important;
    }

    /* 19. 页面标题适配 */
    .page-title {
        font-size: 20px;
    }

    .page-description {
        font-size: 13px;
    }

    /* 19. 广告适配 */
    .ad-float {
        width: 90%;
        max-width: 280px;
        right: 5%;
        bottom: 10px;
    }

    .ad-sidebar {
        display: none !important;
    }

    .ad-banner {
        height: 60px;
    }

    .ad-banner-rainbow-text {
        font-size: 18px;
    }

    /* 20. 删除确认按钮适配 */
    .delete-confirm-wrapper {
        gap: 3px;
    }

    .delete-confirm-btn,
    .delete-cancel-btn {
        padding: 2px 6px;
        font-size: 12px;
        min-width: 20px;
        height: 18px;
    }

    /* 21. 整理卡片页面适配 */
    #arrangeInputArea {
        height: 150px;
        font-size: 12px;
    }

    /* 22. 顶级BIN推荐页面适配 */
    #binSearchInput {
        width: 100% !important;
        font-size: 13px;
    }

    /* 23. 管理面板 Admin 页面移动端适配 */
    /* 管理面板表格容器 - 允许横向滚动 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        margin: 0 -10px;
        padding: 0 10px;
    }

    /* 管理面板数据表格 */
    .data-table {
        min-width: 100%;
        font-size: 10px;
        white-space: nowrap;
    }

    .data-table th,
    .data-table td {
        padding: 6px 4px;
        font-size: 10px;
    }

    .data-table th {
        font-size: 9px;
        font-weight: 600;
    }

    /* 卡片管理表格 - 移动端固定布局 */
    .admin-table {
        table-layout: fixed;
        width: 100%;
    }

    .admin-table th,
    .admin-table td {
        padding: 4px 2px;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    .admin-table th {
        font-size: 9px;
        font-weight: 600;
    }

    /* 移动端admin精简模式 - 主要列宽度 */
    .admin-table th:nth-child(1),
    .admin-table td:nth-child(1) {
        width: 12%; /* 用户 */
    }

    .admin-table th:nth-child(2),
    .admin-table td:nth-child(2) {
        width: 28%; /* 卡号 */
    }

    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        width: 16%; /* 有效期 */
    }

    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) {
        width: 14%; /* CVV */
        font-size: 9px !important;
    }

    .admin-table th:nth-child(9),
    .admin-table td:nth-child(9) {
        width: 15%; /* 状态 */
    }

    .admin-table th:nth-child(10),
    .admin-table td:nth-child(10) {
        width: 15%; /* 检测 */
        text-align: center;
    }

    /* 隐藏的列：完全移除，不占空间 */
    .admin-table th.column-hidden,
    .admin-table td.column-hidden {
        display: none !important;
        width: 0 !important;
        padding: 0 !important;
    }

    /* 用户管理表格 */
    #usersTableBody td {
        font-size: 10px;
    }

    /* 代理管理表格 */
    #proxiesTable td {
        font-size: 10px;
    }

    /* 充值统计卡片 */
    .content-card > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* 充值统计数据块 */
    .content-card > div[style*="display: flex"] > div {
        width: 100% !important;
        min-width: auto !important;
        flex: none !important;
    }

    /* 套餐统计网格 */
    div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* 广告管理、访问日志表格 */
    #adsTableBody td,
    #accessLogsTableBody td,
    #bannedIpsTableBody td {
        font-size: 10px;
    }

    /* ========== 管理后台 Admin 按钮布局（与用户面板保持一致）========== */

    /* 管理后台的按钮样式已经与用户面板统一，无需额外样式 */
    /* 一键测活按钮 - 单独一行，加大尺寸 */
    #batchCheckBtn,
    .btn-batch-action {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 13px !important;
        white-space: nowrap;
        border-radius: 8px !important;
    }

    /* 批量操作按钮组 */
    #batchActionsGroup {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 8px;
    }

    .batch-actions-dropdown {
        flex: 1;
    }

    .batch-actions-btn {
        width: 100%;
        font-size: 13px !important;
        padding: 10px 16px !important;
        border-radius: 8px !important;
    }

    /* 清空筛选按钮 */
    .clear-filter-btn {
        padding: 7px 10px !important;
        font-size: 11px !important;
        flex: 1 1 auto;
    }

    /* 管理面板按钮组 */
    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-warning,
    .btn-danger,
    .btn-info {
        padding: 8px 12px !important;
        font-size: 11px !important;
        white-space: nowrap;
    }

    /* 用户菜单适配（管理面板） */
    .user-menu-dropdown {
        right: 0;
        left: auto;
        max-width: 280px;
        min-width: 200px;
        z-index: 1002;
        position: absolute;
    }

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

    /* 确保用户头像和菜单触发器可点击 */
    .user-avatar {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* 返回用户面板按钮 */
    button[onclick*="dashboard"] {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    /* IP注册限制卡片 */
    .content-card div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Switch 开关适配 */
    .switch {
        width: 44px;
        height: 24px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

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

    /* 表格操作列按钮 */
    .col-actions {
        white-space: nowrap;
    }

    .col-actions button {
        padding: 4px 8px !important;
        font-size: 10px !important;
        margin: 1px;
    }

    /* 表格状态列 */
    .col-status span {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* 表格余额列 */
    .col-balance {
        white-space: nowrap;
        font-size: 10px;
    }

    /* 代理URL列 */
    .col-proxy-url {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 充值记录筛选区域 */
    .filter-section .filter-row {
        gap: 4px;
    }

    .filter-section .filter-group {
        min-width: 45%;
        flex: 1 1 45%;
    }

    /* 让筛选输入框在手机端更易用 */
    .filter-input[type="text"],
    .filter-input[type="date"],
    .filter-input[type="datetime-local"] {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* 充值统计概览卡片网格 */
    div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    /* 渠道管理统计卡片保持2列 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Combo box 下拉框适配 */
    .combo-box-wrapper {
        min-width: 80px;
    }

    .combo-box-input {
        font-size: 11px !important;
        padding: 6px 4px !important;
    }

    .combo-box-dropdown {
        max-height: 200px;
        font-size: 11px;
    }

    /* 模态框表单行适配 */
    .form-row-3 {
        grid-template-columns: 1fr !important;
    }

    /* 表单提示文本 */
    .form-hint {
        font-size: 11px;
    }

    /* 封禁IP模态框 */
    #banIpModal .form-group {
        margin-bottom: 12px;
    }

    /* 权重和并发数编辑模态框 */
    #weightModal .form-group,
    #concurrencyModal .form-group {
        margin-bottom: 12px;
    }

    /* 访问日志筛选时间输入 */
    #accessStartTime,
    #accessEndTime {
        width: 100%;
    }

    /* 日期时间选择器 */
    input[type="datetime-local"],
    input[type="date"] {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* 24. Pricing 页面移动端适配 */
    /* 充值中心页面整体字体缩小 */
    body {
        font-size: 100% !important;
    }

    .pricing-container {
        padding: 0;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .back-btn {
        font-size: 12px !important;
        padding: 8px 12px !important;
        justify-content: center;
    }

    .balance-display {
        padding: 10px 16px !important;
        justify-content: space-between;
    }

    .balance-label {
        font-size: 12px !important;
    }

    .balance-amount {
        font-size: 18px !important;
    }

    .alert-notice {
        padding: 12px 16px !important;
        margin-bottom: 16px !important;
    }

    .alert-title {
        font-size: 13px !important;
    }

    .alert-content {
        font-size: 12px !important;
    }

    /* 套餐卡片网格 */
    .packages-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .package-card {
        padding: 20px 16px !important;
    }

    .package-badge {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }

    .package-title {
        font-size: 20px !important;
        margin: 12px 0 8px !important;
    }

    .package-price {
        font-size: 32px !important;
        margin-bottom: 16px !important;
    }

    .package-features {
        margin-bottom: 16px !important;
    }

    .package-feature {
        font-size: 12px !important;
        padding: 8px 0 !important;
    }

    .package-buy-btn {
        font-size: 14px !important;
        padding: 12px 24px !important;
    }

    /* 充值记录表格 */
    .recharge-records {
        padding: 16px !important;
    }

    .records-title {
        font-size: 16px !important;
        margin-bottom: 16px !important;
    }

    .records-table {
        font-size: 11px !important;
    }

    .records-table th,
    .records-table td {
        padding: 8px 4px !important;
        font-size: 10px !important;
    }

    /* USDT支付模态框 */
    .modal-content {
        width: 95% !important;
        margin: 20px auto !important;
        padding: 20px 16px !important;
    }

    .modal-header h2 {
        font-size: 18px !important;
    }

    .payment-amount {
        font-size: 28px !important;
    }

    .qr-code {
        width: 200px !important;
        height: 200px !important;
    }

    .wallet-address {
        font-size: 11px !important;
        padding: 8px !important;
    }

    /* 25. Channel Management 页面移动端适配 */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .header {
        padding: 20px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 10px !important;
    }

    .header h1 {
        font-size: 1.5em !important;
    }

    .header p {
        font-size: 0.9em !important;
    }

    .back-button {
        padding: 8px 16px !important;
        font-size: 12px !important;
    }

    /* 统计卡片网格 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    .stat-card {
        padding: 16px !important;
        border-radius: 10px !important;
    }

    .stat-card .label {
        font-size: 0.75em !important;
        margin-bottom: 6px !important;
    }

    .stat-card .value {
        font-size: 1.8em !important;
    }

    /* 渠道卡片 */
    .channels-container {
        padding: 0 !important;
    }

    .channel-card {
        padding: 16px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    .channel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .channel-name {
        font-size: 16px !important;
    }

    .channel-status {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }

    .channel-info {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .info-item {
        font-size: 12px !important;
    }

    .info-label {
        font-size: 11px !important;
    }

    .info-value {
        font-size: 13px !important;
    }

    /* 渠道操作按钮 */
    .channel-actions {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .channel-actions button {
        font-size: 11px !important;
        padding: 6px 12px !important;
        flex: 1 1 45% !important;
        min-width: 0 !important;
    }

    /* 账号列表 */
    .accounts-list {
        padding: 12px !important;
    }

    .account-item {
        padding: 10px !important;
        margin-bottom: 8px !important;
        font-size: 11px !important;
    }

    .account-id {
        font-size: 12px !important;
    }

    .account-status {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    .account-stats {
        font-size: 10px !important;
    }

    /* 模态框适配 */
    .modal {
        width: 95% !important;
        max-width: none !important;
        margin: 10px !important;
    }

    .modal-header h3 {
        font-size: 16px !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .form-group label {
        font-size: 12px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }

    .modal-footer button {
        font-size: 13px !important;
        padding: 10px 20px !important;
    }

    /* 表格适配 */
    .table-container,
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        margin: 0 -10px !important;
        padding: 0 10px !important;
    }

    table {
        display: table !important;
        width: 100% !important;
        min-width: 800px !important;
        font-size: 10px !important;
    }

    table th,
    table td {
        padding: 6px 4px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
    }

    /* 确保渠道管理表格可以滚动 */
    .channel-table {
        display: table !important;
        min-width: 800px !important;
    }

    /* 进度条 */
    .progress-bar {
        height: 6px !important;
    }

    /* 成功率指示器 */
    .success-rate {
        font-size: 14px !important;
    }
}

/* ==================== PC端自适应优化（非移动端） ==================== */
@media (min-width: 769px) and (max-width: 1600px) {
    /* Channel Management 页面 PC 端自适应 */
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .header {
        padding: 30px;
    }

    .header h1 {
        font-size: 2em;
    }

    /* 渠道表格自适应 */
    .channel-table {
        table-layout: auto;
        width: 100%;
    }

    .channel-table th,
    .channel-table td {
        padding: 12px 8px;
        font-size: 0.9em;
    }

    /* 账户池信息紧凑显示 */
    .account-pool {
        min-width: 150px;
    }

    .account-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .account-count {
        min-width: 40px;
    }

    .account-count-number {
        font-size: 1.3em;
    }

    /* 操作按钮组紧凑 */
    .channel-table .btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }

    /* 统计卡片自适应 */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .stat-card .value {
        font-size: 2em;
    }
}

/* 充值统计表格自适应（所有页面） */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.data-table {
    width: 100%;
    min-width: 900px;
    table-layout: auto;
}

@media (max-width: 1600px) {
    /* 充值记录表格容器 */
    .recharge-records {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .records-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 充值统计表格 */
    .records-table,
    table.recharge-table,
    #rechargesTable,
    .data-table {
        width: 100%;
        min-width: 900px;
        table-layout: auto;
    }

    .records-table th,
    .records-table td,
    table.recharge-table th,
    table.recharge-table td,
    #rechargesTable th,
    #rechargesTable td,
    .data-table th,
    .data-table td {
        white-space: nowrap;
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    /* 充值统计页面紧凑模式 */
    .content-card {
        padding: 16px;
    }

    .card-title {
        font-size: 16px;
    }

    /* 表格字体缩小 */
    .data-table,
    .records-table,
    #rechargesTable {
        font-size: 13px;
    }

    .data-table th,
    .data-table td,
    .records-table th,
    .records-table td,
    #rechargesTable th,
    #rechargesTable td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

/* ==================== PC 端专用优化 (大于 768px) ==================== */
@media (min-width: 769px) {
    /* 导航栏在 PC 端恢复标准高度 */
    .navbar-content {
        height: 76px !important;
        min-height: 76px !important;
    }

    .navbar-brand {
        font-size: 22px;
    }

    /* 用户头像稍大 */
    .user-avatar {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    /* Tab 导航在 PC 端增强视觉效果 */
    .admin-tabs {
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 18px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    }

    .admin-tab {
        padding: 14px 32px;
        font-size: 16px;
    }

    /* 为 Tab 添加微妙的分隔线效果 */
    .admin-tab:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 60%;
        background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
        opacity: 0.5;
    }

    .admin-tab.active:not(:last-child)::after {
        opacity: 0;
    }

    /* PC 端的hover效果更明显 */
    .admin-tab:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    }

    .admin-tab.active {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
    }
}
