/* ================================
   Chrome隔离管理器后台管理系统样式
   按开发规则：深绿色主题，现代化美观UI
   ================================ */

/* 基础变量定义 */
:root {
    /* 按开发规则：深绿色主色系 */
    --primary-color: #0d4f3c;          /* 深绿色 */
    --secondary-color: #2d7a5f;        /* 中绿色 */  
    --accent-color: #52c41a;           /* 亮绿色/主题色 */
    --success-color: #52c41a;          /* 成功绿 */
    --warning-color: #fa8c16;          /* 标准橙/警告色 */
    --error-color: #f5222d;            /* 错误色 */
    
    /* 辅助颜色 */
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #bdc3c7;
    --border-color: #e8ecef;
    --shadow-light: 0 2px 8px rgba(13, 79, 60, 0.1);
    --shadow-medium: 0 4px 16px rgba(13, 79, 60, 0.15);
    --shadow-heavy: 0 8px 24px rgba(13, 79, 60, 0.2);
    
    /* 布局变量 */
    --header-height: 60px;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 顶部导航栏 */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
}

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

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

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.system-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.connection-status i {
    color: var(--success-color);
    font-size: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* 侧边栏导航 */
.admin-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--white);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    z-index: 999;
    overflow-y: auto;
}

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

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(13, 79, 60, 0.1), transparent);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.nav-item i {
    width: 18px;
    font-size: 16px;
}

/* 导航徽章 - 用于显示待处理数量 */
.nav-badge {
    background: linear-gradient(135deg, #f5222d, #ff4d4f);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(245, 34, 45, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(245, 34, 45, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(245, 34, 45, 0.5);
        transform: scale(1.05);
    }
}

/* 主内容区域 */
.admin-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* 按钮样式 */
.action-btn, .refresh-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.action-btn.primary:hover, .refresh-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.action-btn.secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.action-btn.warning:hover {
    background: #e07500;
}

/* 搜索框 */
.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--white);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 79, 60, 0.1);
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-muted);
}

.stat-change.positive {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.stat-change.negative {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}



/* 活动列表 */
.activity-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

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

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all-btn {
    padding: 6px 16px;
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

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

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--bg-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--white);
    background: var(--primary-color);
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 表格样式 */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead {
    background: var(--bg-color);
}

.admin-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: var(--bg-color);
}

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

/* 状态标签 */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

.status-badge.pending {
    background: rgba(250, 140, 22, 0.1);
    color: var(--warning-color);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 标签页 */
.filter-tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-color);
    padding: 4px;
    border-radius: var(--border-radius);
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: var(--shadow-light);
}



.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}



/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-content {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--white);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 79, 60, 0.1);
}

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

