/* ==========================================
 * 📊 全站核心最高高度管理端专属视觉控制表
 * ========================================== */
:root {
    --main-color: #cc0000;
    --main-hover: #b30000;
    --bg-color: #f7f7f7;
    --text-dark: #333333;
    --border-color: #eeeeee;
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: var(--bg-color); 
    color: var(--text-dark); 
    padding-bottom: 30px; 
    -webkit-font-smoothing: antialiased;
}
/* =========================================================================
 * 📱 移动端最高主权自适应重绘响应式引擎 (靶向靶向 768px 以下手机视口)
 * ========================================================================= */
@media screen and (max-width: 768px) {
    /* 1. 容器降维：由横向 Flex 变更为纵向垂直单列，强行贴靠屏幕 */
    .admin-container {
        flex-direction: column !important;
        padding: 0 10px !important;
        margin: 10px 0 !important;
        gap: 15px !important;
    }

    /* 2. 侧边栏菜单：宽度撑满，变为顶部横向导航或垂直扁平块 */
    .sidebar-menu {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important; /* 允许菜单按钮多行自动折行 */
        border-radius: 6px !important;
    }
    .menu-btn {
        width: auto !important;
        flex: 1 1 calc(33.33% - 8px); /* 手机端每行自动并排3个菜单按钮 */
        text-align: center !important;
        padding: 10px 5px !important;
        font-size: 13px !important;
        border-left: none !important;
        border-bottom: 3px solid transparent; /* 激活条由左侧改到下划线 */
    }
    .menu-btn.active {
        border-bottom-color: var(--main-color) !important;
    }

    /* 3. 主内容面板：宽度撑满，剔除挤压变形 */
    .main-content {
        width: 100% !important;
        padding: 15px 10px !important;
        box-sizing: border-box !important;
        min-height: auto !important;
    }

    /* 4. 营收大看板卡片：手机端改为2列并排或全撑满 */
    .stats-grid {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .stat-card {
        flex: 1 1 calc(50% - 5px) !important; /* 2列并排 */
        padding: 10px !important;
    }
    .stat-card h3 {
        font-size: 18px !important;
    }

    /* 5. 核心：大表头表格防溢出处理，开启手机端横向顺畅拨动查看 */
    .table-wrapper {
        width: 100% !important;
        overflow-x: auto !important; /* 激活手机端单手滑动表格查看 */
        -webkit-overflow-scrolling: touch !important; /* 刚性顺滑滚动 */
        border: 1px solid #eee !important;
        border-radius: 4px !important;
    }
    table {
        min-width: 750px !important; /* 强制表格在手机保持大宽度，保证不挤压堆叠，靠滑动查阅 */
    }

    /* 6. 强行松绑会员管理最后一列（安全操作列）在手机端的样式限制 */
    #pane-users table td:last-child,
    #pane-experts table td:last-child {
        width: auto !important;
        display: table-cell !important; /* 手机端回归表格标准单元格，允许横向滑出 */
    }

    /* 7. 控制台微立体弹窗：手机端自适应宽度，防溢出屏幕 */
    .modal-window, .login-card {
        width: 95% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

/* 🔒 顶层登录防线拦截网关 */
.login-gate { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff5f5; z-index: 1000; display: flex; justify-content: center; align-items: center; }
.login-card { background: #fff; border-radius: 8px; width: 90%; max-width: 360px; padding: 30px 20px; box-shadow: 0 4px 20px rgba(204,0,0,0.15); border-top: 5px solid var(--main-color); text-align: center; }
.login-card h2 { font-size: 20px; color: var(--main-color); margin-bottom: 25px; font-weight: bold; }

/* 📊 顶层固定大顶栏 */
.admin-header { background: var(--main-color); color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.admin-header h2 { font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.admin-header span { font-size: 12px; background: rgba(255,255,255,0.2); padding: 4px 8px; border-radius: 4px; }

/* 🖥️ 综合布局双核工作台大容器 */
/* 🖥️ 綜合布局雙核工作台大容器 —— 寬度全量無損解鎖版 */
.admin-container { 
    display: flex; 
    width: 100% !important;        /* 🚀 核心新增：強行將寬度擴展至 100% 螢幕滿屏 */
    max-width: 100% !important;    /* 🚀 核心修正：徹底粉碎 1200px 物理牆限制，讓板塊徹底向左靠攏並擴展 */
    margin: 20px 0;                /* 🚀 核心修正：移除 auto 居中，靠左對齊 */
    padding: 0 25px;               /* 💡 兩側保留 25px 精美安全呼吸留白，極具現代感 */
    gap: 20px; 
    box-sizing: border-box !important;
}

.sidebar-menu { width: 220px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); flex-shrink: 0; }
.menu-btn { width: 100%; text-align: left; padding: 14px 20px; font-size: 14px; font-weight: bold; border: none; background: none; color: #555; cursor: pointer; border-left: 4px solid transparent; transition: all 0.2s; }
.menu-btn.active { background: #fff1f1; color: var(--main-color); border-left-color: var(--main-color); }
.menu-btn:hover:not(.active) { background: #fafafa; }

.main-content { flex-grow: 1; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); min-height: 550px; }
.pane-view { display: none; }
.pane-view.active { display: block; }

/* 🪙 综合资产流水营收大看板卡片 */
.stats-grid { display: flex; gap: 15px; margin-bottom: 20px; }
.stat-card { flex: 1; background: #fff5f5; border: 1px solid #ffe0e0; border-radius: 6px; padding: 15px; text-align: center; }
.stat-card p { font-size: 12px; color: #666; margin-bottom: 5px; }
.stat-card h3 { font-size: 22px; color: var(--main-color); font-weight: bold; }

/* 📊 统一多维高精数据表格大框架 */
.table-wrapper { width: 100%; overflow-x: auto; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { background: #f7f7f7; color: #444; font-weight: bold; padding: 12px 10px; border-bottom: 2px solid #ddd; white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--border-color); color: #555; white-space: nowrap; }
tr:hover { background: #fafafa; }

/* 🚀 核心加固：强制松绑会员管理右侧安全操作列的排版限制，100%绝不挤压坍塌 */
#pane-users table td:last-child {
    max-width: none !important;
    width: 380px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#pane-users table th:last-child {
    width: 380px !important;
    white-space: nowrap !important;
}

.pane-title-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px dashed #ddd; }
.pane-title-bar h3 { font-size: 15px; font-weight: bold; color: #111; }

/* ⚡ 统一控制台微立体操作按钮组件 */
.icon-btn { background: #cc0000; color: #fff; border: none; padding: 6px 12px; font-size: 12px; font-weight: bold; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: background 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.icon-btn:hover { background: #b30000; }
.icon-btn.danger { background: #444444; }
.icon-btn.danger:hover { background: #222222; }
.icon-btn.mini { padding: 6px 12px !important; font-size: 12px !important; border-radius: 6px !important; margin: 0 !important; }

/* 🛸 控制台中央输入输入遮罩弹窗大组件 */
.modal-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 200; visibility: hidden; opacity: 0; transition: all 0.3s; }
.modal-mask.active { visibility: visible; opacity: 1; }
.modal-window { background: #fff; border-radius: 8px; width: 90%; max-width: 460px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.25); transform: translateY(-20px); transition: transform 0.3s; }
.modal-mask.active .modal-window { transform: translateY(0); }

.modal-head { background: #cc0000; color: #fff; padding: 12px 20px; font-size: 14px; font-weight: bold; }
.modal-body { padding: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 6px; color: #444; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; outline: none; font-size: 13px; background: #fdfdfd; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--main-color); background: #fff; }
.modal-foot { display: flex; justify-content: flex-end; padding: 12px 20px; background: #f7f7f7; gap: 10px; border-top: 1px solid var(--border-color); }

.badge { padding: 3px 8px; font-size: 11px; border-radius: 4px; font-weight: bold; }
.badge.win { background: #ffebeb; color: #cc0000; border: 1px solid #cc0000; }
.badge.lose { background: #f0f0f0; color: #444444; border: 1px solid #444444; }
.badge.wait { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.avatar-preview { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #cc0000; background: #eee; }

.toast-pop { position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.85); color: #fff; padding: 14px 28px; border-radius: 30px; font-size: 13px; font-weight: bold; z-index: 10000; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); animation: popFadeIn 0.2s ease-out; }
/* 🚀 独立加固：强行锁死专家管理大表最后一列，100%绝不挤压坍塌 */
#pane-experts table td:last-child {
    max-width: none !important;
    width: 310px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#pane-experts table th:last-child {
    width: 310px !important;
    white-space: nowrap !important;
}
/* ==========================================
 * ⚡ 全局统一金融级紧凑型分页控制控制条样式
 * ========================================== */
.pagination-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    padding: 8px 4px;
    font-size: 12px;
    color: #475569;
    user-select: none;
    flex-wrap: wrap;
}

.page-info-tag {
    margin-right: 10px;
    font-weight: bold;
    font-family: monospace;
    color: #64748b;
}

.page-btn {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.page-btn:hover:not(:disabled) {
    background: #fff1f1;
    color: #cc0000;
    border-color: #ffe0e0;
}

.page-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.page-btn.active-num {
    background: #cc0000;
    color: #ffffff;
    border-color: #cc0000;
    box-shadow: 0 2px 4px rgba(204,0,0,0.15);
}

@keyframes popFadeIn { from { opacity: 0; transform: translate(-50%, -45%); } to { opacity: 1; transform: translate(-50%, -50%); } }
