/* ============================================================
 * wx_user_card.css — 用户中心卡片样式唯一来源（A01-A04 样式收敛）
 *
 * 合并自（本文件现为以下内联样式块的唯一载体）：
 *   - wx_user.php  wx_htjfk() 通用样式块 + dark-mode 段（A01）
 *   - wx_user.php  wx_htjfk() 的 .wx-uc-outer 容器块（A01）
 *   - wx_user.php  wx_admin_cards_style() 内联样式（A01）
 *   - wx_user.php  wx_suid_js_output() 的 .wx-suid-badge 段（A04）
 *   - wx_user_level.php  wx_level_style() 静态 tooltip 段（A03，动态尺寸仍内联）
 *   - wx_user_events_card.php  的 .wx-ev-item 块（A04）
 *
 * wx_card 渐变开关类化（A02）：卡片元素按 display_config 输出
 *   .wx-card-gradient（渐变）或 .wx-card-plain（默认），不再输出条件 <style>。
 *
 * 作用域说明（保持与原内联输出一致，避免前后台互相污染）：
 *   - #wx-user-uc-wrap …  仅后台仪表盘卡片（前台卡片外层为 .wx-uc-outer，无此 id）；
 *   - .wx-uc-outer …     仅前台用户中心卡片；
 *   - 全局选择器与原内联输出的生效范围一致（wx_admin_cards_style 原本就在
 *     index_head 站点级输出，前台全站/后台均生效）。
 *
 * 版本化 ?v= 用于 CDN 缓存失效，修改后请同步 bump（当前 20260828c）。
 * ============================================================ */

/* —— 卡片布局基础（后台 #wx-user-uc-wrap 作用域；前台等价规则见 .wx-uc-outer 段）—— */
#wx-user-uc-wrap .wx-uc-card .list-group-item { padding: 6px 14px; font-size: 13px; border-left: none; border-right: none; }
#wx-user-uc-wrap .wx-uc-card .list-group-item:first-child { border-top: none; }
#wx-user-uc-wrap .wx-uc-card .list-group-item:last-child { border-bottom: none; }
#wx-user-uc-wrap .wx-uc-card .num { color: #e17055; font-weight: 700; }
#wx-user-uc-wrap .col { display:flex; }
#wx-user-uc-wrap .col .card { flex:1; }
#wx-user-uc-wrap .wx-uc-card { height: 420px; display:flex; flex-direction:column; border-radius: 12px; overflow: hidden; }
#wx-user-uc-wrap .wx-uc-card .card-body { flex:1; min-height:0; }
#wx-user-uc-wrap .wx-uc-scroll { flex:1; overflow-y:auto; min-height:0; }
#wx-user-uc-wrap .wx-uc-fixed { flex-shrink:0; }

/* —— 卡片列容器（.wx-admin-cards 包裹层）—— */
.wx-admin-cards .d-flex { gap: 12px; }
.wx-admin-cards { padding-left: 0; padding-right: 0; }
.wx-admin-cards .col.px-2 { padding-left: 0 !important; padding-right: 0 !important; }
.wx-admin-cards .col.mb-4 { margin-bottom: 0 !important; }

