/* ============================================================
   管理后台样式表
   ============================================================ */

:root {
    --sidebar-w: 220px;
    --admin-bg: #f5f6f8;
    --admin-card: #ffffff;
    --admin-border: #e4e7ed;
    --admin-text: #303133;
    --admin-text-2: #606266;
    --admin-text-3: #909399;
    --admin-primary: #409eff;
    --admin-success: #67c23a;
    --admin-warning: #e6a23c;
    --admin-danger: #f56c6c;
    --admin-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ---- 全局 ---- */
.admin-body {
    background: var(--admin-bg);
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--admin-text);
    min-height: 100vh;
}

/* ============================================================
   布局
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- 侧边栏 ---- */
.admin-sidebar {
    width: var(--sidebar-w);
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-logo {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-logo a {
    color: #f1f5f9 !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: -0.3px;
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
}
.admin-nav-group {
    margin-bottom: 12px;
}
.admin-nav-label {
    padding: 8px 18px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    font-weight: 500;
}
.admin-nav-item {
    display: block;
    padding: 8px 18px;
    font-size: 13.5px;
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-nav-item:hover {
    color: #e2e8f0 !important;
    background: rgba(255,255,255,0.04);
}
.admin-nav-item.active {
    color: #f1f5f9 !important;
    background: rgba(64,158,255,0.15);
    border-left-color: var(--admin-primary);
}

.admin-sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.admin-logout {
    color: #94a3b8 !important;
}

/* ---- 主内容 ---- */
.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #fff;
    padding: 14px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.admin-page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}
.admin-user-info {
    font-size: 12.5px;
    color: var(--admin-text-3);
}

.admin-content {
    padding: 20px 24px;
    flex: 1;
}

/* ============================================================
   控制台首页
   ============================================================ */
.ad-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ad-stat-card {
    background: var(--admin-card);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--admin-shadow);
    text-align: center;
    border: 1px solid var(--admin-border);
    transition: transform 0.15s;
}
.ad-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ad-stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}
.ad-stat-label {
    font-size: 13px;
    color: var(--admin-text-3);
}
.ad-stat-card .ad-stat-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--admin-primary) !important;
}

/* ============================================================
   工具栏
   ============================================================ */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.toolbar-info {
    font-size: 13px;
    color: var(--admin-text-3);
}
.toolbar-info strong {
    color: var(--admin-text);
    font-weight: 600;
}

/* 筛选输入框 */
.ad-filter-input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: var(--admin-text);
    width: 200px;
    transition: border-color 0.2s;
}
.ad-filter-input:focus {
    border-color: var(--admin-primary);
}
.ad-filter-input::placeholder {
    color: #c0c4cc;
}
.ad-filter-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: var(--admin-text);
    background: #fff;
    cursor: pointer;
}

/* ============================================================
   表格
   ============================================================ */
.ad-table-wrap {
    background: var(--admin-card);
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    border: 1px solid var(--admin-border);
}
.ad-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.ad-table thead {
    background: #fafafa;
}
.ad-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--admin-text-2);
    border-bottom: 2px solid #ebeef5;
    white-space: nowrap;
}
.ad-table th.narrow {
    width: 60px;
}
.ad-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f2f3f5;
    vertical-align: middle;
}
.ad-table tbody tr:hover {
    background: #f5f7fa;
}
.ad-table tbody tr:last-child td {
    border-bottom: none;
}

.ad-table .ad-loading,
.ad-table .ad-empty,
.ad-table .ad-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-text-3);
    font-size: 14px;
}
.ad-table .ad-error {
    color: var(--admin-danger);
}

/* ---- 表格列样式 ---- */
.td-name {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.td-snippet {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--admin-text-3);
    font-size: 12.5px;
}
.td-path {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--admin-text-3);
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', monospace;
}
.price-cell {
    font-weight: 600;
    color: var(--admin-primary);
    font-variant-numeric: tabular-nums;
}

/* ---- 表格内 actions ---- */
.ad-actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
}