.filter-select {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: var(--shadow-medium);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(100%);
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification-icon {
    font-size: 18px;
    color: var(--primary-color);
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification.error .notification-icon {
    color: var(--error-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-close {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--text-primary);
}

/* 用户详情弹窗样式 */
.user-details {
    padding: 20px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.info-value {
    color: #333;
    text-align: right;
}

/* 状态徽章样式 */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 20px 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .search-box {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 700px;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .system-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }
    
    .system-title {
        font-size: 16px;
    }
    
    .header-info {
        display: none;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

/* 隐藏类 */
.hidden { display: none !important; }

/* 动画增强 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease;
} 

/* 性能优化样式 */
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden .loading-spinner {
    display: none;
}

/* 主内容区域显示控制 */
.admin-main {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.admin-main.loading {
    opacity: 0.5;
}

/* 快速加载状态 */
.quick-load {
    animation: fadeIn 0.2s ease-in;
}

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

/* 性能优化：减少重绘 */
.stat-card, .nav-item, .page {
    will-change: transform;
    backface-visibility: hidden;
}

/* 加载完成状态 */
.loading-complete .loading-overlay {
    display: none;
}

/* 错误状态样式 */
.error-state {
    background: rgba(245, 34, 45, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    color: var(--error-color);
}

.error-state .retry-btn {
    background: var(--error-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition);
}

.error-state .retry-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
} 

/* 配置数量样式 */
.config-count {
    display: inline-block;
    min-width: 30px;
    padding: 4px 8px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
}

.config-count.loading {
    background: var(--secondary-color);
    color: var(--text-color);
    animation: pulse 1.5s infinite;
}

.config-count:empty::before {
    content: '0';
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 表格列宽调整 */
.admin-table th:nth-child(5), /* 窗口配置列 */
.admin-table th:nth-child(6), /* 代理配置列 */
.admin-table td:nth-child(5),
.admin-table td:nth-child(6) {
    width: 100px;
    text-align: center;
}

.admin-table th:nth-child(1), /* 用户ID列 */
.admin-table td:nth-child(1) {
    width: 200px;
}

.admin-table th:nth-child(2), /* 用户名列 */
.admin-table td:nth-child(2) {
    width: 120px;
}

.admin-table th:nth-child(3), /* 邮箱列 */
.admin-table td:nth-child(3) {
    width: 180px;
}

.admin-table th:nth-child(4), /* 状态列 */
.admin-table td:nth-child(4) {
    width: 80px;
    text-align: center;
}

.admin-table th:nth-child(7), /* 最后登录列 */
.admin-table th:nth-child(8), /* 创建时间列 */
.admin-table td:nth-child(7),
.admin-table td:nth-child(8) {
    width: 140px;
}

.admin-table th:nth-child(9), /* 操作列 */
.admin-table td:nth-child(9) {
    width: 120px;
    text-align: center;
} 

/* ================================
   价格设定管理页面样式
   ================================ */

/* 充值档位统计卡片 */
.tier-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tier-stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tier-stat-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.tier-stat-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tier-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.tier-stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.tier-stat-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* 充值档位表格样式 */
.tier-table-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.tier-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tier-status.active {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.tier-status.inactive {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

.tier-qr-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-qr-code img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.tier-qr-code .no-qr {
    color: var(--text-muted);
    font-size: 12px;
}

/* 充值档位表单样式 */
.tier-form {
    display: grid;
    gap: 20px;
}

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

.tier-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tier-form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.tier-form-group input,
.tier-form-group select,
.tier-form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.tier-form-group input:focus,
.tier-form-group select:focus,
.tier-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.1);
}

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

/* 收款码上传样式 - 按开发规则：支持三种支付方式的三栏布局 */
.qr-codes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 12px;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-code-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(82, 196, 26, 0.1), rgba(24, 144, 255, 0.1));
    border-radius: var(--border-radius);
    text-align: center;
}

.qr-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 12px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(82, 196, 26, 0.05);
}

.qr-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(82, 196, 26, 0.1);
}

.qr-upload-icon {
    font-size: 28px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.qr-upload-text {
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 13px;
}

.qr-upload-hint {
    color: var(--text-muted);
    font-size: 11px;
}

.qr-preview {
    margin-top: 12px;
    text-align: center;
}

.qr-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式布局：小屏幕时改为单列 */
@media (max-width: 1200px) {
    .qr-codes-container {
        grid-template-columns: 1fr;
    }
}

/* 充值档位操作按钮 */
.tier-actions {
    display: flex;
    gap: 8px;
}

.tier-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tier-action-btn.edit {
    background: var(--accent-color);
    color: var(--white);
}

.tier-action-btn.edit:hover {
    background: var(--secondary-color);
}

.tier-action-btn.delete {
    background: var(--error-color);
    color: var(--white);
}

.tier-action-btn.delete:hover {
    background: #d32f2f;
}

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

.tier-action-btn.toggle:hover {
    background: #e65100;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .tier-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tier-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tier-actions {
        flex-direction: column;
        gap: 4px;
    }
}

/* 优惠设置样式 - 按开发规则：美观、清晰的优惠配置界面 */
.bonus-settings {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.bonus-settings label:first-child {
    color: #f39c12;
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 15px;
    display: block;
}

.bonus-settings label:first-child i {
    margin-right: 8px;
    font-size: 1.1em;
}

.bonus-hint {
    margin-top: 12px;
    padding: 12px 15px;
    background: white;
    border-left: 4px solid #52c41a;
    border-radius: 4px;
    font-size: 0.95em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bonus-hint i {
    font-size: 1.1em;
}

.bonus-hint strong {
    font-size: 1.15em;
    margin-left: 5px;
}

.bonus-settings select,
.bonus-settings input[type="number"] {
    background: white;
    border: 1.5px solid #d9d9d9;
    transition: all 0.3s ease;
}

.bonus-settings select:focus,
.bonus-settings input[type="number"]:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.1);
}

.bonus-settings input[type="number"]:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ================================
   用户反馈管理样式
   ================================ */

/* 反馈容器布局 */
.feedbacks-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

/* 左侧：用户反馈列表 */
.feedback-list {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
}

.feedback-list-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.feedback-list-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.feedback-items {
    flex: 1;
    overflow-y: auto;
}

.feedback-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.feedback-item:hover {
    background: #f8faf9;
    border-left: 3px solid var(--accent-color);
}

.feedback-item.active {
    background: #e8f5f1;
    border-left: 3px solid var(--accent-color);
}

.feedback-item.status-closed {
    opacity: 0.6;
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feedback-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.feedback-user i {
    color: var(--accent-color);
    margin-right: 6px;
}

.unread-badge {
    background: var(--error-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.feedback-item-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.feedback-item-time {
    font-size: 12px;
    color: var(--text-muted);
}

.feedback-item-time i {
    margin-right: 4px;
}

.empty-feedback {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* 右侧：聊天对话区域 */
.feedback-chat {
    background: white;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
}

.feedback-chat-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.feedback-user-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.feedback-user-info h3 i {
    margin-right: 8px;
}

.feedback-chat-actions {
    display: flex;
    gap: 8px;
}

.feedback-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8faf9;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

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

.chat-message.user {
    align-items: flex-end;
}

.chat-message.admin {
    align-items: flex-start;
}

.admin-label {
    font-size: 11px;
    color: var(--accent-color);
    margin-bottom: 4px;
    font-weight: 600;
}

.admin-label i {
    margin-right: 4px;
}

.chat-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.user .chat-message-content {
    background: linear-gradient(135deg, var(--accent-color) 0%, #73d13d 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.admin .chat-message-content {
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-text {
    line-height: 1.6;
    white-space: pre-wrap;
}

.msg-files {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.msg-image:hover {
    transform: scale(1.02);
}

.msg-video {
    max-width: 400px;
    border-radius: 8px;
}

.chat-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.empty-chat {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

/* 回复输入区域 */
.feedback-reply {
    border-top: 2px solid var(--border-color);
    padding: 16px 20px;
    background: white;
}

.reply-upload-preview {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f5f7fa;
    padding: 8px;
    text-align: center;
}

.video-preview i {
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.video-name {
    font-size: 10px;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.2;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.preview-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

.reply-input-area textarea {
    width: 100%;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.reply-input-area textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.1);
}

.reply-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.reply-upload-btn {
    font-size: 22px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reply-upload-btn:hover {
    background: #f5f7fa;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .feedbacks-container {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 968px) {
    .feedbacks-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .feedback-list {
        max-height: 300px;
    }
    
    .feedback-chat {
        min-height: 500px;
    }
}

 
/* ================================
   推广管理样式
   ================================ */

/* 用户归属标记 */
.referral-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #e8eaff 0%, #f3e7ff 100%);
    border: 1px solid #d3d6ff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.referral-badge:hover {
    background: linear-gradient(135deg, #dce0ff 0%, #e7d7ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.referral-badge i {
    font-size: 12px;
}

/* 用户表格中的推广列样式 */
#usersTable td:nth-child(4) {
    min-width: 120px;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .referral-badge {
        font-size: 12px;
        padding: 3px 8px;
    }
}
