/* ============================================================
   信验工单平台 · 用户端统一高级主题（api-theme.css）
   - 设计系统全局固定：字体 / 配色 / 圆角 / 阴影 / 字号层级
   - 仅承载视觉样式，不改动任何业务结构、跳转与字段
   - 颜色取自规范：主品牌 #1677FF，状态色与中性色见 :root
   - 字体：中文 阿里巴巴普惠体(兜底思源黑体/微软雅黑)，
           英文数字工单编号 Inter（通过字体栈自动匹配）
   ============================================================ */

/* 字体使用系统字体栈（见 :root --font-sans），不依赖外部字体服务，保证各部署环境稳定渲染 */



:root {
    /* 主品牌色（与后台 SaaS 主题统一：蓝紫渐变系） */
    --brand: #5b6cf9;
    --brand-hover: #4a59e0;
    --brand-active: #3a4ad0;
    --brand-2: #a259f7;       /* 紫，用于渐变叠加 */
    --brand-light: #eef0ff;   /* 浅品牌底色 */
    --brand-lighter: #f3f4ff;

    /* 功能状态色 */
    --success: #00B42A;
    --warning: #FF7D00;
    --danger: #F53F3F;

    /* 文字分层色 */
    --text-1: #1D2129;  /* 主标题 */
    --text-2: #4E5969;  /* 次要说明 */
    --text-3: #86909C;  /* 弱置灰 */

    /* 高级质感中性色 */
    --bg-page: #F7F8FA;
    --bg-card: #FFFFFF;
    --bg-hover: #FAFBFC;
    --bg-hover-strong: #F2F3F5;
    --divider: #E5E6EB;

    /* 字体栈：Inter 在前负责英文数字，中文自动回退到普惠体 */
    --font-sans: 'Inter', '阿里巴巴普惠体', 'Alibaba PuHuiTi', '思源黑体',
                 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* 统一圆角与阴影（对齐后台 SaaS 观感） */
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 4px 20px rgba(91, 108, 249, 0.08);
    --shadow-pop: 0 12px 32px rgba(91, 108, 249, 0.16);
    --shadow-hover: 0 8px 28px rgba(91, 108, 249, 0.14);
    --transition: .2s ease;
}

/* ---------- 全局基础 ---------- */
* { box-sizing: border-box; }

html, body {
    font-family: var(--font-sans);
    font-size: 14px;          /* 正文 14px / 400 */
    font-weight: 400;
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-page);
    margin: 0;
    min-height: 100vh;
}

/* 表单元素继承字体（Bootstrap reboot 已 inherit，这里双保险） */
button, input, select, textarea { font-family: inherit; }

/* 字号层级（严格固定） */
.main-content h3,
.main-content h4 {
    font-size: 20px;          /* 一级大标题 20 / 600 */
    font-weight: 600;
    color: var(--text-1);
    margin: 0 0 20px;
}
.section-title {
    font-size: 16px;          /* 二级模块标题 16 / 500 */
    font-weight: 500;
    color: var(--text-1);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
}

/* ---------- 顶部导航 ---------- */
.top-nav {
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
}
.top-nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;          /* 字号略缩，与放大的 LOGO 协调 */
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-1);
    cursor: default;
}
.top-nav .logo::before {
    content: '';
    width: 38px; height: 38px;
    border-radius: 9px;
    background: url(/static/images/logo-xinyin.jpg) center/cover no-repeat;
    display: inline-block;
    flex: none;
    box-shadow: 0 4px 10px rgba(91, 108, 249, 0.28);
}
.top-nav .logo span {
    color: var(--brand);
    font-weight: 700;
}
.top-nav .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-2);
}
.top-nav .user-info a { color: var(--text-2); text-decoration: none; transition: color var(--transition); }
.top-nav .user-info a:hover { color: var(--brand); }

/* ---------- 左侧导航 ---------- */
.sidebar {
    width: 220px;
    background: #FFFFFF;       /* 与内容区 #F7F8FA 形成轻微底色区分 */
    position: fixed;
    top: 56px; left: 0; bottom: 0;
    border-right: 1px solid var(--divider);
    padding-top: 8px;
    z-index: 99;
}
.sidebar .menu-item {
    display: block;
    padding: 12px 24px;
    font-size: 14px;
    color: var(--text-2);
    text-decoration: none;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.sidebar .menu-item:hover { color: var(--brand); background: var(--brand-light); }
.sidebar .menu-item.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-left-color: transparent;
    box-shadow: 0 4px 12px rgba(91, 108, 249, 0.28);
    font-weight: 600;
}