/* ---- 分页 ---- */
.ad-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding-bottom: 4px;
    font-size: 13px;
}
.pg-btn, .pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff;
    color: var(--admin-text-2);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.pg-btn:hover, .pg-num:hover {
    color: var(--admin-primary);
    border-color: #c6e2ff;
    background: #ecf5ff;
}
.pg-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--admin-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.pg-dis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    background: #f5f7fa;
    color: #c0c4cc;
    font-size: 13px;
    cursor: default;
}
.pg-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 32px;
    color: #c0c4cc;
    font-size: 14px;
    letter-spacing: 1px;
}

/* ============================================================
   按钮
   ============================================================ */
.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: var(--admin-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
}
.ad-btn:hover {
    color: var(--admin-primary);
    border-color: #c6e2ff;
    background: #ecf5ff;
}
.ad-btn-primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff !important;
}
.ad-btn-primary:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}
.ad-btn-success {
    background: var(--admin-success);
    border-color: var(--admin-success);
    color: #fff !important;
}
.ad-btn-success:hover {
    background: #85ce61;
    border-color: #85ce61;
}
.ad-btn-danger {
    background: var(--admin-danger);
    border-color: var(--admin-danger);
    color: #fff !important;
}
.ad-btn-danger:hover {
    background: #f89898;
    border-color: #f89898;
}
.ad-btn-warn {
    background: var(--admin-warning);
    border-color: var(--admin-warning);
    color: #fff !important;
}
.ad-btn-warn:hover {
    background: #ebb563;
    border-color: #ebb563;
}
.ad-btn-ok {
    color: var(--admin-success) !important;
    border-color: #c2e7b0;
}
.ad-btn-ok:hover {
    background: #f0f9eb;
    color: var(--admin-success) !important;
}
.ad-btn-info {
    color: #1a73e8 !important;
    border-color: #a8c7fa;
}
.ad-btn-info:hover {
    background: #e8f0fe;
    color: #1557b0 !important;
}
.ad-btn-sm {
    padding: 5px 11px;
    font-size: 12px;
    border-radius: 4px;
}

/* ============================================================
   弹窗 (Modal)
   ============================================================ */
.ad-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ad-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: adModalIn 0.2s ease;
}
@keyframes adModalIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.ad-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}
.ad-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--admin-text);
}
.ad-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--admin-text-3);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.ad-modal-close:hover {
    background: #f2f3f5;
    color: var(--admin-text-2);
}
.ad-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}
.ad-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid #f2f3f5;
    flex-shrink: 0;
}

/* ---- 弹窗表单 ---- */
.ad-form-group {
    margin-bottom: 14px;
}
.ad-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--admin-text-2);
    margin-bottom: 5px;
}
.ad-form-label .required {
    color: var(--admin-danger);
    margin-left: 2px;
}
.ad-form-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: var(--admin-text);
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}
.ad-form-input:focus {
    border-color: var(--admin-primary);
}
.ad-form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: var(--admin-text);
    box-sizing: border-box;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    resize: vertical;
    line-height: 1.6;
}
.ad-form-textarea:focus {
    border-color: var(--admin-primary);
}
.ad-form-select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    color: var(--admin-text);
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
}

/* ---- 导入弹窗 ---- */
.ad-import-zone {
    border: 2px dashed #dcdfe6;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.ad-import-zone:hover {
    border-color: var(--admin-primary);
    background: #fafbff;
}
.ad-import-zone.has-file {
    border-color: var(--admin-success);
    background: #f9fdf5;
}
.ad-import-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.ad-import-text {
    font-size: 13px;
    color: var(--admin-text-3);
}
.ad-import-text strong {
    color: var(--admin-primary);
}
.ad-import-filename {
    font-size: 13px;
    color: var(--admin-success);
    font-weight: 500;
}
.ad-import-tip {
    font-size: 12.5px;
    color: var(--admin-text-3);
    margin-bottom: 8px;
    line-height: 1.6;
}
.ad-import-tip strong {
    color: var(--admin-text-2);
}
.ad-import-cols {
    font-size: 12px;
    color: var(--admin-text-3);
    background: #f5f7fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
}
.ad-import-progress {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f0f9eb;
    border-radius: 6px;
    font-size: 12px;
    color: var(--admin-success);
    display: none;
}
.ad-import-success {
    color: var(--admin-success);
    font-weight: 500;
    margin-bottom: 6px;
}
.ad-import-errors {
    color: var(--admin-danger);
    font-size: 12px;
    line-height: 1.7;
    margin-top: 6px;
}
.ad-import-error {
    color: var(--admin-danger);
    font-weight: 500;
}