/* —— 账单 / 积分条 / 按钮（A01：自 wx_admin_cards_style 内联块迁移，原为全局选择器）—— */
.wx-bill-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px !important; font-size: 13px; }
.wx-bill-item .bill-left { flex: 1; min-width: 0; }
.wx-bill-item .bill-order { font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-bill-item .bill-time { font-size: 13px; color: #999; }
.wx-bill-item .bill-amount { font-weight: 700; white-space: nowrap; margin-left: 12px; font-size: 14px; }
.wx-bill-item .bill-amount.plus { color: #52c41a; }
.wx-bill-item .bill-amount.minus { color: #ff4d4f; }
.wx-bill-pages { display: flex; gap: 4px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.wx-bill-pages a { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 4px; font-size: 11px !important; border-radius: 4px; color: #e17055; background: #fef5e7; border: 1px solid #f5d6c6; text-decoration: none; transition: all 0.15s; }
.wx-bill-pages a:hover { background: #e4e6ff; }
.wx-bill-pages a.active { background: #e17055; color: #fff; border-color: transparent; }
.wx-credit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wx-credit-bar .credit-num { font-size: 18px; font-weight: 700; color: #e17055; line-height: 1; vertical-align: baseline; }
.wx-credit-bar form { display: inline-flex; margin: 0 !important; padding: 0 !important; line-height: 1; }
.wx-credit-bar .btn { border-radius: 6px; font-size: 13px !important; padding: 5px 12px !important; border: 1.5px solid transparent; transition: all 0.15s; line-height: 1.4; height: 31px; display: inline-flex; align-items: center; cursor: pointer; box-sizing: border-box; -webkit-appearance: none; white-space: nowrap !important; }
.wx-credit-bar .btn-primary { background: linear-gradient(135deg, #e17055, #fdcb6e); color: #fff; }
.wx-credit-bar .btn-primary:hover { opacity: 0.85; }
.wx-credit-bar .btn-outline { background: #fff; color: #e17055; border: 1.5px solid #e17055; }
.wx-credit-bar .btn-outline:hover { background: #e17055; color: #fff; }

/* —— 经验值进度条（白色扫光）与明细行（A01）—— */
.wx-exp-bar { height:6px; background:#f0f0f5; border-radius:3px; margin-bottom:12px; overflow:hidden; position:relative; }
.wx-exp-bar-inner { height:100%; border-radius:3px; background:linear-gradient(90deg,#e17055,#fdcb6e); position:relative; overflow:hidden; transition:width 0.3s; }
.wx-exp-bar-inner::before { content:""; position:absolute; top:0; left:-60px; width:60px; height:100%; background:linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent); animation:wxExpSweep 2.5s ease-in-out infinite; }
@keyframes wxExpSweep { 0%{left:-60px} 40%{left:calc(100% - 60px)} 100%{left:calc(100% - 60px)} }
.wx-exp-row { display:flex; justify-content:space-between; align-items:center; }
.wx-exp-row .exp-detail { font-size:11px; color:#bbb; margin-left:4px; }

/* —— 等级徽章 + tooltip 静态段（A03：自 wx_user_level.php / wx_admin_cards_style 迁移。
      wx_level_style() 的动态尺寸（icon_height 等来自 Storage）仍以内联 <style> 覆盖，
      其加载位置在动态块之后，覆盖关系与原内联输出一致）—— */
.user_level { display:inline-flex; align-items:center; gap:2px; height:20px; line-height:1; }
.level_icon { display:inline-flex; align-items:center; justify-content:center; }
.level_icon img { max-height:20px!important; width:auto!important; border-radius:2px!important; object-fit:contain!important; display:inline-block!important; }
.user_level_badge { display:inline-block; height:16px; line-height:16px; padding:0 4px; font-size:10px; text-align:center; background-color:#ff8383!important; color:#fff!important; border-radius:2px; }
.user_level_badge.writer { background-color:#6eceff!important; }
.user_level_badge_wrap { display:inline-flex; cursor:pointer; outline:none; }
.level_tooltip { display:none; position:fixed; background:#1a1a2e; color:#e0e0e0; padding:10px 14px; border-radius:8px; font-size:12px; line-height:1.6; white-space:nowrap; z-index:999999; box-shadow:0 4px 16px rgba(0,0,0,0.3); pointer-events:none; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.level_tooltip .tt_arrow { position:absolute; bottom:100%; left:50%; margin-left:-6px; width:0; height:0; border:6px solid transparent; border-bottom-color:#1a1a2e; }
.level_tooltip .tt_title { font-weight:600; color:#fff; margin-bottom:2px; font-size:13px; }
.level_tooltip .tt_divider { height:1px; background:rgba(255,255,255,0.1); margin:4px 0; }
.level_tooltip .tt_row { display:flex; justify-content:space-between; gap:24px; }
.level_tooltip .tt_row .tt_val { font-weight:500; color:#fff; }
.level_tooltip .tt_total { font-weight:700; color:#e17055; }
.level_tooltip .tt_hint { color:#f0c040; font-size:11px; margin-top:2px; }

/* —— 靓号徽章（A04：自 wx_suid_js_output 迁移）—— */
.wx-suid-badge { display:inline-flex; align-items:center; gap:3px; vertical-align:middle; }
.wx-suid-badge img { height:16px; width:auto; border-radius:2px; }

/* —— 活动报名条目（A04：自 wx_render_events_card 内联块迁移）—— */
.wx-ev-item { display:flex; flex-direction:column; gap:4px; padding:10px 14px !important; }
.wx-ev-title { font-weight:600; color:#333; text-decoration:none; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wx-ev-title:hover { color:#e17055; }
.wx-ev-meta { display:flex; flex-wrap:wrap; gap:4px 16px; font-size:12px; color:#888; }
.wx-ev-btn-qr { font-size:12px; padding:2px 10px; border-radius:4px; background:#e17055; color:#fff; border:none; cursor:pointer; }
.wx-ev-btn-qr:hover { opacity:0.85; }
/* 🌙 深色模式（作用域与原内联块一致：仅前台 .wx-uc-outer 容器） */
html[data-theme="dark"] .wx-uc-outer .wx-ev-title { color:#c0c0d0; }
html[data-theme="dark"] .wx-uc-outer .wx-ev-title:hover { color:#e17055; }
html[data-theme="dark"] .wx-uc-outer .wx-ev-meta { color:#888; }
html[data-theme="dark"] .wx-uc-outer .wx-ev-item { background:#1e1e2a; border-color:#3a3a50; }

/* —— Tab 基础（A01：自 wx_htjfk .wx-uc-outer 块迁移，原为全局选择器）—— */
.tab-pane { display:none; }
.tab-pane.active { display:block; }
.wx-tab-link { display:inline-block; padding:12px 16px; font-size:13px; cursor:pointer; text-decoration:none !important; white-space:nowrap; }
/* 后台作用域版本（原有规则保持） */
#wx-user-uc-wrap .tab-pane { display:none; }
#wx-user-uc-wrap .tab-pane.active { display:block; }
#wx-user-uc-wrap .wx-tab-link { display:inline-block; padding:12px 16px; font-size:13px; cursor:pointer; text-decoration:none !important; white-space:nowrap; color:rgba(255,255,255,0.8); }
#wx-user-uc-wrap .wx-tab-link.active,
#wx-user-uc-wrap .wx-tab-link:hover { color:#fff; background:rgba(0,0,0,0.15); }

/* ============================================================
 * wx_card 渐变开关类化（A02）
 * ============================================================ */

/* —— 前台容器 .wx-uc-outer（A01：自 wx_htjfk 内联块迁移）—— */
.wx-uc-outer .wx-uc-card { min-height:400px; display:flex; flex-direction:column; border-radius: 12px; overflow:hidden; }
.wx-uc-outer .wx-uc-card .card-body { flex:1; min-height:0; }
.wx-uc-outer .wx-uc-scroll { flex:1; overflow-y:auto; min-height:0; max-height:320px; }
.wx-uc-outer .wx-uc-fixed { flex-shrink:0; }
/* 卡片头部几何（原条件块两分支公共部分） */
.wx-uc-outer .wx-uc-card .card-header { padding: 0; border-radius:12px 12px 0 0; overflow:hidden; }
/* 开：渐变头部 */
.wx-uc-outer .wx-uc-card.wx-card-gradient .card-header { background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%); border-bottom: none; }
/* 关：Emlog 默认头部 */
.wx-uc-outer .wx-uc-card.wx-card-plain .card-header { background: rgba(0,0,0,.03); border-bottom: 1px solid rgba(0,0,0,.125); }
/* Tab 链接配色（原条件块，按类分流） */
.wx-uc-outer .wx-uc-card.wx-card-gradient .wx-tab-link { color:rgba(255,255,255,0.8); }
.wx-uc-outer .wx-uc-card.wx-card-gradient .wx-tab-link.active,
.wx-uc-outer .wx-uc-card.wx-card-gradient .wx-tab-link:hover { color:#fff; background:rgba(0,0,0,0.15); }
.wx-uc-outer .wx-uc-card.wx-card-plain .wx-tab-link { color:#666; }
.wx-uc-outer .wx-uc-card.wx-card-plain .wx-tab-link.active { color:#fff; background:rgba(0,0,0,0.10); border-bottom:2px solid #e17055; font-weight:600; }

/* —— 后台卡片头部（A01：自 wx_admin_cards_style 条件块迁移，按类分流）—— */
#wx-user-uc-wrap .wx-uc-card .card-header { padding: 0; }
#wx-user-uc-wrap .wx-uc-card.wx-card-gradient .card-header { font-size: 14px; font-weight: 600; background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%); color: #fff; border-bottom: none; display: flex; align-items: center; gap: 6px; }
#wx-user-uc-wrap .wx-uc-card.wx-card-gradient .card-header .header-badge { margin-left: auto; background: rgba(255,255,255,0.2); padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 400; }
#wx-user-uc-wrap .wx-uc-card.wx-card-plain .card-header { background: rgba(0,0,0,.03); border-bottom: 1px solid rgba(0,0,0,.125); color: inherit; }
#wx-user-uc-wrap .wx-uc-card.wx-card-plain .card-header .header-badge { margin-left: auto; background: rgba(0,0,0,.05); padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 400; color: #999; }
/* 🌙 深色模式：wx_card 关闭时头部使用深色背景（原 wx_card 关闭分支内联） */
html[data-theme="dark"] #wx-user-uc-wrap .wx-uc-card.wx-card-plain .card-header {
    background: #2a2a3c !important;
    border-color: #3a3a50 !important;
    color: #c0c0d0 !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-uc-card.wx-card-plain .card-header .header-badge {
    background: rgba(255,255,255,0.08) !important;
    color: #888 !important;
}

/* 🌙 三卡片深色模式（后台 #wx-user-uc-wrap，原有规则保持） */
html[data-theme="dark"] #wx-user-uc-wrap .card {
    background: #1e1e2a;
    border-color: #3a3a50;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .list-group-item {
    background: #1e1e2a;
    border-color: #3a3a50;
    color: #c0c0d0;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .list-group-item .bill-order {
    color: #888 !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .list-group-item .bill-time {
    color: #666 !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .list-group-item[style*="color:#666"] {
    color: #aaa !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-bill-pages a {
    background: #333348;
    border-color: #44445a;
    color: #e17055;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-bill-pages a:hover {
    background: #44445a;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-bill-pages a.active {
    background: #e17055;
    color: #fff;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-credit-bar .btn-outline {
    background: transparent;
    color: #e17055;
    border-color: #e17055;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-credit-bar .btn-outline:hover {
    background: #e17055;
    color: #fff;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .wx-exp-bar {
    background: #2a2a3c;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .wx-uc-fixed .btn-outline-secondary {
    background: transparent !important;
    color: #c0c0d0 !important;
    border-color: #44445a !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .wx-uc-fixed .btn-outline-secondary:hover {
    background: #44445a !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .wx-uc-fixed .btn-outline-danger {
    background: transparent !important;
    border-color: #4a2020 !important;
    color: #ff6b6b !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .wx-uc-fixed .btn-outline-danger:hover {
    background: #2a1a1a !important;
}
/* 🌙 Tab 内容区深色模式 */
html[data-theme="dark"] #wx-user-uc-wrap .card-body.tab-content {
    background: #1e1e2a;
    border-color: #3a3a50;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-uc-scroll {
    background: transparent;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-uc-fixed {
    border-color: #3a3a50 !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-uc-fixed > div {
    border-color: #3a3a50 !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .card .list-group-item[style*="font-weight:600;color:#666"] {
    color: #aaa !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-exp-row .exp-detail {
    color: #666 !important;
}
/* 🌙 Tab 链接深色模式 */
html[data-theme="dark"] #wx-user-uc-wrap .wx-tab-link {
    color: #eee !important;
}
html[data-theme="dark"] #wx-user-uc-wrap .wx-tab-link.active,
html[data-theme="dark"] #wx-user-uc-wrap .wx-tab-link:hover {
    color: #fff !important;
    border-bottom-color: #fff !important;
}

/* 🌙 前台容器 .wx-uc-outer 深色模式（A01：自 wx_htjfk 内联块迁移） */
html[data-theme="dark"] .wx-uc-outer .card { background:#1e1e2a; border-color:#3a3a50; }
html[data-theme="dark"] .wx-uc-outer .card .list-group-item { background:#1e1e2a; border-color:#3a3a50; color:#c0c0d0; }
html[data-theme="dark"] .wx-uc-outer .card .list-group-item .bill-order { color:#888 !important; }
html[data-theme="dark"] .wx-uc-outer .card .list-group-item .bill-time { color:#666 !important; }
html[data-theme="dark"] .wx-uc-outer .wx-bill-pages a { background:#333348; border-color:#44445a; color:#e17055; }
html[data-theme="dark"] .wx-uc-outer .wx-bill-pages a:hover { background:#44445a; }
html[data-theme="dark"] .wx-uc-outer .wx-bill-pages a.active { background:#e17055; color:#fff; }
html[data-theme="dark"] .wx-uc-outer .wx-credit-bar .btn-outline { background:transparent; color:#e17055; border-color:#e17055; }
html[data-theme="dark"] .wx-uc-outer .wx-credit-bar .btn-outline:hover { background:#e17055; color:#fff; }
html[data-theme="dark"] .wx-uc-outer .card .wx-exp-bar { background:#2a2a3c; }
html[data-theme="dark"] .wx-uc-outer .card-body.tab-content { background:#1e1e2a; }
html[data-theme="dark"] .wx-uc-outer .wx-uc-scroll { background:transparent; }
html[data-theme="dark"] .wx-uc-outer .wx-uc-fixed { border-color:#3a3a50 !important; }
html[data-theme="dark"] .wx-uc-outer .wx-uc-fixed > div { border-color:#3a3a50 !important; }
html[data-theme="dark"] .wx-uc-outer .card .list-group-item[style*="font-weight:600;color:#666"] { color:#aaa !important; }
html[data-theme="dark"] .wx-uc-outer .wx-exp-row .exp-detail { color:#666 !important; }
/* 🌙 Tab 链接 */
html[data-theme="dark"] .wx-uc-outer .wx-tab-link { color:#eee !important; }
html[data-theme="dark"] .wx-uc-outer .wx-tab-link.active,
html[data-theme="dark"] .wx-uc-outer .wx-tab-link:hover { color:#fff !important; border-bottom-color:#fff !important; }