/* ---------- 主内容区 ---------- */
.main-content {
    margin-left: 220px;
    margin-top: 56px;
    padding: 24px;
}

/* ---------- 卡片 ---------- */
.card {
    display: block;            /* 覆盖 Bootstrap .card 的 flex 列布局 */
    background: var(--bg-card);
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }

/* ---------- 页面标题行 ---------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-header h4 { margin: 0; }

/* ---------- 按钮规范 ---------- */
.btn-primary,
.btn-recharge {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: 1px solid transparent;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 24px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(91, 108, 249, 0.22);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-primary:hover,
.btn-recharge:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91, 108, 249, 0.32); color: #fff; }
.btn-primary:disabled { background: #B9BEF7; box-shadow: none; border-color: transparent; cursor: not-allowed; }

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    border: none;
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    padding: 8px 24px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 77, 79, 0.32); color: #fff; }
.btn-danger:disabled { background: linear-gradient(135deg, #ffccc7, #ffd8d8); box-shadow: none; cursor: not-allowed; }

.btn-outline {
    background: #fff;
    border: 1px solid var(--divider);
    color: var(--text-2);
    border-radius: var(--radius);
    font-size: 14px;
    padding: 8px 24px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* 高级感下载按钮（渐变背景 + 发光 + 悬浮微动） */
.btn-download {
    background: linear-gradient(135deg, #5b6cf9 0%, #4a59e0 60%, #a259f7 130%);
    background-size: 160% 160%;
    border: 1px solid rgba(162, 89, 247, .45);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 8px 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 16px rgba(91, 108, 249, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: background-position .4s ease, box-shadow .25s ease, transform .15s ease;
}
.btn-download:hover {
    background-position: 100% 0;
    color: #fff;
    box-shadow: 0 10px 24px rgba(91, 108, 249, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
    transform: translateY(-1px);
}
.btn-download:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(91, 108, 249, .4); }

/* 文字按钮（仅变色） */
.btn-text {
    background: none; border: none; padding: 0;
    color: var(--brand); cursor: pointer; font-size: 14px;
    transition: color var(--transition);
}
.btn-text:hover { color: var(--brand-hover); }

/* ---------- 首页欢迎卡 ---------- */
.welcome-card { text-align: center; padding: 60px 24px; }
.welcome-card h3 { font-size: 20px; font-weight: 600; color: var(--text-1); margin-bottom: 12px; }
.welcome-card p { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.stat-row { display: flex; gap: 20px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.stat-item {
    background: var(--bg-hover);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 24px 32px;
    text-align: center;
    min-width: 160px;
}
.stat-item .num { font-size: 28px; font-weight: 600; color: var(--brand); line-height: 1.2; }
.stat-item .label { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- 上传区 ---------- */
.upload-area {
    border: 2px dashed #D0D5DD;
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-hover);
}
.upload-area:hover,
.upload-area.dragover { border-color: var(--brand); background: var(--brand-lighter); }
.upload-area .icon { font-size: 48px; color: var(--brand); margin-bottom: 16px; }
.upload-area .title { font-size: 16px; font-weight: 500; color: var(--text-1); margin-bottom: 8px; }
.upload-area .desc { font-size: 12px; color: var(--text-3); }

.file-list { margin-top: 20px; }
.file-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.file-item .file-name { font-size: 14px; color: var(--text-1); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .file-size { font-size: 12px; color: var(--text-3); margin: 0 16px; white-space: nowrap; }
.file-item .file-status {
    display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; white-space: nowrap;
}
.file-item .file-status.pending { background: var(--brand-light); color: var(--brand); border: 1px solid #BEDAFF; }
.file-item .file-status.success { background: #E8FFEA; color: var(--success); border: 1px solid #AFF0B5; }
.file-item .file-status.error { background: #FFEBE8; color: var(--danger); border: 1px solid #FFB4AB; }
.file-item .remove-btn { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 16px; margin-left: 12px; transition: color var(--transition); }
.file-item .remove-btn:hover { color: var(--danger); }

.upload-actions { margin-top: 20px; display: flex; gap: 12px; align-items: center; }
.balance-info { font-size: 14px; color: var(--text-2); }
.balance-info strong { color: var(--brand); font-size: 16px; font-weight: 600; }

.progress-bar-wrap { margin-top: 16px; display: none; }
.progress-bar-wrap .progress { height: 8px; background: var(--bg-hover-strong); border-radius: 999px; overflow: hidden; }
.progress-bar-wrap .progress-bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width var(--transition); width: 0; }
.progress-bar-wrap .progress-text { font-size: 12px; color: var(--text-3); margin-top: 4px; text-align: center; }

.result-summary {
    margin-top: 20px; padding: 16px;
    background: #E8FFEA; border: 1px solid #AFF0B5; border-radius: var(--radius);
    display: none;
}
.result-summary.has-error { background: #FFF7E8; border-color: #FFD591; }
.result-summary .summary-title { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 8px; }
.result-summary .summary-detail { font-size: 13px; color: var(--text-2); line-height: 1.8; }

.rules-box { margin-top: 16px; padding: 16px; background: var(--bg-page); border: 1px solid var(--divider); border-radius: var(--radius); }
.rules-box h6 { font-size: 14px; font-weight: 500; color: var(--text-1); margin: 0 0 8px; }
.rules-box ul { margin: 0; padding-left: 20px; }
.rules-box li { font-size: 14px; color: var(--text-2); line-height: 2; }

/* ---------- 状态标签（圆角色块） ---------- */
.badge,
.pkg-badge,
.file-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 400;
}
.badge-pending,
.pkg-badge.valid { background: var(--brand-light); color: var(--brand); border: 1px solid #BEDAFF; }
.badge-processing { background: #FFF7E8; color: var(--warning); border: 1px solid #FFD591; }
.badge-completed { background: #E8FFEA; color: var(--success); border: 1px solid #AFF0B5; }
.badge-error { background: #FFEBE8; color: var(--danger); border: 1px solid #FFB4AB; }
.badge-expired,
.pkg-badge.expired { background: var(--bg-hover-strong); color: var(--text-3); border: 1px solid var(--divider); }
.pkg-badge.used-up { background: #FFEBE8; color: var(--danger); border: 1px solid #FFB4AB; }

/* ---------- 标签页 ---------- */
.status-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.status-tabs .tab-btn {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--divider);
    background: #fff;
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}
.status-tabs .tab-btn:hover { border-color: var(--brand); color: var(--brand); }
.status-tabs .tab-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 批量操作工具栏 ---------- */
.batch-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
}
.batch-toolbar .sel-count {
    font-size: 13px;
    color: var(--text-2);
    min-width: 70px;
}
.batch-toolbar .page-size-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 13px;
    color: var(--text-3);
}
.batch-toolbar .page-size-select {
    padding: 4px 8px;
    border: 1px solid var(--divider);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-1);
    background: #fff;
    cursor: pointer;
    outline: none;
}
.batch-toolbar .page-size-select:focus {
    border-color: var(--brand);
}

/* 勾选列 */
.col-check { width: 40px; text-align: center; }
.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand);
}

/* ---------- 表格优化 ---------- */
.task-table,
.recharge-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.task-table th,
.recharge-table th {
    background: var(--bg-hover);
    padding: 12px 16px;
    text-align: center;       /* 表头加粗居中 */
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    border-bottom: 1px solid var(--divider);
    vertical-align: middle;
}
.task-table th:first-child,
.recharge-table th:first-child { text-align: left; }  /* 表头首列与内容对齐 */
.task-table td,
.recharge-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-2);
    border-bottom: 1px solid var(--divider);
    text-align: center;       /* 与表头居中对齐，解决列标题与内容不对齐问题 */
    vertical-align: middle;
}
.task-table td:first-child,
.recharge-table td:first-child { text-align: left; }  /* 首列（文件名/名称）左对齐更易阅读 */

/* 导出结果页：下载后 8 小时自动清除提示 */
.result-tip {
    margin: 0 0 14px;
    padding: 9px 14px;
    font-size: 13px;
    color: #634300;
    background: #fff7e6;
    border: 1px solid #ffe1a8;
    border-radius: 8px;
}
.result-tip b { color: #d46b08; }
.task-table tbody tr:nth-child(even),
.recharge-table tbody tr:nth-child(even) { background: var(--bg-hover); }   /* 隔行极浅灰 */
.task-table tbody tr:hover,
.recharge-table tbody tr:hover { background: var(--bg-hover-strong); }       /* hover 高亮 */
.task-table tbody tr,
.recharge-table tbody tr { transition: background var(--transition); }

.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; }
.btn-download { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; transition: background var(--transition), transform var(--transition); }
.btn-download:hover { background: linear-gradient(135deg, var(--brand), var(--brand-2)); transform: translateY(-1px); border-color: transparent; }

/* 操作列按钮组（并列排列，按需换行） */
.action-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.action-muted { color: var(--text-3); font-size: 12px; }

/* 取消处理：主危险操作（红底） */
.btn-cancel-process { background: var(--danger); color: #fff; border-color: var(--danger); transition: background var(--transition), border-color var(--transition); }
.btn-cancel-process:hover { background: #d9362b; border-color: #d9362b; }

/* 删除：次级危险操作（红字描边） */
.btn-delete { background: #fff; color: var(--danger); border: 1px solid var(--danger); transition: background var(--transition); }
.btn-delete:hover { background: #fff1f0; }

/* 立即删除：下载后的强提醒删除（红底） */
.btn-immediate-delete { background: var(--danger); color: #fff; border-color: var(--danger); transition: background var(--transition), border-color var(--transition); }
.btn-immediate-delete:hover { background: #d9362b; border-color: #d9362b; }
.btn-refresh {
    background: #fff; border: 1px solid var(--divider); color: var(--text-2);
    border-radius: var(--radius-sm); font-size: 14px; padding: 6px 16px; cursor: pointer;
    transition: all var(--transition);
}
.btn-refresh:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 16px; }
.pagination .page-btn {
    padding: 4px 10px; border: 1px solid var(--divider); background: #fff;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text-1);
    transition: all var(--transition);
}
.pagination .page-btn:hover { border-color: var(--brand); color: var(--brand); }
.pagination .page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-3); font-size: 14px; }
.no-package { text-align: center; padding: 30px; color: var(--text-3); font-size: 14px; }

/* ---------- 弹窗（业务确认弹窗） ---------- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .45); z-index: 1000;
    display: none; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    padding: 24px; width: 420px; max-width: 90%;
}
.modal-box h5 { font-size: 16px; font-weight: 500; color: var(--text-1); margin: 0 0 16px; }
.modal-box p { font-size: 14px; color: var(--text-2); margin: 0 0 20px; }
.modal-box .modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-box .btn-cancel {
    padding: 6px 16px; border: 1px solid var(--divider); background: #fff;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--text-2);
    transition: all var(--transition);
}
.modal-box .btn-cancel:hover { border-color: var(--brand); color: var(--brand); }
.modal-box .btn-confirm {
    padding: 6px 16px; border: 1px solid var(--brand); background: var(--brand);
    border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: #fff;
    transition: background var(--transition), border-color var(--transition);
}
.modal-box .btn-confirm:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.modal-box .btn-confirm:disabled { background: #A3C6F5; border-color: #A3C6F5; cursor: not-allowed; }
.modal-box .order-info { background: var(--bg-page); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.modal-box .order-info .row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.modal-box .order-info .row:last-child { margin-bottom: 0; }
.modal-box .order-info .row .label { color: var(--text-2); }
.modal-box .order-info .row .value { color: var(--text-1); font-weight: 500; }
.modal-box .order-info .row .value.price { color: var(--text-1); font-size: 18px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    padding: 10px 24px; border-radius: var(--radius);
    font-size: 14px; color: #fff; z-index: 2000; display: none;
    box-shadow: var(--shadow-card);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- 信息余额查询（科技感升级） ---------- */
/* 总览英雄卡：深色玻璃 + 渐变发光 + 细网格，仅一条进度条显示剩余可用积分 */
.balance-hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(0, 229, 255, .14) 0%, rgba(0, 229, 255, 0) 46%),
    linear-gradient(135deg, #0A1B33 0%, #0E2A52 55%, #103A6B 100%);
  border: 1px solid rgba(80, 160, 255, .22);
  box-shadow: 0 10px 28px rgba(10, 27, 51, .30), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: #EAF4FF;
}
/* 细网格纹理（右上角渐隐） */
.balance-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(120% 120% at 100% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 120% at 100% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}
/* 右上发光球 */
.balance-hero::after {
  content: "";
  position: absolute;
  top: -48px; right: -28px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(0, 229, 255, .30) 0%, rgba(22, 119, 255, 0) 70%);
  filter: blur(6px);
  pointer-events: none;
}
.balance-hero > * { position: relative; z-index: 1; }

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-label { font-size: 12px; letter-spacing: .06em; color: #9FC6FF; }
.hero-balance { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.hero-num {
  font-size: 40px; font-weight: 700; line-height: 1; color: #FFFFFF;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  text-shadow: 0 0 16px rgba(0, 229, 255, .40);
}
.hero-unit { font-size: 14px; color: #9FC6FF; }
.hero-recharge {
  display: inline-block; padding: 7px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: #EAF4FF; text-decoration: none;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(120, 200, 255, .45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  white-space: nowrap;
  transition: all .2s ease;
}
.hero-recharge:hover {
  background: rgba(0, 229, 255, .16);
  border-color: rgba(0, 229, 255, .85);
  box-shadow: 0 0 14px rgba(0, 229, 255, .45);
  color: #fff;
}
.hero-progress {
  position: relative; height: 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
  overflow: hidden; margin-top: 14px;
}
.hero-progress-bar {
  position: relative; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #00E5FF 0%, #36A2FF 50%, #1677FF 100%);
  box-shadow: 0 0 10px rgba(0, 229, 255, .55);
  transition: width .9s cubic-bezier(.22, 1, .36, 1);
}
/* 流光 */
.hero-progress-bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
  animation: heroShimmer 2.4s ease-in-out infinite;
}
@keyframes heroShimmer { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(220%); } }

.hero-meta { display: flex; gap: 28px; margin-top: 12px; flex-wrap: wrap; }
.hero-meta-item { display: flex; flex-direction: column; gap: 3px; }
.hm-label { font-size: 12px; color: #8FB4E0; }
.hm-val { font-size: 15px; font-weight: 600; color: #EAF4FF; font-variant-numeric: tabular-nums; }

/* 套餐列表（精简信息卡，移逐套餐进度条，仅顶部一条总览进度条） */
.package-list { margin-top: 4px; }
.package-card {
  position: relative;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  transition: all var(--transition);
}
.package-card:hover { border-color: rgba(91, 108, 249, .45); box-shadow: 0 4px 16px rgba(91, 108, 249, .10); }
.package-card.expired { opacity: .6; }
.package-card .pkg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.package-card .pkg-name { font-size: 16px; color: var(--text-1); font-weight: 500; }
.package-card .pkg-info { display: flex; gap: 24px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.package-card .pkg-info span strong { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.pkg-expire { font-size: 12px; color: var(--text-3); }
.pkg-expire .capsule { display: inline-block; padding: 1px 8px; background: #EAF6FF; color: var(--brand); border: 1px solid #BEDAFF; border-radius: 10px; font-size: 12px; }

/* ---------- 套餐充值 ---------- */
.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pkg-card {
    background: #fff; border-radius: var(--radius); border: 1px solid var(--divider);
    box-shadow: var(--shadow-card);
    padding: 24px; text-align: center; position: relative; cursor: pointer;
    transition: all var(--transition);
}
.pkg-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(91, 108, 249, .10); }
.pkg-card.priority { border-top: 3px solid var(--danger); }
.pkg-card .pkg-tag {
    position: absolute; top: 12px; right: 12px;
    background: #FFEBE8; color: var(--danger); border: 1px solid #FFB4AB;
    border-radius: 10px; padding: 1px 8px; font-size: 12px;
}
.pkg-card .pkg-name { font-size: 16px; color: var(--text-1); font-weight: 500; margin-bottom: 12px; }
.pkg-card .pkg-price { margin-bottom: 8px; }
.pkg-card .pkg-price .current { font-size: 28px; color: var(--text-1); font-weight: 600; }
.pkg-card .pkg-price .original { font-size: 14px; color: var(--text-3); text-decoration: line-through; margin-left: 8px; }
.pkg-card .pkg-points { font-size: 15px; color: var(--brand); font-weight: 500; margin-bottom: 12px; }
.pkg-card .pkg-duration { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.pkg-card .pkg-features { text-align: left; margin-bottom: 20px; padding-left: 0; }
.pkg-card .pkg-features li { font-size: 14px; color: var(--text-2); line-height: 2; list-style: none; }
.pkg-card .pkg-features li:before { content: "\2713"; color: var(--success); margin-right: 8px; }
.pkg-card .btn-recharge { width: 100%; }

/* ---------- 联系客服 ---------- */
.contact-area { text-align: center; padding: 40px 20px; }
.contact-area .qrcode-wrap { margin-bottom: 24px; }
.contact-area .qrcode-wrap img { max-width: 200px; max-height: 200px; border: 1px solid var(--divider); border-radius: var(--radius); }
.contact-area .qrcode-wrap .no-qrcode { display: inline-block; width: 200px; height: 200px; line-height: 200px; background: var(--bg-page); border-radius: var(--radius); color: var(--text-3); font-size: 14px; text-align: center; }
.contact-area .wechat-info { margin-top: 16px; }
.contact-area .wechat-label { font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.contact-area .wechat-id { font-size: 20px; color: var(--text-1); font-weight: 600; display: inline-block; margin-right: 12px; }
.btn-copy {
    background: var(--brand); border: none; color: #fff;
    border-radius: var(--radius-sm); font-size: 13px; padding: 6px 16px;
    cursor: pointer; vertical-align: middle; transition: background var(--transition);
}
.btn-copy:hover { background: var(--brand-hover); }
.btn-copy.copied { background: var(--success); }
.contact-desc { font-size: 12px; color: var(--text-3); margin-top: 16px; }

/* ============================================================
   移动端适配（屏幕宽度 ≤ 768px）
   目标：手机浏览器中，左侧固定导航转为顶部横向滚动胶囊菜单，
   表格横向滚动，表单/按钮触控友好，保证浏览与操作体验。
   所有规则仅作用于窄屏，不影响桌面端布局。
   ============================================================ */
@media (max-width: 768px) {
    img { max-width: 100%; }
    button, a, input, select, textarea { touch-action: manipulation; }

    /* 顶部导航：吸顶、高度压缩、单行容纳 */
    .top-nav {
        position: sticky;
        top: 0;
        height: 50px;
        padding: 0 12px;
        z-index: 200;
        flex-wrap: nowrap;
    }
    .top-nav .logo { font-size: 16px; letter-spacing: 0; gap: 8px; }
    .top-nav .logo::before { width: 32px; height: 32px; border-radius: 8px; }
    .top-nav .user-info { font-size: 13px; gap: 8px; }
    /* 右上角胶囊在窄屏收缩，避免与 LOGO 争位 */
    .ubadge { height: 30px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
    .ub-dot { width: 19px; height: 19px; font-size: 10px; }
    .ub-out { padding: 3px 8px; font-size: 11.5px; }

    /* 左侧导航 → 顶部横向滚动胶囊菜单（纯 CSS，无需 JS） */
    .sidebar {
        position: sticky;
        top: 50px;
        left: auto; right: auto; bottom: auto;
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 10px;
        border-right: none;
        border-bottom: 1px solid var(--divider);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
        z-index: 90;
    }
    .sidebar .menu-item {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 14px;
        border-left: none;
        border-radius: 999px;
        background: var(--bg-hover);
        font-size: 13px;
    }
    .sidebar .menu-item.active { background: var(--brand); color: #fff; border-left: none; }

    /* 主内容区占满宽度 */
    .main-content { margin-left: 0; margin-top: 0; padding: 14px 12px; }

    /* 页面标题纵向排列，操作按钮换行占满 */
    .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .page-header > div { display: flex; flex-wrap: wrap; gap: 10px; }
    .page-header .btn-download { flex: 1; justify-content: center; }

    .card { padding: 16px 14px; }

    /* 上传区、按钮、文件列表 */
    .upload-area { padding: 32px 14px; }
    .upload-actions { flex-wrap: wrap; }
    .upload-actions .btn { flex: 1; text-align: center; }
    .file-item { flex-wrap: wrap; gap: 6px; }
    .file-item .file-size { margin: 0; }

    /* 表格横向滚动 */
    .task-table,
    .recharge-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 100%; }
    .task-table th, .task-table td,
    .recharge-table th, .recharge-table td { white-space: nowrap; }
    .card > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .card > table th, .card > table td { white-space: nowrap; }

    /* 弹窗占满屏幕 */
    .modal-box { width: auto; max-width: calc(100vw - 24px); padding: 18px 16px; }

    /* 触控友好的按钮尺寸 */
    .btn-primary, .btn-outline, .btn-recharge, .btn-download { padding: 10px 18px; }
    .pagination { justify-content: center; flex-wrap: wrap; }

    /* 余额英雄卡适度压缩 */
    .hero-num { font-size: 32px; }
    .balance-hero { padding: 16px; }
    .hero-meta { gap: 16px; }
}

/* 超小屏进一步压缩（≤480px） */
@media (max-width: 480px) {
    .top-nav .logo { font-size: 15px; gap: 6px; }
    .top-nav .logo::before { width: 28px; height: 28px; border-radius: 7px; }
    .hero-num { font-size: 28px; }
    .balance-hero { padding: 14px; }
    .card { padding: 14px 12px; }
    .upload-area { padding: 26px 12px; }
}