/* ---- 弹窗表单行 ---- */
.ad-form-row {
    margin-bottom: 14px;
}
.ad-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ad-form-row-2col .ad-form-group {
    margin-bottom: 0;
}

/* ---- 弹窗大号文本域 ---- */
.ad-form-textarea-lg {
    min-height: 280px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
}

/* ============================================================
   徽章
   ============================================================ */
.ad-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 500;
}
.ad-badge-admin {
    background: #ecf5ff;
    color: var(--admin-primary);
}
.ad-badge-user {
    background: #f4f4f5;
    color: var(--admin-text-3);
}
.ad-badge-active {
    background: #e8f5e9;
    color: #2e7d32;
}
.ad-badge-disabled {
    background: #ffebee;
    color: #c62828;
}

/* ============================================================
   Toast 提示框
   ============================================================ */
.toast-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    pointer-events: none;
    max-width: 400px;
    text-align: center;
}
.toast-success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}
.toast-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}
.toast-info {
    background: #f4f4f5;
    color: #909399;
    border: 1px solid #d3d4d6;
}

/* ============================================================
   手机端顶部栏 & 侧边栏遮罩（桌面隐藏）
   ============================================================ */
.admin-mobile-header {
    display: none;          /* 桌面隐藏 */
}

.admin-sidebar-overlay {
    display: none;          /* 桌面隐藏 */
}

/* ============================================================
   主内容区：允许独立滚动
   ============================================================ */
.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;        /* 内容区可滚动 */
}

.admin-content {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;        /* 内容溢出时可滚动 */
}

/* ============================================================
   表格外层：强制横向滚动（所有屏幕）
   ============================================================ */
.ad-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;   /* iOS 平滑滚动 */
}
.ad-table {
    min-width: 640px;       /* 小于此宽度出现横向滚动 */
}

/* ============================================================
   响应式：<= 840px（平板竖屏 / 大手机）
   ============================================================ */
@media (max-width: 840px) {
    /* 隐藏侧边栏（移出屏幕） */
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 1030;
        transition: left 0.25s ease;
        box-shadow: none;
    }
    .admin-sidebar.admin-sidebar-open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }

    /* 显示手机顶部栏 */
    .admin-mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 1020;
        background: #1e293b;
        color: #f1f5f9;
        padding: 10px 16px;
        height: 48px;
        box-sizing: border-box;
    }
    .admin-hamburger {
        background: none;
        border: none;
        color: #f1f5f9;
        font-size: 22px;
        cursor: pointer;
        padding: 4px 6px;
        border-radius: 6px;
        line-height: 1;
    }
    .admin-hamburger:hover {
        background: rgba(255,255,255,0.1);
    }
    .admin-mobile-title {
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* 遮罩层 */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.40);
        z-index: 1025;
    }
    .admin-sidebar-overlay.admin-sidebar-overlay-show {
        display: block;
    }

    /* 主内容区 */
    .admin-layout {
        flex-direction: column;
    }
    .admin-main {
        width: 100%;
        min-width: 0;
        height: calc(100vh - 48px);
        overflow: hidden;
    }
    .admin-topbar {
        position: static;
        padding: 10px 16px;
    }
    .admin-page-title {
        font-size: 16px;
    }
    .admin-content {
        padding: 14px 12px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }

    /* 工具栏折行 */
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-left, .toolbar-right {
        width: 100%;
    }
    .ad-filter-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 统计卡片两列 */
    .ad-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ad-stat-card {
        padding: 14px;
    }
    .ad-stat-num {
        font-size: 24px;
    }

    /* 弹窗适配 */
    .ad-modal {
        max-width: 98vw;
        max-height: 92vh;
        border-radius: 10px;
    }
    .ad-modal-body {
        padding: 14px 16px;
    }
    .ad-modal-header {
        padding: 14px 16px 10px;
    }
    .ad-modal-footer {
        padding: 10px 16px 14px;
    }

    /* 分页 */
    .ad-pager {
        flex-wrap: wrap;
        gap: 3px;
    }

    /* 图表网格单列 */
    .stats-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   响应式：<= 480px（小手机）
   ============================================================ */
@media (max-width: 480px) {
    .admin-mobile-header {
        padding: 8px 12px;
        height: 44px;
    }
    .admin-hamburger {
        font-size: 20px;
    }
    .admin-mobile-title {
        font-size: 14px;
    }

    .admin-content {
        padding: 10px 8px;
    }
    .admin-topbar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .admin-page-title {
        font-size: 15px;
    }

    /* 统计卡片单列 */
    .ad-stats {
        grid-template-columns: 1fr;
    }

    /* 表格字缩小 */
    .ad-table {
        font-size: 12px;
        min-width: 540px;
    }
    .ad-table th, .ad-table td {
        padding: 8px 8px;
    }

    /* 按钮 full-width on mobile */
    .ad-btn {
        padding: 7px 12px;
        font-size: 12.5px;
    }

    /* 弹窗更大占比 */
    .ad-modal {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }

    /* 反馈弹窗左右分栏变上下 */
    .fb-modal-body {
        flex-direction: column;
    }
    .fb-modal-left {
        width: 100%;
        min-width: unset;
        max-height: 180px;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid var(--admin-border);
    }
}

/* ============================================================
   打印样式（可选）
   ============================================================ */
@media print {
    .admin-sidebar, .admin-mobile-header,
    .admin-topbar, .ad-pager, .ad-actions,
    .admin-sidebar-overlay { display: none !important; }
    .admin-main { width: 100% !important; }
    .ad-table-wrap { overflow-x: visible !important; }
}

/* ============================================================ */
/*  映射关系管理                                                  */
/* ============================================================ */

/* 统计条 */
.mapping-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f0f4fa;
    border-radius: 8px;
}
.mapping-stat-chip {
    font-size: 12px;
    color: #1967d2;
    background: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #d2e3fc;
}

/* 三列表单 */
.ad-form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* 复选框样式 */
.ad-form-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--admin-text);
    cursor: pointer;
}
.ad-form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}


/* ============================================================
   用户行为分析页面
   ============================================================ */

.stats-page {
    max-width: 1200px;
}

/* 汇总卡片 — 彩色上边框 */
.ad-stat-card-blue   { border-top: 3px solid #4285f4; }
.ad-stat-card-green  { border-top: 3px solid #34a853; }
.ad-stat-card-purple { border-top: 3px solid #9c27b0; }
.ad-stat-card-orange { border-top: 3px solid #f9ab00; }

.ad-stat-card-cyan { border-top: 3px solid #00bcd4; }
.ad-stat-card-red  { border-top: 3px solid #e53935; }


/* 图表网格：两列 */
.stats-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* 图表卡片 */
.stats-chart-card {
    background: var(--admin-card);
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    padding: 20px 20px 16px;
}
.stats-chart-card-wide {
    grid-column: span 2;
}
.stats-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 14px;
}
.stats-chart-wrap {
    position: relative;
    height: 260px;
}

/* 数据表格卡片 */
.stats-table-card {
    background: var(--admin-card);
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    padding: 20px 20px 16px;
    overflow-x: auto;
}
.stats-table-wrap {
    overflow-x: auto;
}
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.stats-table thead {
    background: #fafafa;
}
.stats-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--admin-text-2);
    border-bottom: 2px solid #ebeef5;
    white-space: nowrap;
}
.stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2f3f5;
    vertical-align: middle;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-table tbody tr:hover {
    background: #f5f7fa;
}
.stats-rank {
    width: 40px;
    color: var(--admin-text-3);
    font-variant-numeric: tabular-nums;
}
.stats-query {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-cnt {
    width: 60px;
    font-weight: 600;
    color: var(--admin-primary);
    font-variant-numeric: tabular-nums;
}
.stats-last {
    width: 100px;
    font-size: 12px;
    color: var(--admin-text-3);
}
.stats-empty {
    text-align: center;
    color: var(--admin-text-3);
    padding: 24px 12px !important;
}
.stats-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--admin-text-3);
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 900px) {
    .stats-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   意见反馈管理 - 弹窗优化
   ============================================================ */

/* ---- 徽章（列表 + 弹窗通用） ---- */
.fb-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 12px; font-size: 12px; font-weight: 500;
    white-space: nowrap;
    background: var(--admin-border); color: var(--admin-text-2);
}
.fb-badge-type   { background: #ecf5ff; color: #409eff; }
.fb-badge-warning{ background: #fdf6ec; color: #e6a23c; }
.fb-badge-info   { background: #ecf5ff; color: #409eff; }
.fb-badge-success{ background: #f0f9eb; color: #67c23a; }
.fb-badge-muted  { background: #f4f4f5; color: #909399; }

/* ---- 弹窗遮罩 + 容器 ---- */
.fb-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: fbFadeIn 0.2s ease;
}
@keyframes fbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ad-modal 弹窗入场动画 */
.ad-modal {
    animation: fbModalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes fbModalIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ---- 弹窗头部 ---- */
.fb-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px 12px;
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}
.fb-modal-title-wrap {
    display: flex; align-items: center; gap: 10px;
}
.fb-modal-title-wrap h3 {
    margin: 0; font-size: 17px; font-weight: 700; color: var(--admin-text);
}
.fb-modal-close {
    background: none; border: none;
    font-size: 22px; color: var(--admin-text-3);
    cursor: pointer; padding: 4px 8px;
    border-radius: 6px; line-height: 1;
    transition: all 0.15s;
}
.fb-modal-close:hover { background: #f2f3f5; color: var(--admin-text); }

/* ---- 弹窗主体（优化版：上下布局） ---- */
.fb-meta-row {
    display: flex; flex-wrap: wrap; gap: 10px 20px;
    padding: 14px 18px; background: linear-gradient(135deg, #f8f9fb 0%, #f0f2f5 100%);
    border-radius: 12px; border: 1px solid #e4e7ed;
}
.fb-meta-row .fb-meta-item {
    display: flex; align-items: center; gap: 6px;
}
.fb-meta-row .fb-meta-label {
    font-size: 11px; color: #909399; font-weight: 600;
    position: relative; padding-left: 10px;
}
.fb-meta-row .fb-meta-label::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 12px; background: #c0c4cc; border-radius: 2px;
}
.fb-meta-row .fb-meta-value {
    font-size: 13px; color: #303133; font-weight: 500;
}

/* 横向状态步骤条 */
.fb-status-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fafbfc;
    border-radius: 12px; border: 1px solid #ebedf0;
}
.fb-status-label {
    font-size: 12px; color: #909399; font-weight: 600; white-space: nowrap;
}
.fb-status-steps-h {
    display: flex; gap: 6px;
}
.fb-step-h {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 16px; border: none; border-radius: 20px;
    background: #f0f2f5; cursor: pointer;
    font-size: 12.5px; color: #909399; font-weight: 500;
    transition: all 0.2s ease; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.fb-step-h:hover { 
    background: #e6eaf0; 
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.fb-step-h.fb-step-done-h { 
    background: linear-gradient(135deg, #f0f9eb 0%, #e8f5e1 100%); 
    color: #67c23a; 
    box-shadow: 0 1px 3px rgba(103,194,58,0.15);
}
.fb-step-h.fb-step-current-h { 
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%); 
    color: #fff; font-weight: 700; 
    box-shadow: 0 3px 10px rgba(64,158,255,0.35);
    transform: translateY(-1px);
}
.fb-step-dot-h {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; opacity: 0.4; flex-shrink: 0;
    transition: all 0.2s;
}
.fb-step-done-h .fb-step-dot-h { opacity: 1; }
.fb-step-current-h .fb-step-dot-h { 
    background: #fff; opacity: 1; 
    box-shadow: 0 0 4px rgba(255,255,255,0.6);
}
.fb-step-h[data-status="rejected"].fb-step-done-h { 
    background: linear-gradient(135deg, #fef0f0 0%, #fce4e4 100%); 
    color: #f56c6c; 
    box-shadow: 0 1px 3px rgba(245,108,108,0.15);
}
.fb-step-h[data-status="rejected"].fb-step-done-h .fb-step-dot-h { background: #f56c6c; }

/* ---- 左侧：元信息卡片（已弃用，改用 .fb-meta-row 横排） ---- */
/* 保留 .fb-meta-label / .fb-meta-value 给横排使用 */

/* ---- 状态步骤条（已弃用，改用 .fb-status-steps-h 横向） ---- */

/* ---- 反馈内容卡片 ---- */
.fb-content-card {
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border: 1px solid #ebedf0;
    border-radius: 12px; padding: 16px 18px;
    flex: 1; min-height: 60px;
    margin-bottom: 8px;
}
.fb-card-label {
    font-size: 12px; color: #909399; font-weight: 600;
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.fb-content-body {
    font-size: 14px; line-height: 1.8; color: #303133;
    white-space: pre-wrap; word-break: break-word;
    max-height: 200px; overflow-y: auto;
    padding: 10px 12px; background: #fff;
    border-radius: 8px; border: 1px solid #ebeef5;
}

/* ---- 回复卡片 ---- */
.fb-reply-card {
    background: linear-gradient(135deg, #fff 0%, #fcfdff 100%);
    border: 1px solid #e4e7ed;
    border-radius: 12px; padding: 16px 18px;
    margin-top: 8px;
    position: relative;
}
.fb-reply-card::before {
    content: '';
    display: block;
    width: 36px; height: 2px;
    background: linear-gradient(90deg, #409eff, transparent);
    border-radius: 1px;
    margin-bottom: 14px;
}
.fb-reply-templates {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    margin-bottom: 10px;
}
.fb-template-label {
    font-size: 12px; color: var(--admin-text-3); font-weight: 500;
}
.fb-template-tag {
    padding: 3px 10px; border-radius: 12px;
    font-size: 11.5px; color: #409eff;
    background: #ecf5ff; border: 1px solid #d9ecff;
    cursor: pointer; transition: all 0.15s;
}
.fb-template-tag:hover { background: #d9ecff; border-color: #a0cfff; }
.fb-reply-textarea {
    width: 100%; min-height: 80px; max-height: 180px;
    padding: 12px 14px;
    border: 1px solid #dcdfe6; border-radius: 10px;
    font-size: 13.5px; line-height: 1.65;
    color: #303133; background: #fafbfc;
    resize: vertical; outline: none;
    font-family: inherit; transition: all 0.2s;
    box-sizing: border-box;
}
.fb-reply-textarea:focus { 
    border-color: #409eff; 
    background: #fff; 
    box-shadow: 0 0 0 3px rgba(64,158,255,0.1);
}
.fb-reply-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
}
.fb-reply-hint { font-size: 12px; color: var(--admin-text-3); }
.fb-reply-count { font-size: 12px; color: var(--admin-text-3); font-variant-numeric: tabular-nums; }
.fb-reply-count.fb-reply-over { color: #f56c6c; font-weight: 600; }

/* ---- 弹窗底部操作栏 ---- */
.fb-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 24px 16px;
    border-top: 1px solid #f2f3f5;
    flex-shrink: 0;
}
.fb-footer-btn {
    padding: 9px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    border: none; font-family: inherit;
}
.fb-footer-cancel {
    background: #f5f7fa; color: #606266;
}
.fb-footer-cancel:hover { 
    background: #e8eaed; 
    transform: translateY(-1px);
}
.fb-footer-save {
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    color: #fff; box-shadow: 0 2px 8px rgba(64,158,255,0.3);
}
.fb-footer-save:hover { 
    box-shadow: 0 4px 12px rgba(64,158,255,0.4);
    transform: translateY(-1px);
}

/* ---- 通用工具类 ---- */
.ad-select-sm {
    padding: 4px 8px; border: 1px solid var(--admin-border);
    border-radius: 6px; font-size: 13px; background: var(--admin-card);
    color: var(--admin-text);
}
.ad-td-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 分页 ---- */
.pg-btn  { padding: 4px 12px; border: 1px solid var(--admin-border); border-radius: 4px; background: var(--admin-card); cursor: pointer; font-size: 13px; margin: 0 4px; }
.pg-btn:hover { border-color: var(--admin-primary); color: var(--admin-primary); }
.pg-info { font-size: 13px; color: var(--admin-text-2); margin: 0 8px; }

/* ---- 响应式 ---- */
@media (max-width: 700px) {
    .fb-meta-row { flex-direction: column; gap: 8px; }
    .fb-status-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ad-modal { max-width: 98vw; max-height: 95vh; }
}

/* 反馈已删除行样式 */
tr.fb-deleted-row {
    opacity: 0.6;
    background: #fef0f0 !important;
}
tr.fb-deleted-row:hover {
    opacity: 0.8;
    background: #fde2e2 !important;
}
.fb-badge-danger {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
}
.ad-btn-warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}
.ad-btn-warning:hover {
    background: #faead3;
    color: #cf8d26;
}

/* ============================================================
   立项指南全国覆盖总览 - guidelines_coverage.html
   ============================================================ */

/* 页面容器 */
.gc-page {
    max-width: 1200px;
}

/* Tab 切换 */
.gc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.gc-tab {
    padding: 8px 20px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--admin-text-2);
    transition: all 0.2s;
}
.gc-tab:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}
.gc-tab.active {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}

/* 工具栏 */
.gc-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}
.gc-search {
    flex: 1;
    max-width: 300px;
    padding: 7px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.gc-search:focus {
    border-color: var(--admin-primary);
}
.gc-sort {
    padding: 7px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--admin-card);
    color: var(--admin-text);
}

/* 省份卡片列表 */
.gc-prov-list,
.gc-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gc-prov-card,
.gc-cat-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 14px 18px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.gc-prov-card:hover,
.gc-cat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.gc-prov-name,
.gc-cat-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 8px;
}
.gc-prov-bar-wrap,
.gc-cat-bar-wrap {
    height: 10px;
    background: #f0f2f5;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}
.gc-prov-bar,
.gc-cat-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
    min-width: 2px;
}
.gc-prov-stats,
.gc-cat-stats {
    font-size: 13px;
    color: var(--admin-text-2);
}
.gc-published {
    font-weight: 600;
    color: var(--admin-success);
}
.gc-pct {
    float: right;
    font-weight: 600;
    color: var(--admin-primary);
}
.gc-cat-provs {
    font-size: 12px;
    color: var(--admin-text-3);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 覆盖矩阵 */
.gc-matrix-wrap {
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card);
}
.gc-matrix {
    border-collapse: collapse;
    font-size: 13px;
    min-width: 100%;
}
.gc-th-category {
    position: sticky;
    left: 0;
    background: #fafbfc;
    z-index: 2;
    min-width: 140px;
    max-width: 180px;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--admin-border);
    border-right: 1px solid var(--admin-border);
}
.gc-th-prov {
    min-width: 36px;
    padding: 6px 4px;
    font-size: 11px;
    writing-mode: horizontal-tb;
    border-bottom: 1px solid var(--admin-border);
    background: #fafbfc;
}
.gc-th-pct {
    min-width: 60px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--admin-border);
    background: #fafbfc;
}
.gc-td-category {
    position: sticky;
    left: 0;
    background: var(--admin-card);
    z-index: 1;
    padding: 6px 10px;
    border-bottom: 1px solid #f0f2f5;
    border-right: 1px solid var(--admin-border);
    font-size: 13px;
}
.gc-td-cell {
    text-align: center;
    padding: 6px 4px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}
.gc-cell-yes {
    background: #f0f9eb;
    color: #67c23a;
}
.gc-cell-no {
    background: #fef0f0;
    color: #f56c6c;
}
.gc-td-pct {
    text-align: center;
    padding: 6px 6px;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 600;
    font-size: 12px;
}
.gc-pct-high { color: #67c23a; }
.gc-pct-mid { color: #e6a23c; }
.gc-pct-low  { color: #f56c6c; }

/* 弹窗 */
.gc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.gc-modal {
    background: var(--admin-card);
    border-radius: 10px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.gc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border);
}
.gc-modal-header h3 {
    margin: 0;
    font-size: 16px;
}
.gc-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--admin-text-3);
    line-height: 1;
}
.gc-modal-close:hover { color: var(--admin-text); }
.gc-modal-body {
    padding: 20px;
}

/* 弹窗内容 */
.gc-detail-stats {
    font-size: 14px;
    color: var(--admin-text-2);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f5f6f8;
    border-radius: 6px;
}
.gc-detail-section {
    margin-bottom: 14px;
}
.gc-detail-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.gc-label-yes { color: #67c23a; }
.gc-label-no  { color: #f56c6c; }
.gc-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gc-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.gc-tag-yes {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}
.gc-tag-no {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}
.gc-detail-empty {
    font-size: 13px;
    color: var(--admin-text-3);
    padding: 8px 0;
}

/* 空状态 */
.gc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-text-3);
    font-size: 14px;
}

/* 国家立项指南 - 项目编码列 */
.td-codes {
    vertical-align: top;
    padding-top: 8px;
}
.ad-code-chip {
    display: inline-block;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    padding: 1px 6px;
    margin: 1px 2px 1px 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.ad-text-muted {
    color: var(--admin-text-3);
    font-size: 12px;
}

/* ============================================================
   用户行为分析 - 分区标题
   ============================================================ */
.stats-section {
    margin-bottom: 28px;
}

/* ============================================================
   用户行为分析 - 时间范围选择器
   ============================================================ */
.stats-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.stats-toolbar-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text-2);
    margin-right: 4px;
}
.stats-range-btn,
.stats-range-active {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}
.stats-range-btn {
    border: 1px solid var(--admin-border);
    color: var(--admin-text-2);
    background: var(--admin-card);
}
.stats-range-btn:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    background: #ecf5ff;
}
.stats-range-active {
    border: 1px solid var(--admin-primary);
    background: var(--admin-primary);
    color: #fff;
}

.stats-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid var(--admin-primary);
    line-height: 1.4;
}

/* 3 列网格 */
.stats-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* 小图（环形图专用） */
.stats-chart-sm {
    height: 180px;
}

/* 响应式 */
@media (max-width: 900px) {
    .stats-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   用户行为分析 - Tab 导航
   ============================================================ */
.stats-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--admin-card);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
}
.stats-tab-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--admin-text-2);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.stats-tab-btn:hover {
    background: #f0f4ff;
    color: var(--admin-primary);
}
.stats-tab-btn.active {
    background: var(--admin-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(66,133,244,0.3);
}
.stats-tab-panel {
    display: none;
    animation: statsFadeIn 0.25s ease;
}
.stats-tab-panel.active {
    display: block;
}
@keyframes statsFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   用户行为分析 - 空状态
   ============================================================ */
.stats-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9aa0a6;
    text-align: center;
    min-height: 160px;
}
.stats-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.6;
}
.stats-empty-text {
    font-size: 13px;
    line-height: 1.6;
}
.stats-empty-hint {
    font-size: 11px;
    color: var(--admin-text-3);
    margin-top: 6px;
    line-height: 1.5;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}
.stats-chart-summary {
    text-align: center;
    font-size: 12px;
    color: var(--admin-text-2);
    margin-top: 8px;
    padding: 4px 0;
}

/* ============================================================
   用户行为分析 - 概览卡片增强
   ============================================================ */
.ad-stat-card {
    text-align: center;
    padding: 22px 16px;
    border-radius: 10px;
    background: var(--admin-card);
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    transition: transform 0.15s;
}
.ad-stat-card:hover {
    transform: translateY(-2px);
}
.ad-stat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}
.ad-stat-label {
    font-size: 12px;
    color: var(--admin-text-2);
    margin-top: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-tabs {
        flex-wrap: wrap;
    }
    .stats-tab-btn {
        flex: 1 0 auto;
        font-size: 11px;
        padding: 8px 6px;
    }
}