/* 会员群推广后台样式：蓝紫渐变主视觉 + 卡片化列表 + 弹窗式模板选择 / 支付后跳转设置 */
:root{--mg-grad:linear-gradient(135deg,#8b5cf6 0%,#6366f1 55%,#3b82f6 100%);--mg-line:#e8ebf4;--mg-text:#0f172a;--mg-sub:#64748b;--mg-muted:#94a3b8;--mg-primary:#7c3aed}
.mg-admin-app{min-height:100vh;background:radial-gradient(1200px 400px at 80% -120px,rgba(124,58,237,.08),transparent 70%),#f4f6fb}
.mg-main{min-height:100vh}
body.mg-lock{overflow:hidden}

/* 顶栏 */
.mg-topbar{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:28px 30px;margin-bottom:20px;border-radius:20px;background:radial-gradient(circle at 88% -30%,rgba(255,255,255,.22),transparent 45%),linear-gradient(120deg,#4c1d95 0%,#5b21b6 38%,#2563eb 100%);color:#fff;box-shadow:0 22px 44px -14px rgba(76,29,149,.5)}
.mg-topbar::before{content:'';position:absolute;width:280px;height:280px;right:-70px;bottom:-170px;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.mg-topbar::after{content:'';position:absolute;width:140px;height:140px;left:42%;top:-90px;border-radius:50%;background:rgba(255,255,255,.06);pointer-events:none}
.mg-topbar>*{position:relative;z-index:1}
.mg-topbar small{display:inline-flex;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);font-size:11px;font-weight:700;letter-spacing:2.5px}
.mg-topbar h1{margin:10px 0 6px;font-size:28px;font-weight:800;letter-spacing:.5px;color:#fff}
.mg-topbar p{margin:0;font-size:13px;line-height:1.7;opacity:.85;max-width:620px}
.mg-top-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#topUserActions{display:contents}
.mg-top-actions button,.mg-top-actions a{min-height:40px;padding:0 18px;border:0;border-radius:12px;font-size:14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;background:#fff;color:#5b21b6;box-shadow:0 10px 24px rgba(15,23,42,.2);transition:transform .15s,background .15s,box-shadow .15s}
.mg-top-actions button.ghost,.mg-top-actions a.ghost{background:rgba(255,255,255,.12);color:#fff;box-shadow:none;border:1px solid rgba(255,255,255,.3);backdrop-filter:blur(6px)}
.mg-top-actions button:hover,.mg-top-actions a:hover{transform:translateY(-1px);text-decoration:none}
.mg-top-actions button.ghost:hover,.mg-top-actions a.ghost:hover{background:rgba(255,255,255,.22);color:#fff}

/* 概览统计条 */
.stats,.finance-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:20px}
.stat{position:relative;overflow:hidden;padding:18px 20px 18px 22px;border-radius:16px;background:#fff;border:1px solid var(--mg-line);box-shadow:0 6px 18px rgba(15,23,42,.04);transition:transform .2s,box-shadow .2s}
.stat:hover{transform:translateY(-2px);box-shadow:0 14px 28px -10px rgba(15,23,42,.14)}
.stat::before{content:'';position:absolute;left:0;top:18px;bottom:18px;width:4px;border-radius:0 4px 4px 0;background:var(--c,#7c3aed)}
.stat::after{content:'';position:absolute;right:-26px;top:-26px;width:90px;height:90px;border-radius:50%;background:var(--c,#7c3aed);opacity:.07}
.stat:nth-child(5n+1){--c:#7c3aed}
.stat:nth-child(5n+2){--c:#2563eb}
.stat:nth-child(5n+3){--c:#0ea5e9}
.stat:nth-child(5n+4){--c:#10b981}
.stat:nth-child(5n+5){--c:#f59e0b}
.stat span{display:block;font-size:13px;color:var(--mg-sub);margin-bottom:8px}
.stat b{font-size:26px;font-weight:800;color:var(--mg-text);letter-spacing:.3px}
.stat b.hl{color:var(--mg-primary)}

/* tab：分段控件 */
.tabs{display:flex;width:fit-content;max-width:100%;flex-wrap:wrap;gap:4px;padding:5px;margin-bottom:18px;border-radius:14px;background:#fff;border:1px solid var(--mg-line);box-shadow:0 4px 14px rgba(15,23,42,.04)}
.tabs button{position:relative;min-height:38px;padding:0 20px;border:0;border-radius:10px;background:transparent;color:#475569;font-size:14px;font-weight:700;cursor:pointer;transition:background .15s,color .15s}
.tabs button:hover{background:#f5f3ff;color:#6d28d9}
.tabs button.active{background:var(--mg-grad);color:#fff!important;box-shadow:0 8px 18px -6px rgba(99,102,241,.6)}
.tabs button.active:hover,.tabs button.active:focus{background:var(--mg-grad);color:#fff!important;filter:brightness(1.06)}
.mg-tab-dot{position:absolute;top:5px;right:7px;width:9px;height:9px;border:2px solid #fff;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,.16);animation:mgPendingPulse 1.8s ease-in-out infinite}
.mg-tab-dot[hidden]{display:none}
@keyframes mgPendingPulse{0%,100%{box-shadow:0 0 0 2px rgba(239,68,68,.14)}50%{box-shadow:0 0 0 6px rgba(239,68,68,0)}}
@media(prefers-reduced-motion:reduce){.mg-tab-dot{animation:none}}
.tab{display:none}
.tab.active{display:block;animation:mgFade .25s ease}
.mg-subtabs{display:flex;gap:4px;padding:4px;border-radius:10px;background:#f1f5f9}
/* 推广记录子标签位于 panel-head 内，需高于通用 .panel-head button，避免未选中项也被刷成蓝色按钮 */
.panel-head .mg-subtabs button{min-height:44px;padding:0 18px;border:0;border-radius:9px;background:transparent;box-shadow:none;font-size:14px;font-weight:700;color:var(--mg-sub);cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.panel-head .mg-subtabs button:hover{background:#e9eef7;color:#4f46e5;transform:none;filter:none;box-shadow:none}
.panel-head .mg-subtabs button.active{background:#fff;color:#172033;box-shadow:0 2px 10px rgba(15,23,42,.1)}

/* 面板 */
.panel{padding:22px 24px;margin-bottom:18px;border-radius:18px;background:#fff;border:1px solid var(--mg-line);box-shadow:0 8px 24px rgba(15,23,42,.04)}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.panel-head h2{display:flex;align-items:center;gap:8px;margin:0 0 6px;font-size:18px;font-weight:800;color:var(--mg-text)}
.panel-head h2::before{content:'';width:4px;height:16px;border-radius:4px;background:var(--mg-grad)}
.panel-head p{margin:0;font-size:13px;line-height:1.6;color:var(--mg-sub);max-width:720px}
.panel-head button{min-height:38px;padding:0 16px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px -8px rgba(99,102,241,.7);transition:transform .15s,filter .15s}
.panel-head button:hover{transform:translateY(-1px);filter:brightness(1.05)}
.panel-head button.ghost{background:#fff;color:#6d28d9;border:1px solid #ddd6fe;box-shadow:none}
.panel-head button.ghost:hover{background:#f5f3ff}
.panel-head .mg-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.panel-head .mg-head-actions button{min-height:34px}
.mg-pay-alarm{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid #fecaca;border-radius:12px;background:#fef2f2;color:#7f1d1d}
.mg-pay-alarm[hidden]{display:none}
.mg-pay-alarm>i{flex:0 0 28px;height:28px;border-radius:50%;background:#ef4444;color:#fff;font-style:normal;font-weight:800;display:flex;align-items:center;justify-content:center}
.mg-pay-alarm>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mg-pay-alarm>div b{font-size:14px}
.mg-pay-alarm>div span{font-size:12.5px;line-height:1.6;color:#991b1b}
.mg-pay-alarm button.ghost{flex:0 0 auto;min-height:32px;padding:0 12px;border:1px solid #fca5a5;border-radius:8px;background:#fff;color:#b91c1c;font-size:12.5px;font-weight:700;cursor:pointer}
.mg-pay-alarm .mg-pay-alarm-x{flex:0 0 auto;width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#b91c1c;font-size:18px;line-height:1;cursor:pointer}
.mg-pay-alarm .mg-pay-alarm-x:hover{background:rgba(239,68,68,.12)}
.mg-pay-alarm.ok{border-color:#bbf7d0;background:#f0fdf4;color:#14532d}
.mg-pay-alarm.ok>i{background:#22c55e}
.mg-pay-alarm.ok>div span,.mg-pay-alarm.ok .mg-pay-alarm-x{color:#166534}
/* 管理员代管横幅 */
.mg-proxy-bar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:12px 14px;border:1px solid #fcd34d;border-radius:12px;background:#fffbeb;color:#78350f;box-shadow:0 6px 16px -10px rgba(180,83,9,.45)}
.mg-proxy-bar[hidden]{display:none}
.mg-proxy-bar>i{flex:0 0 30px;height:30px;border-radius:50%;background:#f59e0b;color:#fff;font-style:normal;font-weight:800;display:flex;align-items:center;justify-content:center}
.mg-proxy-bar>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mg-proxy-bar>div b{font-size:14px}
.mg-proxy-bar>div span{font-size:12.5px;line-height:1.6;color:#92400e}
.mg-proxy-bar button.ghost{flex:0 0 auto;min-height:32px;padding:0 14px;border:1px solid #f59e0b;border-radius:8px;background:#fff;color:#b45309;font-size:13px;font-weight:700;cursor:pointer}
.mg-proxy-bar button.ghost:hover{background:#fef3c7}
.panel-actions{display:flex;gap:8px;flex-wrap:wrap}
.mg-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 8px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-size:12px;font-weight:800}
.mg-two-col{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px}
@media(max-width:1100px){.mg-two-col{grid-template-columns:1fr}}

/* 表单 */
label{display:block;font-size:13px;font-weight:700;color:#334155}
input,select,textarea{width:100%;min-height:42px;padding:10px 12px;border:1px solid #dfe3ee;border-radius:10px;background:#fff;font-size:14px;color:var(--mg-text);box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
label>input:not([type=checkbox]):not([type=radio]),label>select,label>textarea{margin-top:6px}
input:hover,select:hover,textarea:hover{border-color:#c7cde0}
input:focus,select:focus,textarea:focus{outline:none;border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.16)}
textarea{min-height:auto;resize:vertical}
.mg-form-row{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.mg-form-row label{flex:1;min-width:220px}
.mg-form-row button,.filters button,.editor-foot button{min-height:42px;padding:0 18px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(99,102,241,.7);transition:transform .15s,filter .15s}
.mg-form-row button:hover,.filters button:hover,.editor-foot button:hover{transform:translateY(-1px);filter:brightness(1.05)}
.mg-form-row button:disabled,.editor-foot button:disabled{opacity:.6;cursor:not-allowed;transform:none}
.mg-form-row button.ghost,.filters button.ghost,.editor-foot button.ghost{background:#fff;color:#6d28d9;border:1px solid #ddd6fe;box-shadow:none}
.mg-color-label{flex:0 0 auto;min-width:0}
.mg-color-label input[type="color"]{width:56px;height:42px;padding:4px;border:1px solid var(--mg-line);border-radius:10px;background:#fff;cursor:pointer}
.mg-hint{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#f8fafc;font-size:12px;color:var(--mg-sub);line-height:1.7}
.mg-block{display:block;margin-bottom:12px}
.mg-steps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.mg-steps span{padding:7px 12px;border-radius:10px;background:#f5f3ff;border:1px solid #ede9fe;color:#6d28d9;font-size:12px;font-weight:700}
.mg-state-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#f1f5f9;color:var(--mg-sub);font-size:12px;font-weight:800;white-space:nowrap}
.mg-state-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.mg-state-badge.on{background:#ecfdf5;color:#059669}
.mg-state-badge.off{background:#fff1f2;color:#e11d48}
.mg-state-badge.warn{background:#fff7e8;color:#b46a13}
.mg-state-badge.draft{background:#edf2ff;color:#315efb}

/* 筛选条 */
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding:12px;border-radius:14px;background:#f8fafc;border:1px solid #eef1f8}
.filters input,.filters select{width:auto;min-width:140px;flex:0 1 auto}
.filters input[type=date]{min-width:150px}

/* 表格 */
.table-wrap{width:100%;overflow-x:auto;border:1px solid #eef1f8;border-radius:14px}
.table-wrap table{width:100%;border-collapse:collapse;font-size:14px}
.table-wrap th{padding:13px 14px;text-align:left;font-size:13px;font-weight:800;color:var(--mg-sub);background:#f8fafc;border-bottom:1px solid var(--mg-line);white-space:nowrap}
.table-wrap td{padding:14px;border-bottom:1px solid #f1f3f9;color:#172033;vertical-align:middle;overflow-wrap:anywhere;text-align:left}
.table-wrap tr:last-child td{border-bottom:0}
.table-wrap tr:hover td{background:#faf9ff}
.table-wrap .empty{text-align:center;color:var(--mg-muted);padding:32px}
.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap;letter-spacing:.3px}
.badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
.badge.on{background:#ecfdf5;color:#059669}
.badge.off{background:#f8fafc;color:#64748b}
.badge.warn{background:#fffbeb;color:#d97706}
.badge.err{background:#fef2f2;color:#dc2626}
.badge.info{background:#eff6ff;color:#2563eb}
.mg-muted{color:var(--mg-muted);font-size:12px}

/* 行内操作按钮 */
.op-btn{min-height:34px;padding:0 12px;border-radius:10px;border:1px solid #ddd6fe;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s,transform .15s,filter .15s,box-shadow .15s}
.op-btn:hover{background:#f5f3ff}
.op-btn.primary{background:var(--mg-grad);border-color:transparent;color:#fff;box-shadow:0 8px 18px -8px rgba(99,102,241,.7)}
.op-btn.primary:hover{filter:brightness(1.06);transform:translateY(-1px)}
.op-btn.danger{border-color:#fecdd3;color:#e11d48;background:#fff}
.op-btn.success{border-color:#a7f3d0;color:#059669;background:#fff}
.op-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.op-row{display:flex;gap:6px;flex-wrap:wrap}
/* 操作列按钮铺满单元格：等分剩余宽度，窄屏自动换行 */
.op-row>.op-btn{flex:1;min-width:64px}
.mg-more{position:relative}
.mg-more-menu{display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:50;min-width:140px;padding:6px;border-radius:12px;background:#fff;border:1px solid var(--mg-line);box-shadow:0 18px 40px rgba(15,23,42,.16)}
.mg-more.open .mg-more-menu{display:block;animation:mgFade .15s ease}
.mg-more-menu button{display:block;width:100%;min-height:36px;padding:0 12px;border:0;border-radius:8px;background:#fff;color:#334155;font-size:13px;font-weight:600;text-align:left;cursor:pointer}
.mg-more-menu button:hover{background:#f5f3ff;color:#6d28d9}
.mg-more-menu button.danger{color:#e11d48}
.mg-more-menu button.danger:hover{background:#fff1f2;color:#e11d48}

/* 代理入口列表：行加大 + 多选批量操作 */
#entries table th,#entries table td{padding:13px 14px;font-size:14px}
#entries th.sel,#entries td.sel{width:36px;text-align:center}
.mg-sel{width:16px;height:16px;accent-color:#7c3aed;cursor:pointer;vertical-align:middle}
#entries .filters button:disabled{opacity:.5;cursor:not-allowed}

/* 全平台订单表：固定列宽 + 统一左对齐，表头与行内容严格同轴 */
#adminOrders table{table-layout:fixed}
#adminOrders th,#adminOrders td{text-align:left}
/* 操作列预留三个完整按钮的宽度，其余列按剩余空间分配。 */
#adminOrders th:nth-child(1){width:calc((100% - 310px)*.32)}
#adminOrders th:nth-child(2){width:calc((100% - 310px)*.09)}
#adminOrders th:nth-child(3){width:calc((100% - 310px)*.11)}
#adminOrders th:nth-child(4){width:calc((100% - 310px)*.075)}
#adminOrders th:nth-child(5){width:calc((100% - 310px)*.05)}
#adminOrders th:nth-child(6){width:calc((100% - 310px)*.085)}
#adminOrders th:nth-child(7){width:calc((100% - 310px)*.11)}
#adminOrders th:nth-child(8){width:calc((100% - 310px)*.16)}
#adminOrders th:nth-child(9){width:310px}
#entries .filters button.danger{color:#e11d48;background:#fff1f2;border-color:#fecdd3}
.op-btn.danger{border-color:#fecdd3;color:#e11d48;background:#fff}
.op-btn.danger:hover{border-color:#fda4af;background:#fff1f2}
.mg-domain{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;color:#475569;word-break:break-all}

/* 代配弹窗：用户多选选择器 */
.mg-picker-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px;font-size:13px;font-weight:700;color:#334155}
.mg-pick-tools{display:flex;align-items:center;gap:8px}
.mg-pick-tools button{min-height:28px;padding:0 10px;border:1px solid #ddd6fe;border-radius:8px;background:#fff;color:#6d28d9;font-size:12px;font-weight:700;cursor:pointer}
.mg-pick-tools button:hover{background:#f5f3ff}
/* 用户卡选择器（代配入口）：选中整卡高亮；用户名 + 备注两行，右侧「已绑定」角标
   注意：弹窗 .mask 在 #app 外面，只写 #app 前缀不会命中，会落到本文件的 input{width:100%;min-height:42px} 把复选框撑成大方块；这里两种都写 */
.mg-user-picker{max-height:264px;overflow:auto;margin-top:10px;padding:10px;border:1px solid #eef1f8;border-radius:12px;background:#f8fafc;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;align-content:start;scrollbar-width:thin}
.mg-user-picker label{display:flex;align-items:center;gap:9px;margin:0;min-height:44px;padding:7px 10px;border-radius:10px;background:#fff;border:1px solid var(--mg-line);font-size:13px;font-weight:600;color:#334155;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.mg-user-picker label:hover{border-color:#c7d2fe;background:#f8faff}
.mg-user-picker label:has(input:checked){border-color:#818cf8;background:#eef2ff;box-shadow:0 0 0 2px rgba(99,102,241,.12)}
.mg-user-picker input[type=checkbox],#app .mg-user-picker input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:0;margin:0;padding:0;border-radius:4px;box-shadow:none;accent-color:#4f46e5;flex:0 0 16px;cursor:pointer}
.mg-user-picker span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-user-picker .mg-ep-u{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;line-height:1.3}
.mg-ep-u b,.mg-ep-u small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-ep-u b{font-weight:700;color:#1f2937}
.mg-ep-u small{font-size:11px;font-weight:500;color:#94a3b8}
.mg-user-picker label:has(input:checked) .mg-ep-u b{color:#3730a3}
.mg-ep-tag{margin-left:auto;flex:0 0 auto;padding:1px 6px;border-radius:6px;background:#ecfdf5;color:#059669;font-size:10.5px;font-style:normal;font-weight:700;line-height:1.6}
.mg-pick-empty{grid-column:1/-1;margin:6px 4px;font-size:12px;color:var(--mg-muted)}
/* 代配入口弹窗：搜索 + 分段筛选同一行，已选用户以标签平铺，底栏按绑定/解绑变色 */
.mg-ep .mg-picker-head{margin-bottom:10px}
.mg-ep-total{margin-left:6px;font-style:normal;font-weight:600;font-size:12px;color:#94a3b8}
.mg-ep-bar{display:flex;align-items:center;gap:10px}
.mg-ep-bar input,#app .mg-ep-bar input{flex:1;min-width:0;height:40px;min-height:40px;margin:0;padding-left:36px;box-shadow:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center/16px}
.mg-ep-bar input:focus,#app .mg-ep-bar input:focus{box-shadow:0 0 0 3px rgba(49,94,251,.14)}
.mg-ep-seg{display:flex;flex:0 0 auto;gap:2px;padding:3px;border-radius:10px;background:#f1f5f9}
.mg-ep-seg button{min-height:34px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:#64748b;font-size:12.5px;font-weight:700;cursor:pointer;transition:background .15s,color .15s}
.mg-ep-seg button:hover{color:#315efb}
.mg-ep-seg button.on{background:#fff;color:#315efb;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.mg-ep-picked{display:flex;align-items:flex-start;gap:8px;margin-top:10px;padding:8px 10px;min-height:42px;border:1px dashed #d7def0;border-radius:10px;background:#fbfcff;box-sizing:border-box}
.mg-ep-picked .mg-count{flex:0 0 auto;margin-top:1px}
.mg-ep-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0;max-height:62px;overflow:auto;scrollbar-width:thin}
.mg-ep-chip{display:inline-flex;align-items:center;gap:3px;height:24px;padding:0 3px 0 9px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:700;white-space:nowrap}
.mg-ep-chip i{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-style:normal;font-size:14px;line-height:1;color:#6366f1;cursor:pointer}
.mg-ep-chip i:hover{background:#c7d2fe;color:#312e81}
.mg-ep-none,.mg-ep-more{font-size:12px;line-height:24px;color:#94a3b8}
.mg-ep-domain input,#app .mg-ep-domain input{margin-bottom:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}
.mg-ep-domain small{display:block;margin-top:6px;font-size:12px;font-weight:500;color:#94a3b8}
.mg-ep .editor-foot button.danger{background:#e11d48;box-shadow:0 6px 14px -6px rgba(225,29,72,.5)}
@media(max-width:560px){.mg-ep-bar{flex-wrap:wrap}.mg-ep-seg{width:100%}.mg-ep-seg button{flex:1}}
.mg-batch-info{padding:10px 12px;border-radius:10px;background:#f5f3ff;border:1px solid #ede9fe;color:#5b21b6;font-size:13px;line-height:1.6;margin-bottom:12px}

/* 分页 */
.mg-pager{display:flex;gap:8px;justify-content:center;align-items:center;padding-top:16px}
.mg-pager button{min-height:34px;padding:0 14px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;font-size:13px;font-weight:600;color:#334155;cursor:pointer}
.mg-pager button:hover:not(:disabled){border-color:#c4b5fd;color:#6d28d9}
.mg-pager button:disabled{opacity:.45;cursor:not-allowed}
.mg-pager span{font-size:13px;color:var(--mg-sub)}

/* 模板卡 / 推广卡 */
.mg-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}
.mg-cards>.mg-empty{grid-column:1/-1}
.mg-card{position:relative;display:flex;flex-direction:column;min-width:0;border-radius:16px;border:1px solid var(--mg-line);background:#fff;overflow:hidden;box-shadow:0 4px 14px rgba(15,23,42,.04);transition:transform .2s,box-shadow .2s,border-color .2s}
.mg-card:hover{transform:translateY(-3px);box-shadow:0 20px 38px -14px rgba(76,29,149,.28);border-color:#d8ccfd}
.mg-card .cover{position:relative;height:150px;flex-shrink:0;background:#eef0f7 center/cover no-repeat}
.mg-card .cover.placeholder{display:flex;align-items:center;justify-content:center;overflow:hidden;background:linear-gradient(135deg,#ede9fe 0%,#e0e7ff 50%,#dbeafe 100%)}
.mg-card .cover.placeholder::before,.mg-card .cover.placeholder::after{content:'';position:absolute;border-radius:50%;background:rgba(255,255,255,.45)}
.mg-card .cover.placeholder::before{width:150px;height:150px;right:-40px;top:-60px}
.mg-card .cover.placeholder::after{width:90px;height:90px;left:-24px;bottom:-40px}
.mg-card .ph{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:10px;color:#6d28d9}
.mg-card .ph-icon{width:54px;height:54px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.8);box-shadow:0 10px 22px -8px rgba(109,40,217,.35)}
.mg-card .ph-icon svg{width:26px;height:26px}
.mg-card .ph em{max-width:220px;font-style:normal;font-size:13px;font-weight:800;color:#5b21b6;opacity:.75;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cover-flag{position:absolute;z-index:2;top:10px;left:10px;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.94);font-size:12px;font-weight:800;box-shadow:0 4px 12px rgba(15,23,42,.12)}
.cover-flag::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.cover-flag.ok{color:#059669}
.cover-flag.err{color:#e11d48}
.cover-flag.warn{color:#d97706}
.mg-card-body{display:flex;flex-direction:column;gap:10px;flex:1;padding:14px 16px 16px;min-width:0}
.mg-card-title{font-size:16px;font-weight:800;color:var(--mg-text);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-card-sub{margin-top:-6px;font-size:12px;color:var(--mg-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.mg-card-remark{min-height:40px;font-size:13px;line-height:1.55;color:var(--mg-sub);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mg-link-url{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 5px 5px 12px;border-radius:10px;background:#f8fafc;border:1px solid #edf0f7;font-size:12px;color:#475569}
.mg-link-url .url-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.mg-link-url button{flex-shrink:0;height:28px;padding:0 12px;border:0;border-radius:8px;background:#ede9fe;color:#6d28d9;font-size:12px;font-weight:800;cursor:pointer;transition:background .15s}
.mg-link-url button:hover{background:#ddd6fe}
.mg-link-url.missing{background:#fffbeb;border-color:#fde68a;color:#92400e}
.mg-link-url.missing .url-text{font-family:inherit}
.mg-link-url.missing button{background:#fef3c7;color:#b45309}
.mg-link-prices{display:flex;gap:6px;flex-wrap:wrap}
.mg-price-tag{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid #ede9fe;background:#f5f3ff;color:#5b21b6;font-size:12px;font-weight:700;white-space:nowrap}
.mg-price-tag i{font-style:normal;font-weight:800;color:#7c3aed}
.mg-price-tag.ok{border-color:#d1fae5;background:#ecfdf5;color:#047857}
.mg-price-tag.ok i{color:#059669}
.mg-price-tag.todo{border-style:dashed;border-color:#fda4af;background:#fff;color:#be123c}
.mg-price-tag.todo i{color:#e11d48}
.mg-link-alert{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 12px;border-radius:10px;background:#fff1f2;color:#be123c;font-size:12px;line-height:1.5}
.mg-link-alert b{color:#e11d48}
.mg-link-alert a{margin-left:auto;color:#e11d48;font-weight:800;text-decoration:none;white-space:nowrap}
.mg-link-alert a:hover{text-decoration:underline}
.mg-link-alert.warn{background:#fffbeb;color:#b45309}
.mg-card-ops{display:flex;gap:8px;margin-top:auto;padding-top:2px}
.mg-card-ops>.op-btn{flex:1;min-width:0;min-height:38px}
.mg-card-ops .op-btn.icon{width:38px;min-height:38px;padding:0;font-size:18px;line-height:1;color:#64748b;border-color:#e2e8f0}
.mg-card-ops .op-btn.icon:hover{color:#6d28d9;border-color:#ddd6fe}

/* 空状态 / 加载 */
.mg-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:38px 20px;text-align:center;color:var(--mg-muted);font-size:13px;border:1.5px dashed #e2e8f0;border-radius:16px;background:linear-gradient(180deg,#fafbff,#fff)}
.mg-empty-icon{width:56px;height:56px;margin-bottom:6px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#ede9fe,#dbeafe);color:#7c3aed}
.mg-empty-icon svg{width:28px;height:28px}
.mg-empty b{font-size:15px;color:#334155}
.mg-empty p{margin:0;font-size:13px;color:var(--mg-muted)}
.mg-empty .op-btn{margin-top:10px;min-height:38px;padding:0 20px}
.mg-empty.mg-loading{flex-direction:row;gap:10px;border-style:solid;border-color:#f1f5f9}
.mg-spin{width:18px;height:18px;border-radius:50%;border:2px solid #ddd6fe;border-top-color:#7c3aed;animation:mgSpin .8s linear infinite}

/* 收益侧卡（对标竞品放大版：逐行大数字 + 佣金比例区） */
.mg-unit{margin-left:auto;font-size:12px;color:#8a94a6;white-space:nowrap}
.mg-income-rows{display:flex;flex-direction:column}
.mg-irow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 2px;border-bottom:1px solid #eef1f8}
.mg-irow .lb,.mg-irate .lb{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;color:#374151}
.mg-irow .lb i,.mg-irate .lb i{width:7px;height:7px;border-radius:50%;background:#c4b5fd;flex:0 0 auto}
.mg-irow .lb i.hl,.mg-irate .lb i.hl{background:#7c3aed}
.mg-irow b{font-size:26px;font-weight:800;color:#1f2937;letter-spacing:-.5px}
.mg-irow:first-child b{color:#7c3aed}
.mg-irate{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 2px 4px}
.mg-irate p{margin:9px 0 0;font-size:12px;color:#8a94a6;line-height:1.9}
.mg-irate b{font-size:34px;font-weight:800;color:#7c3aed;line-height:1;white-space:nowrap}
.mg-irate b i{font-style:normal;font-size:16px;font-weight:700;margin-left:2px}

/* 钱包 */
.finance-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
@media(max-width:1100px){.finance-layout{grid-template-columns:1fr}}
.withdraw-amount{display:flex;gap:10px;align-items:center;margin-bottom:14px;padding:12px 14px;border-radius:14px;background:#f8fafc;border:1px solid #eef1f8}
.withdraw-amount>span{font-size:13px;font-weight:700;color:#334155;white-space:nowrap}
.withdraw-amount>div{flex:1;display:flex;align-items:center;gap:6px}
.withdraw-amount em{font-style:normal;font-size:18px;font-weight:800;color:var(--mg-primary)}
.withdraw-amount input{font-size:18px;font-weight:800}
.withdraw-amount button{min-height:42px;padding:0 14px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.receive-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-bottom:12px}
.receive-upload{display:flex;gap:14px;align-items:center;margin-bottom:12px}
.receive-upload button{min-height:38px;padding:0 14px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer}
.receive-preview{width:110px;height:110px;border-radius:14px;border:1.5px dashed #dfe3ee;background:#f8fafc center/cover no-repeat;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px;color:var(--mg-muted);font-size:12px;flex-shrink:0}
.receive-upload p{margin:6px 0 0;font-size:12px;color:var(--mg-muted)}
.withdraw-submit{width:100%;min-height:48px;margin-top:12px;border:0;border-radius:12px;background:var(--mg-grad);color:#fff;font-size:15px;font-weight:800;cursor:pointer;box-shadow:0 12px 24px -10px rgba(99,102,241,.8);transition:transform .15s,filter .15s}
.withdraw-submit:hover{transform:translateY(-1px);filter:brightness(1.05)}
.pending-count{padding:6px 12px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:12px;font-weight:800;transition:background .15s,color .15s}
.pending-count.has-pending{background:#fffbeb;color:#d97706}

/* 支付配置（管理员） */
.payment-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:14px}
.payment-form-grid .payment-api{grid-column:1/-1}
.payment-options{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:16px;border-radius:14px;background:#f8fafc;border:1px solid #e7ecf4;margin-bottom:14px}
.payment-options b{font-size:14px;color:#26364e}
.payment-options p{margin:3px 0 0;font-size:12px;color:var(--mg-sub)}
.payment-checks{display:grid;grid-template-columns:repeat(2,minmax(138px,1fr));gap:10px;align-items:center}
.payment-checks label{position:relative;display:flex;align-items:center;min-height:48px;margin:0;padding:0 52px 0 15px;border:1px solid #dce3ef;border-radius:11px;background:#fff;color:#536176;font-size:13px;font-weight:750;cursor:pointer;user-select:none;box-shadow:0 2px 7px rgba(31,47,77,.035);transition:border-color .15s,background .15s,color .15s,box-shadow .15s,transform .15s}
.payment-checks label:hover{border-color:#aebff3;background:#f7f9ff;color:#315efb;transform:translateY(-1px);box-shadow:0 7px 16px -11px rgba(49,94,251,.6)}
.payment-checks label:has(input:checked){border-color:#8ca5f6;background:#edf2ff;color:#234fcf;box-shadow:0 0 0 3px rgba(49,94,251,.08)}
.payment-checks label:has(input:checked)::before{content:'已启用';position:absolute;left:15px;bottom:3px;color:#6680ce;font-size:8px;font-weight:600}
.payment-checks label:has(input:checked) span{transform:translateY(-5px)}
.payment-checks label span{transition:transform .15s}
.payment-checks input{appearance:none;-webkit-appearance:none;position:absolute;right:13px;top:50%;width:34px;height:20px;min-height:20px;margin:0;padding:0;border:0;border-radius:999px;background:#cbd3df;box-shadow:none;cursor:pointer;transform:translateY(-50%);transition:background .18s}
.payment-checks input::after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:left .18s}
.payment-checks input:checked{background:#315efb}
.payment-checks input:checked::after{left:17px}
.payment-checks input:focus,.payment-checks input:focus-visible{box-shadow:0 0 0 3px rgba(49,94,251,.18)}
.payment-checks input:disabled{opacity:.55;cursor:not-allowed}
.payment-checks label:has(input:disabled){opacity:.65;cursor:not-allowed;transform:none}
@media(max-width:640px){.payment-options{align-items:stretch;flex-direction:column}.payment-checks{width:100%;grid-template-columns:1fr 1fr}.payment-checks label{min-width:0}}
@media(max-width:400px){.payment-checks{grid-template-columns:1fr}}
/* 分支付方式通道：每种支付方式一张卡片，可跟随公共配置或单独接入其他易支付平台 */
.pay-sub-title{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:4px 0 10px;font-size:14px;font-weight:800;color:#26364e}
.pay-sub-title em{font-style:normal;font-size:12px;font-weight:500;color:var(--mg-sub)}
/* 公共配置块 */
.pay-block{margin:0 0 18px;padding:16px 18px 18px;border:1px solid #e7ecf4;border-radius:14px;background:#fbfcfe}
.pay-block-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.pay-block-ic{flex:0 0 32px;height:32px;border-radius:9px;background:#eef2ff;color:#4f46e5;display:flex;align-items:center;justify-content:center}
.pay-block-tt{flex:1;min-width:0}
.pay-block-tt b{display:block;font-size:14px;font-weight:800;color:#26364e}
.pay-block-tt p{margin:2px 0 0;font-size:12px;color:var(--mg-sub)}
.pay-use{flex:0 0 auto;padding:4px 10px;border-radius:999px;background:#eef2f8;color:#5b6b82;font-size:12px;font-weight:700;white-space:nowrap}
.pay-use.on{background:#eef2ff;color:#4338ca}
.pay-common-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:12px}
.pay-common-grid label,.pay-ch-body label{margin:0}
/* 支付方式卡片：宽屏并排两列 */
.pay-channels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch;margin-bottom:18px}
.pay-ch{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid #e7ecf4;border-radius:14px;background:#fff;transition:border-color .15s,background .15s,box-shadow .15s}
.pay-ch:hover{border-color:#d5ddec}
.pay-ch.own{border-color:#c7d2fe;box-shadow:0 10px 24px -18px rgba(79,70,229,.6)}
.pay-ch-head{display:flex;align-items:center;gap:12px}
.pay-ch-ic{flex:0 0 38px;height:38px;border-radius:10px;color:#fff;font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center}
.pay-ch-ic.ali{background:linear-gradient(135deg,#3b9bff,#1677ff)}
.pay-ch-ic.wx{background:linear-gradient(135deg,#2ad47a,#07c160)}
.pay-ch-name{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.pay-ch-name b{font-size:15px;font-weight:800;color:#1f2d44}
.pay-ch-sum{max-width:100%;padding:2px 9px;border-radius:999px;background:#eef2f8;color:#5b6b82;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pay-ch-sum.ok{background:#ecfdf3;color:#15803d}
.pay-ch-sum.warn{background:#fff7ed;color:#c2410c}
.pay-switch{position:relative;flex:0 0 auto;margin:0;cursor:pointer}
.pay-switch input,#app .pay-switch input[type=checkbox]{appearance:none;-webkit-appearance:none;display:block;width:42px;height:24px;min-height:24px;margin:0;padding:0;border:0;border-radius:999px;background:#cbd3df;box-shadow:none;-webkit-box-shadow:none;cursor:pointer;transition:background .18s}
.pay-switch input::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:left .18s}
.pay-switch input:checked,#app .pay-switch input[type=checkbox]:checked{background:#315efb}
.pay-switch input:checked::after{left:21px}
.pay-switch input:focus-visible,#app .pay-switch input[type=checkbox]:focus-visible{box-shadow:0 0 0 3px rgba(49,94,251,.2)}
.pay-switch i{display:none}
.pay-ch-mode{display:flex;padding:3px;border-radius:10px;background:#f1f4f9;border:1px solid #e6eaf2}
.pay-ch-mode button{flex:1;min-height:34px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:#5b6b82;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}
.pay-ch-mode button:hover{color:#315efb}
.pay-ch-mode button.active{background:#fff;color:#234fcf;box-shadow:0 1px 4px rgba(31,47,77,.12)}
.pay-ch-note{flex:1;display:flex;align-items:center;justify-content:center;min-height:40px;margin:0;padding:10px 12px;border:1px dashed #e3e8f1;border-radius:10px;background:#f8fafc;color:var(--mg-sub);font-size:12px;line-height:1.5;text-align:center}
.pay-ch.own .pay-ch-note{display:none}
.pay-ch-body{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:12px;border-top:1px dashed #dfe5f0}
.pay-ch-body .pay-f-full{grid-column:1/-1}
.pay-ch.own .pay-ch-body{display:grid}
.pay-ch.off{background:#fafbfc}
.pay-ch.off .pay-ch-ic{filter:grayscale(1);opacity:.5}
.pay-ch.off .pay-ch-mode,.pay-ch.off .pay-ch-note,.pay-ch.off .pay-ch-body{opacity:.55}
/* 底部：启用状态 / 默认颜色 + 操作按钮 */
.pay-foot{padding-top:16px;border-top:1px solid #eef1f6}
.pay-foot-opts{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.pay-inline{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;white-space:nowrap}
.pay-inline select,#app .pay-inline select{width:auto;min-width:120px;margin:0}
.pay-color{display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 12px 0 5px;border:1px solid #dfe3ee;border-radius:10px;background:#fff}
.pay-color input[type=color],#app .pay-color input[type=color]{width:32px;height:32px;min-height:0;margin:0;padding:0;border:0;border-radius:7px;background:none;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}
.pay-color input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.pay-color input[type=color]::-webkit-color-swatch{border:0;border-radius:7px}
.pay-color em{font-style:normal;font-family:Consolas,monospace;font-size:12.5px;font-weight:600;color:#475569;text-transform:uppercase}
.pay-foot .hint:empty{display:none}
.pay-foot>span{margin-left:auto}
/* 备用通道库 + 用户专属通道：规则小卡 + 左右两栏卡片列表，宽屏铺满 */
.pr-rules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
.pr-rule{display:flex;align-items:flex-start;gap:11px;padding:12px 14px;border:1px solid #e8edf6;border-radius:12px;background:linear-gradient(135deg,#fff,#f8faff)}
.pr-rule>i{flex:0 0 34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--bg,#eaf0ff);color:var(--c,#315efb)}
.pr-rule>i svg{width:18px;height:18px}
.pr-rule b{display:block;font-size:13px;font-weight:800;color:#1f2d44}
.pr-rule p{margin:3px 0 0;font-size:12px;line-height:1.55;color:var(--mg-sub)}
.pr-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:14px;align-items:stretch}
.pr-col{display:flex;flex-direction:column;min-width:0;padding:14px;border:1px solid #e8edf6;border-radius:14px;background:#f7f9fc}
.pr-col-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.pr-col-head>div{flex:1;min-width:180px}
.pr-col-head>div>b{display:inline-flex;align-items:center;gap:8px;font-size:15px;font-weight:800;color:#1f2d44}
.pr-col-head>div>b::before{content:'';width:3px;height:14px;border-radius:4px;background:#315efb}
.pr-col-head p{margin:3px 0 0;font-size:12px;color:var(--mg-sub)}
.pr-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 7px;border-radius:999px;background:#e8eeff;color:#315efb;font-size:12px;font-weight:800}
.pr-col-head .pay-route-search,#app .pr-col-head .pay-route-search{width:240px;min-height:36px;height:36px;margin:0;padding:0 12px;border-radius:9px;font-size:13px;font-weight:400}
.pr-list{flex:1;display:flex;flex-direction:column;gap:8px}
/* 列表上方小统计；专属用户那边可点来筛选 */
.pr-stats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.pr-stats:empty{display:none}
.pr-stat{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 12px;border:1px solid #e3e9f4;border-radius:999px;background:#fff;color:#4a5a75;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;--d:#315efb}
.pr-stat i{width:7px;height:7px;border-radius:50%;background:var(--d);box-shadow:0 0 0 3px color-mix(in srgb,var(--d) 16%,transparent)}
.pr-stat b{min-width:14px;color:#172033;font-size:13px;font-weight:800;text-align:center}
.pr-stat.on{--d:#22c55e}.pr-stat.off{--d:#b6c0cf}.pr-stat.warn{--d:#f59e0b}.pr-stat.self{--d:#8b5cf6}
button.pr-stat{cursor:pointer;transition:border-color .15s,background .15s,color .15s}
button.pr-stat:hover{border-color:#c5d3f5;background:#f8faff}
button.pr-stat.active{border-color:#315efb;background:#eef3ff;color:#234fcf;box-shadow:0 4px 12px -8px rgba(49,94,251,.7)}
button.pr-stat.active b{color:#315efb}
/* 专属用户列表表头，和下面卡片同一套列宽 */
.pr-thead{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(0,1fr) minmax(0,1fr) 196px;gap:14px;padding:0 15px;color:var(--mg-muted);font-size:12px;font-weight:700}
.pr-thead span:last-child{text-align:right}
.pr-item{position:relative;overflow:hidden}
.pr-item::before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 3px 3px 0;background:var(--pr-c,transparent)}
.pr-item.is-on{--pr-c:#22c55e}.pr-item.is-warn{--pr-c:#f59e0b}.pr-item.is-off{--pr-c:#cbd5e1}.pr-item.is-self{--pr-c:#8b5cf6}
.pr-used{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;background:#f1f4f9;color:var(--mg-muted);font-size:12px;font-weight:700}
.pr-used svg{width:13px;height:13px}
.pr-used.has{background:#eef3ff;color:#315efb}
.pr-item{display:grid;align-items:center;gap:14px;padding:12px 14px;border:1px solid #e6ebf4;border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.pr-item:hover{border-color:#cdd8f3;box-shadow:0 8px 20px -14px rgba(49,94,251,.45)}
.pr-ava{flex:0 0 40px;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;color:#fff;font-size:15px;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.3)}
.pr-main{min-width:0}
.pr-main b{display:flex;align-items:center;gap:6px;min-width:0;font-size:14px;font-weight:800;color:#172033;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-main b em{font-style:normal;font-size:11px;font-weight:700;color:var(--mg-muted)}
.pr-main b .badge{padding:2px 7px;font-size:11px}
.pr-main small{display:block;margin-top:3px;font-size:12px;color:var(--mg-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-ops{display:flex;gap:6px}
.pr-ops .op-btn{min-height:32px;padding:0 12px;border-radius:8px;border-color:#d9e1f0;color:#315efb}
.pr-ops .op-btn:hover{background:#f5f8ff;border-color:#b9c8f8}
.pr-ops .op-btn.danger{border-color:#fecdd3;color:#e11d48}
.pr-ops .op-btn.danger:hover{background:#fff1f2}
/* 通道库一行：头像 | 名称+接口 | PID+Key | 状态+人数 | 操作 */
.pr-lib{grid-template-columns:40px minmax(0,1.5fr) minmax(0,1fr) auto auto;grid-template-areas:"ava main meta state ops"}
.pr-lib>.pr-ava{grid-area:ava}.pr-lib>.pr-main{grid-area:main}.pr-lib>.pr-meta{grid-area:meta}.pr-lib>.pr-state{grid-area:state}.pr-lib>.pr-ops{grid-area:ops}
.pr-lib.off{background:#fbfcfd}
.pr-lib.off .pr-ava{filter:grayscale(1);opacity:.5}
.pr-meta{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;color:var(--mg-sub)}
.pr-meta span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-meta b{color:#334155;font-family:Consolas,monospace;font-weight:600}
.pr-meta .ok{color:#15803d}.pr-meta .warn{color:#c2410c;font-weight:700}
.pr-state{display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-size:12px;color:var(--mg-sub);white-space:nowrap}
.pr-state strong{color:#172033;font-size:15px}
.pr-add{display:flex;align-items:center;justify-content:center;min-height:46px;border:1.5px dashed #cfd9ee;border-radius:12px;background:transparent;color:#315efb;font-size:13px;font-weight:700;cursor:pointer;transition:border-color .15s,background .15s}
.pr-add:hover{border-color:#315efb;background:#f5f8ff}
/* 专属用户一行：用户 | 支付宝 | 微信 | 操作+修改时间 */
.pr-user{grid-template-columns:minmax(160px,.8fr) minmax(0,1fr) minmax(0,1fr) 196px;grid-template-areas:"who ali wx side"}
.pr-who{grid-area:who;display:flex;align-items:center;gap:11px;min-width:0}
.pr-who .pr-ava{border-radius:50%}
.pr-ch-alipay{grid-area:ali}.pr-ch-wxpay{grid-area:wx}
.pr-ch{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 10px;border:1px solid transparent;border-radius:10px;background:#f5f7fb}
.pr-ch .pay-ch-ic{flex:0 0 28px;height:28px;border-radius:8px;font-size:12px}
.pr-ch>div{min-width:0}
.pr-ch em{display:block;font-style:normal;font-size:11px;color:var(--mg-muted)}
.pr-ch b{display:block;font-size:13px;font-weight:800;color:#172033;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-ch.on{background:#f1f5ff;border-color:#dbe5ff}
.pr-ch.idle .pay-ch-ic{filter:grayscale(1);opacity:.4}
.pr-ch.idle b{color:var(--mg-muted);font-weight:600}
.pr-ch.warn{background:#fff8f1;border-color:#fde0c4}
.pr-ch .pay-route-note{display:block;margin-top:1px;color:#c2410c;font-size:11px;font-weight:600}
.pr-side{grid-area:side;display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:0}
.pr-side small{max-width:100%;font-size:11px;color:var(--mg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:180px;padding:24px;border:1.5px dashed #d6dff0;border-radius:12px;background:#fff;text-align:center}
.pr-empty svg{width:36px;height:36px;margin-bottom:4px;color:#a9b8d8}
.pr-empty b{font-size:14px;color:#334155}
.pr-empty p{margin:0 0 6px;font-size:12px;color:var(--mg-sub)}
.pr-empty .op-btn.primary{min-height:34px;padding:0 16px;border-radius:9px;background:#315efb;box-shadow:0 6px 14px -6px rgba(49,94,251,.5)}
/* 弹窗：两列表单 */
#payLibMask [hidden],#payRouteMask [hidden]{display:none!important}
#payLibMask .editor-foot .hint,#payRouteMask .editor-foot .hint{flex:1;min-width:0}
.pr-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pr-form label,.pay-route-own label,.pay-route-lib label{margin:0}
.pr-f-full{grid-column:1/-1}
.pr-tip{margin:16px 0 0;padding:10px 12px;border:1px solid #e1e9fd;border-radius:10px;background:#f5f8ff;color:#4a5a75;font-size:12px;line-height:1.65}
.pay-route-dialog{width:min(900px,100%)}
.pay-route-user{padding:14px;border:1px solid #e7ecf4;border-radius:14px;background:#f7f9fc}
.pay-route-user>span{display:block;margin-bottom:8px;font-size:13px;font-weight:800;color:#1f2d44}
.pay-route-user>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:10px}
.pay-route-user>div input,.pay-route-user>div select{margin:0}
.pay-route-user>b{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #dbe5ff;border-radius:10px;background:#fff;color:#234fcf;font-size:14px}
.pay-route-user>b::before{content:'';width:8px;height:8px;border-radius:50%;background:#315efb;box-shadow:0 0 0 3px #e8eeff}
.pay-route-warn{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12px;line-height:1.7}
.pay-route-chs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
.pay-route-ch{display:flex;flex-direction:column;gap:12px;min-width:0;padding:14px;border:1px solid #e7ecf4;border-radius:14px;background:#fbfcfe;transition:border-color .15s,box-shadow .15s,background .15s}
.pay-route-ch.on{border-color:#c9d6ff;background:#fff;box-shadow:0 12px 26px -18px rgba(49,94,251,.6)}
.pay-route-ch-head{display:flex;align-items:center;gap:10px}
.pay-route-ch-head .pay-ch-ic{flex:0 0 34px;height:34px;font-size:14px}
.pay-route-ch-head b{flex:1;min-width:0;font-size:15px;font-weight:800;color:#1f2d44}
.pay-route-ch-head em{padding:3px 10px;border-radius:999px;background:#eef2f8;color:#5b6b82;font-style:normal;font-size:12px;font-weight:700;white-space:nowrap}
.pay-route-ch.on .pay-route-ch-head em{background:#e8eeff;color:#315efb}
.pay-route-ch .pay-ch-mode button{padding:0 6px;font-size:12.5px;white-space:nowrap}
.pay-route-tip{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:118px;margin:0;padding:12px;border:1px dashed #e0e6f0;border-radius:10px;background:#f8fafc;color:var(--mg-sub);font-size:12px;line-height:1.6;text-align:center}
.pay-route-tip .op-btn{min-height:32px;border-radius:8px;border-color:#d9e1f0;color:#315efb}
.pay-route-lib{flex:1;display:flex;flex-direction:column;gap:12px}
.pay-route-lib>label+.pay-route-tip{min-height:60px}
.pay-route-own{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:1500px){.pr-grid{grid-template-columns:1fr}}
@media(max-width:1100px){.pr-rules{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.pr-thead{display:none}.pr-user{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"who side" "ali wx"}.pr-lib{grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"ava main state" "meta meta ops"}.pr-meta{flex-direction:row;gap:14px}}
@media(max-width:760px){.pay-route-chs{grid-template-columns:1fr}.pay-route-tip{min-height:64px}}
@media(max-width:640px){.pr-rules{grid-template-columns:1fr}.pr-col{padding:10px}.pr-col-head .pay-route-search,#app .pr-col-head .pay-route-search{width:100%}.pr-user{grid-template-columns:1fr;grid-template-areas:"who" "ali" "wx" "side"}.pr-side{flex-direction:row-reverse;justify-content:space-between;align-items:center}.pr-form,.pay-route-own,.pay-route-user>div{grid-template-columns:1fr}}
#adminUserMask .mg-user-pay-route{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:8px}
#adminUserMask .mg-user-pay-route .mg-user-note{flex:1;min-width:220px;margin:0}
@media(max-width:900px){.pay-channels{grid-template-columns:1fr}.pay-common-grid{grid-template-columns:1fr 1fr}.pay-common-grid label:first-child{grid-column:1/-1}}
@media(max-width:640px){.pay-common-grid,.pay-ch-body{grid-template-columns:1fr}.pay-block-head{flex-wrap:wrap}.pay-foot>span{margin-left:0;width:100%}.pay-foot>span button{flex:1}}
.payment-save{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.payment-save>span{display:flex;gap:10px;flex-wrap:wrap}
.payment-save button{min-height:42px;padding:0 20px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:14px;font-weight:700;cursor:pointer}
.payment-save button.ghost{background:#fff;color:#6d28d9;border:1px solid #ddd6fe}
.payment-save .hint{margin:0;font-size:12px;color:var(--mg-sub)}
.finance-config{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr)) 170px;align-items:end;gap:14px;max-width:1100px}
.finance-config label{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
.finance-config label input,.finance-config label select{height:42px;margin-top:0}
.finance-config label input:disabled{opacity:.55;cursor:not-allowed}
.finance-config-action{display:flex;align-items:flex-end;height:42px}
.finance-config button{width:100%;height:42px;min-height:42px;padding:0 22px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(99,102,241,.7)}
.finance-config button:hover{transform:translateY(-1px);filter:brightness(1.05)}
.finance-config button:disabled{opacity:.65;cursor:not-allowed;transform:none;filter:none}
@media(max-width:1100px){.finance-config{grid-template-columns:1fr 1fr}.finance-config>span{display:none}.finance-config-action{grid-column:1/-1}}
.finance-config-tip{margin:12px 0 0;font-size:12px;color:#8a94a6;line-height:1.7}
/* 佣金结算规则：默认收起成一行摘要，点标题栏或「展开修改」再改，提现审核表直接顶上来 */
#app .mg-fold-head{align-items:center;margin-bottom:18px;cursor:pointer;user-select:none}
#app .mg-fold-panel.is-folded .mg-fold-head{margin-bottom:0}
#app .mg-fold-panel.is-folded .mg-fold-body{display:none}
#app .mg-fold-head .mg-fold-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 14px;border:1px solid #c7d4fe;border-radius:9px;background:#fff;color:#315efb;font-size:13px;font-weight:700;box-shadow:none}
#app .mg-fold-head .mg-fold-btn::after{content:'';width:6px;height:6px;margin-top:-3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .18s}
#app .mg-fold-panel:not(.is-folded) .mg-fold-btn::after{margin-top:3px;transform:rotate(-135deg)}
#app .mg-fold-head:hover .mg-fold-btn{background:#f3f6ff;border-color:#9fb4fd;transform:none;filter:none}
#app .mg-fold-sum{display:none;flex-wrap:wrap;gap:8px;margin-top:10px}
#app .mg-fold-panel.is-folded .mg-fold-sum:not(:empty){display:flex}
#app .mg-fold-sum span{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid #e5eaf3;border-radius:8px;background:#f8fafc;font-size:12px;line-height:1;white-space:nowrap}
#app .mg-fold-sum i{font-style:normal;color:#8a94a6}
#app .mg-fold-sum b{font-weight:700;color:#1e293b}
/* 手机：收起时不要说明行，按钮钉在标题右侧，摘要整行铺开，卡片更矮 */
@media(max-width:640px){#app .mg-fold-head{position:relative;display:block}#app .mg-fold-head h2{min-height:32px;padding-right:96px}#app .mg-fold-panel.is-folded .mg-fold-head p{display:none}#app .mg-fold-head .mg-fold-btn{position:absolute;top:0;right:0;min-height:32px;padding:0 10px}#app .mg-fold-sum{gap:6px}#app .mg-fold-sum span{height:26px;padding:0 8px}}
@media(max-width:760px){.finance-config{grid-template-columns:1fr 1fr;max-width:none}.finance-config-action{grid-column:1/-1}.finance-config button{width:100%}}

/* 提现审核表（10 列）：原来按 9 列配的百分比 + min-width:1340px，加了「账户情况」后「操作」列没宽度、表格被撑宽，
   要横向拖到最右才能点通过。现在：胶囊/按钮这类不换行的列给固定像素，单号和收款信息两列分剩余宽度（单号可折两行、
   申请时间日期和时分折两行），常见 1366 宽笔记本及以上都能一屏放下；再窄才横向滚动，且「操作」列固定贴在右侧，始终点得到 */
.mg-console #right #adminFinance table.mg-wa-table{table-layout:fixed;width:100%;min-width:960px}
.mg-console #right #adminFinance .mg-wa-table th,.mg-console #right #adminFinance .mg-wa-table td{padding-left:10px;padding-right:10px;text-align:left}
.mg-wa-table th:nth-child(2){width:8%}
.mg-wa-table th:nth-child(3){width:90px}
.mg-wa-table th:nth-child(5){width:118px}
.mg-wa-table th:nth-child(6){width:112px}
.mg-wa-table th:nth-child(7){width:84px}
.mg-wa-table th:nth-child(8){width:92px}
.mg-wa-table th:nth-child(9){width:64px}
.mg-wa-table th:nth-child(10){width:128px}
.mg-console #right #adminFinance .mg-wa-table td:nth-child(1){font-size:12.5px;word-break:break-all;font-family:ui-monospace,Consolas,monospace}
.mg-console #right #adminFinance .mg-wa-table td:nth-child(8){font-size:13px;line-height:1.5}
.mg-console #right #adminFinance .mg-wa-table .mg-receipt-link{padding:0 10px}
.mg-console #right #adminFinance .mg-wa-table .op-btn{padding:0 11px}
.mg-console #right #adminFinance .mg-wa-table th:last-child,.mg-console #right #adminFinance .mg-wa-table td:last-child{position:sticky;right:0;z-index:1;box-shadow:-8px 0 10px -8px rgba(15,23,42,.14)}
.mg-console #right #adminFinance .mg-wa-table th:last-child{background:#f8fafc}
.mg-console #right #adminFinance .mg-wa-table td:last-child{background:#fff}
.mg-console #right #adminFinance .mg-wa-table tr:hover td:last-child{background:#faf9ff}
.mg-console #right #adminFinance .mg-wa-table td.empty{position:static;box-shadow:none}

/* 推广领取期限设置 */
/* 「有效时长」「天数」和到期说明都是「领取有效期」开关的子设置，原来裸放在外面、和上下的白底开关卡片视觉同级，
   看不出归属；这里收进带左侧竖线的浅底子块，紧贴开关卡片下方表达层级 */
#svcMask .mg-access-panel{margin:-6px 0 10px;padding:12px 14px;border:1px solid var(--mg-line);border-left:3px solid #c7d2fe;border-radius:10px;background:#f8fafc}
/* 原来是固定两列均分，而「天数」只在选「自定义天数」时才出现，导致平时下拉只占左半、右边空一大片；
   改成按内容排的弹性布局，单个字段不超 240px，选自定义时两框自然并排 */
#svcMask .mg-access-duration{display:flex;flex-wrap:wrap;gap:12px;padding:0 0 10px}
#svcMask .mg-access-duration label{display:flex;flex-direction:column;gap:6px;flex:1 1 180px;min-width:0;max-width:240px;font-size:13px}
#svcMask .mg-access-duration input,#svcMask .mg-access-duration select{width:100%;min-height:44px;box-sizing:border-box}
/* 子块自己已经是浅底，说明文字不再套一层灰底 */
#svcMask .mg-access-panel .mg-access-duration-note{margin:0;padding:0;background:none;font-size:12px}
#svcMask .mg-access-duration-note{font-size:13px;line-height:1.7;color:#6b7280;padding:10px 12px;background:#f7f9fc;border-radius:8px}
#svcMask [hidden]{display:none!important}
@media(max-width:640px){#svcMask .mg-access-duration label{flex:1 1 100%;max-width:none}}
/* 手工退款凭证闭环 */
.mg-refund-cell{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.mg-refund-detail-link{padding:3px 8px;border:1px solid #fecdd3;border-radius:999px;background:#fff5f6;color:#c92d49;font-size:10px;font-weight:800;line-height:1.35;white-space:nowrap;cursor:pointer}.mg-refund-detail-link:hover{border-color:#fda4af;background:#ffecef;color:#b4233f}
.refund-dialog{width:min(720px,100%)}.refund-form{display:grid;gap:15px}.refund-form .mg-block{margin:0}.refund-form .mg-block>em,.refund-proof-head em{color:#d93652;font-size:10px;font-style:normal}.refund-form .mg-block>span{float:right;color:#9aa5b5;font-size:10px}
.refund-order-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 20px;padding:14px 16px;border:1px solid #dfe6f2;border-radius:13px;background:#f8faff}.refund-order-card div{display:flex;flex-direction:column;gap:4px}.refund-order-card span{color:#7a8799;font-size:10px}.refund-order-card b{overflow:hidden;color:#26364e;font-size:12px;text-overflow:ellipsis}.refund-order-card strong{color:#d93652;font-size:20px}.refund-order-card small{grid-column:1/-1;color:#66758a;font-size:10px}
.refund-alert{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #ffd8ad;border-radius:10px;background:#fff9ef;color:#92521a;font-size:10px}.refund-alert b{flex:0 0 auto;padding:3px 7px;border-radius:6px;background:#ffeed6}.refund-alert span{line-height:1.6}
.refund-note textarea{min-height:84px;resize:vertical}.refund-proof-section{padding:13px;border:1px solid #e1e7f0;border-radius:12px;background:#fbfcfe}.refund-proof-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.refund-proof-head b{font-size:12px;color:#2d3d55}.refund-proof-head p{margin:4px 0 0;color:#8290a3;font-size:10px}.refund-proof-head>span{padding:3px 8px;border-radius:999px;background:#edf2ff;color:#315efb;font-size:10px;font-weight:800}
.refund-proof-grid{display:flex;gap:10px;flex-wrap:wrap;margin-top:11px}.refund-proof-item{position:relative;width:108px}.refund-proof-view{display:block;width:108px;height:82px;padding:0;overflow:hidden;border:1px solid #dbe3ef;border-radius:9px;background:#eef2f7;cursor:pointer}.refund-proof-view img{width:100%;height:100%;object-fit:cover}.refund-proof-item>span{display:block;margin-top:4px;color:#68778d;font-size:9px;text-align:center}.refund-proof-remove{position:absolute;top:-6px;right:-6px;width:20px;height:20px;padding:0;border:2px solid #fff;border-radius:50%;background:#d93652;color:#fff;font-size:14px;line-height:16px;cursor:pointer;box-shadow:0 3px 8px rgba(191,35,67,.28)}
.refund-proof-add{display:flex;align-items:center;gap:9px;margin-top:11px;padding:10px 12px;border:1px dashed #b8c8ea;border-radius:10px;background:#f5f8ff;color:#315efb;cursor:pointer}.refund-proof-add>i{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#e5ecff;font-size:18px;font-style:normal}.refund-proof-add>b{font-size:11px}.refund-proof-add>span{margin-left:auto;color:#8b98ab;font-size:9px}.refund-proof-add input{display:none}.refund-proof-add.is-uploading{opacity:.62;pointer-events:none}.refund-proof-add.is-uploading>b::after{content:'中…'}
.refund-submitbar{display:flex;justify-content:flex-end;gap:9px;padding-top:2px}.refund-submitbar button{min-height:38px;padding:0 18px;border-radius:9px;font-size:11px;font-weight:800;cursor:pointer}.refund-submitbar .ghost{border:1px solid #dce3ed;background:#fff;color:#536278}.refund-submitbar .danger{border:0;background:#d93652;color:#fff;box-shadow:0 8px 18px -9px rgba(217,54,82,.7)}.refund-submitbar button:disabled{opacity:.55;cursor:not-allowed}
.refund-detail-dialog{width:min(760px,100%)}.refund-detail-status{display:flex;align-items:center;gap:12px;padding:15px 16px;border:1px solid #bfe8d5;border-radius:13px;background:#f1fbf6}.refund-detail-status>i{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#19a868;color:#fff;font-size:18px;font-style:normal}.refund-detail-status>div{display:flex;flex:1;flex-direction:column;gap:3px}.refund-detail-status b{color:#177449;font-size:13px}.refund-detail-status span{color:#648173;font-size:10px}.refund-detail-status strong{color:#177449;font-size:20px}.refund-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin-top:14px;overflow:hidden;border:1px solid #e3e8f0;border-radius:11px;background:#e3e8f0}.refund-detail-grid>div{display:flex;flex-direction:column;gap:4px;min-width:0;padding:11px 13px;background:#fff}.refund-detail-grid span{color:#8290a3;font-size:9px}.refund-detail-grid b{overflow:hidden;color:#334258;font-size:11px;text-overflow:ellipsis}.refund-detail-grid b.danger{color:#d93652}.refund-detail-note{margin-top:14px;padding:12px 14px;border-radius:11px;background:#f7f9fc}.refund-detail-note>b,.refund-detail-title b{color:#334258;font-size:11px}.refund-detail-note p{margin:6px 0 0;color:#5e6c80;font-size:11px;line-height:1.7;white-space:pre-wrap}.refund-detail-title{display:flex;justify-content:space-between;margin-top:14px}.refund-detail-title span{color:#8a97aa;font-size:10px}.refund-detail-proofs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:9px}.refund-detail-proofs button{padding:0;overflow:hidden;border:1px solid #dfe5ee;border-radius:10px;background:#fff;cursor:pointer}.refund-detail-proofs img{display:block;width:100%;height:112px;object-fit:cover}.refund-detail-proofs span{display:block;padding:7px;color:#315efb;font-size:10px;font-weight:700}.refund-history-empty{margin-top:9px;padding:20px;border:1px dashed #d9e0ea;border-radius:10px;background:#fafbfc;color:#8793a5;font-size:11px;text-align:center}
@media(max-width:640px){.refund-order-card,.refund-detail-grid{grid-template-columns:1fr}.refund-detail-proofs{grid-template-columns:repeat(2,1fr)}.refund-detail-status{align-items:flex-start;flex-wrap:wrap}.refund-detail-status strong{width:100%;padding-left:46px}.refund-submitbar button{flex:1}}

/* 收款凭证：后台内弹窗完整预览，不跳转外部页面 */
/* 提现记录「查看凭证」：浅蓝胶囊按钮 + 图片图标，和右侧状态胶囊同高，悬停加深并轻微上浮 */
.mg-receipt-link{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 13px;border:1px solid #c7d7fe;border-radius:999px;background:#eff4ff;color:#2563eb;font-size:12.5px;font-weight:700;line-height:1;text-decoration:none!important;white-space:nowrap;cursor:pointer;transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s}
.mg-receipt-link svg{width:14px;height:14px;flex:none}
.mg-receipt-link:hover{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 4px 12px rgba(37,99,235,.25);transform:translateY(-1px)}
.mg-receipt-link:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(37,99,235,.22)}
.receipt-dialog{width:min(720px,100%);overflow:hidden}
.receipt-viewer{display:grid;place-items:center;min-height:360px;max-height:calc(90vh - 84px);overflow:auto;padding:20px;background:#f3f6fb}
.receipt-viewer img{display:block;max-width:100%;max-height:calc(90vh - 124px);object-fit:contain;border-radius:12px;background:#fff;box-shadow:0 12px 36px -18px rgba(15,23,42,.45)}
.receipt-viewer img[hidden]{display:none}
.receipt-view-status{display:flex;align-items:center;justify-content:center;min-height:180px;color:#64748b;font-size:13px;font-weight:700;text-align:center}
.receipt-view-status.err{color:#dc2626}

/* 弹窗：层级低于 toast（toast 100000） */
.mask{position:fixed;inset:0;z-index:6000;background:rgba(15,23,42,.55);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:20px}
.mask.show{display:flex;animation:mgFade .2s ease}
.mask.show>div{animation:mgPop .28s cubic-bezier(.2,.9,.3,1.15)}
.share-dialog,.editor-dialog{width:min(520px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 40px 100px -20px rgba(15,23,42,.5)}
.editor-dialog{width:min(880px,100%)}
.editor-dialog.narrow{width:min(580px,100%)}
.editor-dialog.wide{width:min(1080px,100%);background:#f8fafc}
.share-head{position:sticky;top:0;z-index:5;overflow:hidden;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 24px;margin-bottom:0;background:radial-gradient(circle at 90% -40%,rgba(255,255,255,.25),transparent 50%),linear-gradient(120deg,#4c1d95,#2563eb);color:#fff}
.share-head::after{content:'';position:absolute;width:160px;height:160px;right:60px;bottom:-110px;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.share-head>*{position:relative;z-index:1}
.share-head h2{margin:0 0 6px;font-size:19px;font-weight:800;color:#fff}
.share-head p{margin:0;font-size:12px;line-height:1.6;opacity:.85}
.icon-close{border:0;background:rgba(255,255,255,.16);color:#fff;width:34px;height:34px;border-radius:50%;font-size:20px;line-height:1;cursor:pointer;flex-shrink:0;transition:background .15s,transform .2s}
.icon-close:hover{background:rgba(255,255,255,.3);transform:rotate(90deg)}
.share-body{padding:22px 24px 26px}
.share-link-box span{font-size:13px;font-weight:700;color:#334155}
.share-link-box>div{display:flex;gap:8px;margin-top:6px}
.share-link-box input{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;background:#f8fafc}
.share-link-box button{min-height:42px;padding:0 18px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-weight:700;cursor:pointer}
.share-qr{display:flex;justify-content:center;padding:22px 0 14px}
.share-qr img,.share-qr canvas{width:200px;height:200px;padding:10px;box-sizing:content-box;border-radius:18px;border:1px solid var(--mg-line);background:#fff;box-shadow:0 16px 36px -14px rgba(76,29,149,.35)}
.share-qr-empty{width:200px;height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-radius:18px;border:1.5px dashed #e2e8f0;color:var(--mg-muted);font-size:13px}
.share-qr-empty svg{width:32px;height:32px}
.share-tip{margin:0;text-align:center;font-size:12px;color:var(--mg-sub)}
.share-tip.warn{color:#d97706;font-weight:700}
.editor-body{padding:20px 24px 24px}
.editor-foot{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap;align-items:center}
.editor-foot .foot-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.mg-foot-btns{display:flex;gap:10px;flex-wrap:wrap}
.editor-foot .hint{font-size:12px;color:var(--mg-sub);margin:0}
.grid.compact{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:14px}

/* 选择模板弹窗 */
.mg-pick-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid var(--mg-line)}
.mg-pick-steps{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:700;color:#475569}
.mg-pick-steps span{display:inline-flex;align-items:center;gap:6px}
.mg-pick-steps i{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--mg-grad);color:#fff;font-size:11px;font-style:normal}
.mg-pick-steps em{width:22px;height:1px;background:#cbd5e1}
/* 选择模板弹窗：去掉四步步骤条，只留标题+一句说明，刷新收进标题栏右侧 */
.mg-pick-headops{display:flex;align-items:center;gap:8px;flex-shrink:0}
.mg-pick-refresh{height:32px;padding:0 13px;border:1px solid #d6dff2;border-radius:8px;background:#fff;color:#475467;font-size:12.5px;font-weight:700;cursor:pointer;transition:border-color .15s,color .15s}
.mg-pick-refresh:hover{border-color:#315efb;color:#315efb}
.tpl-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));align-items:start}
.tpl-grid .mg-card .cover{height:140px}
.tpl-grid .mg-card.is-linked{border-color:#9fb4fb}
.mg-pick-live{position:relative;height:250px;overflow:hidden;border-bottom:1px solid #e7ebf3;background:#edf1f7 center/cover no-repeat}
.mg-pick-live iframe{display:block;width:100%;height:100%;border:0;background:#fff;opacity:0;transition:opacity .2s ease}
.mg-pick-live.is-loaded iframe{opacity:1}
.mg-pick-live-loading{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;background:rgba(247,249,253,.92);color:#7b8799;font-size:11px;transition:opacity .2s ease}
.mg-pick-live-loading b{font-size:11px;font-weight:600}.mg-pick-live.is-loaded .mg-pick-live-loading{opacity:0;pointer-events:none}.mg-pick-live.is-error .mg-pick-live-loading{color:#c2415d}
.mg-pick-scroll-tip{position:absolute;right:8px;bottom:8px;z-index:3;padding:4px 8px;border-radius:999px;background:rgba(23,32,51,.72);color:#fff;font-size:9px;font-weight:600;opacity:0;pointer-events:none;transition:opacity .2s ease}.mg-pick-live.is-loaded:hover .mg-pick-scroll-tip{opacity:1}
.mg-pick-live .cover-flag{z-index:4}.cover-flag.info{color:#315efb}
@media(max-width:640px){.tpl-grid{grid-template-columns:1fr}.mg-pick-live{height:280px}.mg-pick-scroll-tip{opacity:1}}

/* 组件编辑器 */
/* 组件工具栏：左侧「类型 + 位置 + 添加」一组铺满，右侧「常用」快捷按钮收成一个分段小组；窄屏换行时快捷组靠左不飘 */
.mg-comp-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px;border-radius:12px;background:#f8fafc;border:1px solid #e9eef6;margin-bottom:12px}
.mg-comp-add{display:flex;gap:8px;align-items:center;flex:1 1 420px;min-width:0}
.mg-comp-add select{width:auto;min-width:0;flex:1 1 180px}
.mg-comp-add select.comp-add-pos{flex:0 0 118px;color:#334155;font-weight:600}
.mg-comp-add button.add-primary{flex:0 0 auto;padding:0 16px;border:0;border-radius:10px;background:var(--mg-primary);color:#fff;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;box-shadow:0 6px 14px -6px rgba(49,94,251,.55);transition:background .15s,transform .15s}
.mg-comp-add button.add-primary:hover{background:#2a50e0;transform:translateY(-1px)}
.mg-quick-adds{display:inline-flex;align-items:center;gap:2px;flex:0 0 auto;height:42px;padding:0 4px;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.mg-quick-adds .mg-quick-lb{padding:0 8px 0 6px;margin-right:2px;border-right:1px solid #eef1f6;font-size:12px;font-weight:600;color:#94a3b8;white-space:nowrap}
.mg-quick-adds button{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:#475569;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s}
.mg-quick-adds button i{font-style:normal;font-size:14px;line-height:1}
.mg-quick-adds button:hover{background:#f1f5ff;color:var(--mg-primary)}
/* 全部收起 / 展开：与「常用」快捷条同高同框 */
.mg-fold-all{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;height:42px;padding:0 14px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;color:#475569;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s,border-color .15s}
.mg-fold-all i{font-style:normal;font-size:14px;line-height:1}
.mg-fold-all:hover{border-color:#bfd0ff;background:#f1f5ff;color:var(--mg-primary)}
.mg-fold-all[hidden]{display:none}
.mg-comp-list{display:grid;gap:0;margin-bottom:14px}
.mg-comp-item{position:relative;padding:14px;border-radius:14px;border:1px solid var(--mg-line);background:#fff;transition:border-color .15s,box-shadow .15s,opacity .15s}
.mg-comp-item:hover{border-color:#c7d6ff;box-shadow:0 8px 20px -10px rgba(49,94,251,.22)}
/* 拖动手柄 + 落点指示线 + 新增/移动后高亮一下 */
.comp-drag{display:inline-grid;place-items:center;width:20px;height:24px;margin-right:-2px;border-radius:6px;color:#94a3b8;font-size:16px;line-height:1;cursor:grab;user-select:none}
.comp-drag:hover{background:#f1f5ff;color:var(--mg-primary)}
.comp-drag:active{cursor:grabbing}
.mg-comp-item.dragging{opacity:.4;border-style:dashed}
.mg-comp-item.drop-before{box-shadow:0 -4px 0 -1px var(--mg-primary);border-color:#93b0ff}
.mg-comp-item.drop-after{box-shadow:0 4px 0 -1px var(--mg-primary);border-color:#93b0ff}
.mg-comp-item.is-new{animation:mgCompFlash 1.6s ease}
@keyframes mgCompFlash{0%,35%{border-color:#315efb;box-shadow:0 0 0 4px rgba(49,94,251,.18);background:#f5f8ff}100%{box-shadow:none;background:#fff}}
/* 卡片间插入点：平时是淡色小按钮，悬停出现虚线，点开展示组件类型 */
.comp-insert{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:22px;padding:3px 0}
.comp-insert::before{content:'';position:absolute;left:14px;right:14px;top:50%;border-top:1px dashed transparent;transition:border-color .15s}
.comp-insert:hover::before{border-top-color:#bfd0ff}
.comp-insert-btn{position:relative;z-index:1;height:20px;padding:0 10px;border:1px dashed #c7d6ff;border-radius:999px;background:#fff;color:var(--mg-primary);font-size:11px;font-weight:700;line-height:18px;cursor:pointer;opacity:.55;transition:opacity .15s,background .15s,border-color .15s}
.comp-insert:hover .comp-insert-btn,.comp-insert.open .comp-insert-btn{opacity:1;border-color:#93b0ff;background:#f1f5ff}
.comp-insert-menu{display:none;flex-wrap:wrap;justify-content:center;gap:6px;width:100%;box-sizing:border-box;margin-top:6px;padding:10px;border:1px dashed #bfd0ff;border-radius:12px;background:#f7f9ff}
.comp-insert.open{padding:6px 0}
.comp-insert.open::before{display:none}
.comp-insert.open .comp-insert-menu{display:flex}
.comp-insert-menu button{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 12px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;color:#475569;font-size:12px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s}
.comp-insert-menu button:hover{border-color:#bfd0ff;background:#f1f5ff;color:var(--mg-primary);transform:translateY(-1px)}
.comp-insert-menu button i{font-style:normal;font-size:14px;line-height:1}
.comp-insert.drop-on{min-height:30px}
.comp-insert.drop-on::before{border-top:3px solid var(--mg-primary);border-radius:3px}
.comp-insert.drop-on .comp-insert-btn{opacity:0}
.mg-comp-item .comp-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.mg-comp-item .comp-head b{display:flex;align-items:center;gap:8px;font-size:13px;color:#1e293b;font-weight:800}
.comp-idx{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:var(--mg-grad);color:#fff;font-size:12px;font-weight:800;flex-shrink:0}
.comp-icon{font-size:14px;line-height:1}
.mg-comp-item .comp-ops{display:flex;gap:8px;align-items:center}
.mg-comp-item .comp-ops button{min-height:32px;padding:0 12px;border:1px solid #e5e7eb;border-radius:9px;background:#fff;font-size:12px;font-weight:700;color:#4b5563;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s}
.mg-comp-item .comp-ops button:hover{border-color:#bfd0ff;background:#f1f5ff;color:var(--mg-primary);transform:translateY(-1px)}
.mg-comp-item .comp-ops button:disabled{opacity:.38;cursor:not-allowed;transform:none;background:#fff;border-color:#e5e7eb;color:#94a3b8}
/* 上移/下移连体分段控件：共用一个圆角外框、中间细线分隔，边界自动置灰 */
.mg-comp-item .ops-move{display:inline-flex;border:1px solid #e2e8f0;border-radius:9px;background:#fff;overflow:hidden;flex-shrink:0}
.mg-comp-item .ops-move button{min-width:34px;padding:0 9px;border:0;border-radius:0;font-size:14px;font-weight:800;color:#64748b}
.mg-comp-item .ops-move button+button{border-left:1px solid #eef1f8}
.mg-comp-item .ops-move button:hover:not(:disabled){background:#f1f5ff;color:var(--mg-primary);transform:none}
.mg-comp-item .comp-ops button.del{border-color:#fecdd3;color:#e11d48}
.mg-comp-item .comp-ops button.del:hover{background:#fff1f2;border-color:#fda4af;color:#e11d48}
/* 组件卡收起：点标题行空白处或「收起 / 展开」切换；收起后只剩标题行 + 一行摘要 */
.mg-comp-item .comp-head{cursor:pointer}
.mg-comp-item .comp-ops button.fold{color:var(--mg-primary);border-color:#d7e0f2}
.mg-comp-item.is-folded{padding-top:10px;padding-bottom:10px;background:#fbfcff}
.mg-comp-item.is-folded .comp-head{margin-bottom:0}
.mg-comp-item .comp-fold-sum{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:#64748b}
.mg-comp-item .comp-head>b+.comp-ops{margin-left:auto}
.mg-comp-item .comp-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.mg-comp-item .comp-fields label{font-size:12px}
/* 同排字段等高、输入框统一贴底：标题折行时也不会上下错位；支付按钮 6 个字段固定 3 列 = 两排铺满不留空 */
.mg-comp-item .comp-fields>label:not(.mg-block){display:flex;flex-direction:column;justify-content:space-between;gap:6px;min-width:0;margin:0}
.mg-comp-item .comp-fields>label:not(.mg-block)>input,.mg-comp-item .comp-fields>label:not(.mg-block)>select{width:100%;margin-top:0}
.mg-comp-item .comp-fields.is-3col{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:640px){.mg-comp-item .comp-fields.is-3col{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mg-comp-item .comp-fields input,.mg-comp-item .comp-fields select,.mg-comp-item .comp-fields textarea{min-height:38px;font-size:13px}
/* 开关式复选（组件选项/展示选项）：整卡可点、滑块开关，方便选择 */
.mg-switch{display:flex;align-items:center;gap:10px;margin:0;padding:10px 12px;border:1px solid var(--mg-line);border-radius:12px;background:#fff;font-size:13px;font-weight:600;color:#334155;cursor:pointer;transition:border-color .15s,background .15s}
.mg-switch:hover{border-color:#bfd0ff;background:#f8faff}
.mg-switch input[type=checkbox]{appearance:none;-webkit-appearance:none;width:38px;height:22px;min-height:0;margin:0;padding:0;border:0;border-radius:999px;background:#dbe3ef;position:relative;cursor:pointer;flex:0 0 auto;transition:background .18s}
.mg-switch input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.28);transition:left .18s}
.mg-switch input[type=checkbox]:checked{background:var(--mg-primary)}
.mg-switch input[type=checkbox]:checked::after{left:19px}
.mg-switch input:checked+span{color:#1e293b}
.mg-kf-inpay{margin-top:2px}.mg-kf-inpay span{min-width:0}.mg-kf-inpay small{display:block;margin-top:2px;color:#94a3b8;font-size:12px;font-weight:500;line-height:1.5}
.mg-comp-item .comp-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:10px}
.mg-comp-item .comp-checks .mg-switch{padding:9px 10px;font-size:12px}
/* 随机金额尾数小卡片：支付按钮里单独一行，左侧开关+说明，右侧开启后展开加价区间 */
.mg-comp-item .comp-rand-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;align-self:stretch;box-sizing:border-box;min-height:56px;margin-top:12px;padding:10px 14px;border:1px solid var(--mg-line);border-radius:12px;background:#f8fafc;transition:border-color .15s,background .15s}
.mg-comp-item .comp-fields.is-3col>.comp-rand-row{grid-column:span 2;margin-top:0}
.mg-comp-item .comp-rand-row:hover{border-color:#c7d2fe}
.mg-comp-item .comp-rand-row.is-on{border-color:#bfd0ff;background:linear-gradient(135deg,#f5f8ff,#eef4ff)}
.mg-comp-item .comp-rand-sw{flex:1 1 auto;min-width:0;padding:0;border:0;background:transparent}
.mg-comp-item .comp-rand-sw:hover{background:transparent}
.mg-comp-item .comp-rand-tx{display:flex;flex-direction:column;gap:2px;min-width:0}
.mg-comp-item .comp-rand-tx b{font-size:13px;font-weight:700;color:#1e293b;white-space:nowrap}
.mg-comp-item .comp-rand-tx small{font-size:11px;font-weight:500;color:#94a3b8;line-height:1.4}
.mg-comp-item .comp-rand-row .comp-rand-tx small.on,.mg-comp-item .comp-rand-row.is-on .comp-rand-tx small.off{display:none}
.mg-comp-item .comp-rand-row.is-on .comp-rand-tx small.on{display:inline;color:var(--mg-primary)}
.mg-comp-item .comp-rand-range{display:none;align-items:center;gap:6px;flex:0 0 auto;font-size:12px;font-weight:600;color:#475569}
.mg-comp-item .comp-rand-row.is-on .comp-rand-range{display:flex}
.mg-comp-item .comp-rand-range input,#app .mg-comp-item .comp-rand-range input{flex:0 0 68px;width:68px;min-width:0;height:34px;min-height:34px;padding:0 8px;margin:0;border-radius:8px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums;background:#fff}
.mg-comp-item .comp-rand-range i{font-style:normal;color:#94a3b8}
/* 套餐选择：与随机金额同款小卡片，开启后展开套餐名称 / 角标 / 默认选中 / 权益和「再加一个套餐」 */
.mg-comp-item .comp-pkg-row{margin-top:0;padding:10px 14px;border:1px solid var(--mg-line);border-radius:12px;background:#f8fafc;transition:border-color .15s,background .15s}
.mg-comp-item .comp-pkg-row.is-on{border-color:#fcd9b6;background:linear-gradient(135deg,#fffaf3,#fff4e8)}
.mg-comp-item .comp-pkg-row .comp-rand-tx small.on,.mg-comp-item .comp-pkg-row.is-on .comp-rand-tx small.off{display:none}
.mg-comp-item .comp-pkg-row.is-on .comp-rand-tx small.on{display:inline;color:#c2410c}
.mg-comp-item .comp-pkg-body{display:none;margin-top:12px}
.mg-comp-item .comp-pkg-row.is-on .comp-pkg-body{display:block}
/* 默认选中：标题在上、等高小框在下，与左侧输入框同排对齐；框里是常规尺寸开关 + 说明 */
.mg-comp-item .comp-pkg-body .comp-pkg-def-box{flex:1 1 auto;min-height:38px;box-sizing:border-box;padding:0 12px;gap:8px;border-color:#e5e7eb;border-radius:10px;font-weight:500}
.mg-comp-item .comp-pkg-body .comp-pkg-def-box em{min-width:0;font-style:normal;font-size:12px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-comp-item .comp-pkg-body .comp-pkg-def-box input:checked+em{color:#c2410c;font-weight:600}
.mg-comp-item .comp-pkg-body .comp-pkg-def-box:has(input:checked){border-color:#fdba74;background:#fff7ed}
.mg-comp-item .comp-pkg-body .comp-pkg-def-box input[type=checkbox]:checked{background:#f97316}
.mg-comp-item .comp-pkg-body .mg-block{display:block;margin-top:10px;font-size:12px}
.mg-comp-item .comp-pkg-body textarea{width:100%;min-height:76px;margin-top:6px;font-size:13px}
.mg-comp-item .comp-pkg-ops{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:10px}
.mg-comp-item .comp-pkg-ops button{min-height:34px;padding:0 14px;border:1px dashed #f59e0b;border-radius:999px;background:#fff;color:#c2410c;font-size:13px;font-weight:700;cursor:pointer}
.mg-comp-item .comp-pkg-ops button:hover{background:#fff7ed}
.mg-comp-item .comp-pkg-ops span{font-size:12px;color:var(--mg-muted)}
.mg-comp-item .comp-pkg-ops button.off{margin-left:auto;border:1px solid var(--mg-line);color:#64748b}
.mg-comp-item .comp-pkg-ops button.off:hover{border-color:#fca5a5;background:#fef2f2;color:#dc2626}
.mg-comp-item .comp-pkg-row.is-on .comp-pkg-body{margin-top:0}
/* 普通按钮的「＋ 添加套餐」入口：一个虚线大按钮 + 一句说明 */
.mg-comp-item .comp-pkg-entry{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;padding:12px 14px;border:1px dashed #fcd9b6;border-radius:12px;background:#fffbf5}
.mg-comp-item .comp-pkg-entry button{min-height:36px;padding:0 18px;border:1px solid #f59e0b;border-radius:999px;background:#fff;color:#c2410c;font-size:13px;font-weight:700;cursor:pointer}
.mg-comp-item .comp-pkg-entry button:hover{background:#f97316;border-color:#f97316;color:#fff}
.mg-comp-item .comp-pkg-entry span{flex:1 1 220px;font-size:12px;color:var(--mg-muted)}
/* 套餐列表：每个套餐一张白底小卡（编号 + 名称 / 价格 / 原价 / 后缀 / 角标 / 默认 / 权益），弹窗默认选中的那张描橙边 */
.mg-comp-item .comp-pkg-list{display:flex;flex-direction:column;gap:10px}
.mg-comp-item .comp-pkg-card{padding:12px 14px 14px;border:1px solid #fde2c4;border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.mg-comp-item .comp-pkg-card.is-def{border-color:#fb923c;box-shadow:0 0 0 3px rgba(249,115,22,.12)}
.mg-comp-item .comp-pkg-card.is-new{animation:mgPkgNew 1.4s ease}
@keyframes mgPkgNew{0%{background:#ffedd5}100%{background:#fff}}
.mg-comp-item .comp-pkg-card-h{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:10px}
.mg-comp-item .comp-pkg-card-h>b{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;font-size:13px;font-weight:800;color:#9a3412;white-space:nowrap}
.mg-comp-item .comp-pkg-no{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#f97316;color:#fff;font-size:11px;font-weight:800}
.mg-comp-item .comp-pkg-def-tag{display:none;flex:0 0 auto;padding:2px 8px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:11px;font-style:normal;font-weight:700}
.mg-comp-item .comp-pkg-card.is-def .comp-pkg-def-tag{display:inline-block}
.mg-comp-item .comp-pkg-card-tip{min-width:0;margin-left:auto;font-size:12px;color:var(--mg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-comp-item .comp-pkg-card-ops{display:inline-flex;gap:6px;flex:0 0 auto;margin-left:auto}
.mg-comp-item .comp-pkg-card-ops button{min-height:28px;padding:0 10px;border:1px solid var(--mg-line);border-radius:8px;background:#fff;color:#475569;font-size:12px;font-weight:600;cursor:pointer}
.mg-comp-item .comp-pkg-card-ops button:hover:not(:disabled){border-color:#fdba74;color:#c2410c}
.mg-comp-item .comp-pkg-card-ops button:disabled{opacity:.4;cursor:not-allowed}
.mg-comp-item .comp-pkg-card-ops button.del{border-color:#fecdd3;color:#e11d48}
.mg-comp-item .comp-pkg-card-ops button.del:hover{background:#fff1f2;color:#e11d48}
/* 套餐「隐藏」：配置保留、访客看不到；隐藏后卡片收成一行灰色条 */
.mg-comp-item .comp-pkg-card-ops button.vis{border-color:#cbd5e1;color:#475569}
.mg-comp-item .comp-pkg-card-ops button.vis.on{border-color:#93c5fd;background:#eff6ff;color:#2563eb}
.mg-comp-item .comp-pkg-card.is-hidden{padding-top:10px;padding-bottom:10px;border-style:dashed;border-color:#d7dce6;background:#f8fafc}
.mg-comp-item .comp-pkg-card.is-hidden .comp-pkg-card-h{margin-bottom:0}
.mg-comp-item .comp-pkg-card.is-hidden .comp-pkg-card-h>b{color:#94a3b8}
.mg-comp-item .comp-pkg-card.is-hidden .comp-pkg-no{filter:grayscale(1);opacity:.6}
.mg-comp-item .comp-pkg-card.is-hidden .comp-pkg-def-tag{display:none!important}
.mg-comp-item .comp-pkg-hide-sum{min-width:0;font-size:13px;font-weight:600;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-comp-item .comp-pkg-hide-tag{flex:0 0 auto;padding:2px 8px;border-radius:999px;background:#e2e8f0;color:#64748b;font-size:11px;font-style:normal;font-weight:700;white-space:nowrap}
.mg-comp-item .comp-pkg-card .comp-fields+.comp-fields{margin-top:10px}
.mg-comp-item .comp-fields.is-2col{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.mg-comp-item .comp-pkg-warn{margin-top:10px;padding:9px 12px;border:1px dashed #fdba74;border-radius:10px;background:#fffbeb;color:#b45309;font-size:12px;font-weight:600;line-height:1.5}
.mg-comp-item .comp-pkg-note{margin:8px 0 0;font-size:12px;color:#c2410c}
.mg-comp-item .comp-pkg-badge{margin-left:4px;padding:2px 8px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:11px;font-style:normal;font-weight:700}
/* 支付按钮分节：按钮与价格 / 促销氛围 / 展示选项，小标题 + 细虚线分隔，层次清楚不花哨 */
.mg-comp-item .comp-sec{margin-top:14px;padding-top:12px;border-top:1px dashed #e6eaf2}
.mg-comp-item .comp-head+.comp-sec{margin-top:0;padding-top:0;border-top:0}
.mg-comp-item .comp-sec-h{display:flex;align-items:center;gap:10px;min-width:0;margin-bottom:10px}
.mg-comp-item .comp-sec-h>b{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;font-size:13px;font-weight:800;color:#1e293b;white-space:nowrap}
.mg-comp-item .comp-sec-h>b::before{content:'';width:3px;height:12px;border-radius:3px;background:var(--mg-primary)}
.mg-comp-item .comp-sec-tip{font-size:12px;color:var(--mg-muted)}
.mg-comp-item .comp-sec .comp-checks{margin-top:0}
/* 支付按钮尺寸：高度 / 文字两条滑块并排，窄屏自动换行；没调时「恢复默认」置灰 */
.mg-comp-item .comp-size-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;margin-top:8px}
.mg-comp-item .comp-size{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 10px 0 12px;border:1px solid var(--mg-line);border-radius:12px;background:#fff}
.mg-comp-item .comp-size>span{flex:0 0 auto;font-size:13px;font-weight:700;color:#334155}
.mg-comp-item .comp-size input[type=range]{flex:1;min-width:60px;height:4px;margin:0;padding:0;border:0;accent-color:var(--mg-primary);cursor:pointer}
.mg-comp-item .comp-size b{flex:0 0 40px;font-size:12px;font-weight:800;color:var(--mg-primary);text-align:right;white-space:nowrap}
.mg-comp-item .comp-size button{flex:0 0 auto;height:26px;padding:0 10px;border:1px solid #d7e0f2;border-radius:999px;background:#fff;color:var(--mg-primary);font-size:12px;font-weight:700;cursor:pointer}
.mg-comp-item .comp-size button:hover:not(:disabled){border-color:var(--mg-primary)}
.mg-comp-item .comp-size button:disabled{color:#b6bfcd;border-color:#eef1f6;cursor:default}
/* 按钮实时效果胶囊：改文案/价格/后缀即时变化，不用看右侧预览也知道按钮长什么样 */
.mg-comp-item .comp-pay-prev{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:68%;margin-left:auto;padding:4px 12px;border-radius:999px;background:#f1f5ff;color:#64748b;font-size:12px;white-space:nowrap}
.mg-comp-item .comp-pay-prev b{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#1e293b;font-weight:700}
.mg-comp-item .comp-pay-prev .pp{color:#e11d48}
.mg-comp-item .comp-pay-prev s{margin-left:5px;color:#94a3b8;font-weight:500}
.mg-comp-item .comp-pay-prev em.rd{margin-left:4px;padding:1px 6px;border-radius:999px;background:#fff1f2;color:#e11d48;font-size:11px;font-style:normal;font-weight:600}
.mg-comp-item .comp-fields.is-4col{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media(max-width:900px){.mg-comp-item .comp-fields.is-4col{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 带单位输入框：¥ / 元 / 分钟 做成输入框两侧的灰底小格，整体一个边框 */
.mg-comp-item .comp-affix{display:flex;align-items:stretch;min-height:38px;box-sizing:border-box;border:1px solid #dfe3ee;border-radius:10px;background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.mg-comp-item .comp-affix:focus-within{border-color:var(--mg-primary);box-shadow:0 0 0 3px rgba(49,94,251,.12)}
.mg-comp-item .comp-affix i,.mg-comp-item .comp-affix em{display:flex;align-items:center;flex:0 0 auto;padding:0 10px;background:#f8fafc;color:#64748b;font-size:12px;font-style:normal;font-weight:600}
.mg-comp-item .comp-affix i{border-right:1px solid #eef1f8}
.mg-comp-item .comp-affix em{border-left:1px solid #eef1f8}
.mg-comp-item .comp-affix input,#app .mg-comp-item .comp-affix input{flex:1 1 auto;width:auto;min-width:0;min-height:36px;height:auto;margin:0;padding:0 10px;border:0!important;border-radius:0;background:transparent;box-shadow:none!important;font-variant-numeric:tabular-nums}
/* 使用说明：默认收起成一行，点开看详细规则；右侧带按钮ID */
.mg-comp-item .comp-tips{margin-top:12px;border:1px solid #eef1f8;border-radius:10px;background:#f8fafc}
.mg-comp-item .comp-tips summary{display:flex;align-items:center;gap:8px;padding:8px 12px;list-style:none;cursor:pointer;font-size:12px;font-weight:700;color:#64748b;user-select:none}
.mg-comp-item .comp-tips summary::-webkit-details-marker{display:none}
.mg-comp-item .comp-tips summary::before{content:'▸';font-size:11px;color:#94a3b8;transition:transform .15s}
.mg-comp-item .comp-tips[open] summary::before{transform:rotate(90deg)}
.mg-comp-item .comp-tips summary:hover{color:var(--mg-primary)}
.mg-comp-item .comp-tips-id{margin-left:auto;font:500 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#94a3b8}
.mg-comp-item .comp-tips ul{margin:0;padding:0 14px 10px 30px;font-size:12px;line-height:1.85;color:#64748b}
.mg-comp-item .comp-tips li b{color:#334155;font-weight:700}
.mg-editor-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
@media(max-width:800px){.mg-editor-cols{grid-template-columns:1fr}}
/* 展示选项：设置列表式（左标题+说明、右开关），从属字段缩进在开关下方，开关关闭时自动收起 */
.mg-display-opts{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:14px;background:#f8fafc;border:1px solid #eef1f8}
.mg-display-opts>b{display:flex;align-items:center;gap:8px;font-size:13px}
.mg-display-opts>b::before{content:'';width:4px;height:14px;border-radius:4px;background:var(--mg-grad)}
.mg-opt-list{border:1px solid var(--mg-line);border-radius:12px;background:#fff;overflow:hidden}
.mg-opt-group+.mg-opt-group{border-top:1px solid #eef1f6}
label.mg-switch.mg-opt{justify-content:space-between;gap:14px;padding:12px 14px;border:0;border-radius:0;background:transparent}
label.mg-switch.mg-opt:hover{background:#f8faff}
.mg-opt-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
.mg-opt-tx b{font-size:13px;font-weight:700;color:#1e293b}
.mg-opt-tx small{font-size:12px;font-weight:400;line-height:1.5;color:#94a3b8}
.mg-opt-sub{padding:0 14px 14px}
.mg-opt-sub label{display:block;margin:0;font-size:12px;font-weight:600;color:#475569}
.mg-opt-sub label>small{margin-left:6px;font-weight:400;color:#94a3b8}
.mg-opt-sub textarea{display:block;width:100%;min-height:84px;margin-top:6px}
.mg-opt-sub label.mg-opt-inline{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px}
#app .mg-opt-sub .mg-opt-inline input,.mg-opt-sub .mg-opt-inline input{width:84px;height:34px;min-height:34px;margin:0;text-align:center}
.mg-opt-sub .mg-opt-inline small{margin-left:0;font-size:12px}
.mg-opt-sub label.mg-opt-inline+label.mg-opt-inline,.mg-opt-sub label.mg-opt-inline+label{margin-top:10px}
#app .mg-opt-sub .mg-opt-inline select,.mg-opt-sub .mg-opt-inline select{width:auto;min-width:200px;height:34px;min-height:34px;margin:0;padding:0 28px 0 10px}
#app .mg-opt-sub .mg-opt-wide input,.mg-opt-sub .mg-opt-wide input{width:180px;text-align:left;padding:0 10px}
#app #optOrderCastDays,#optOrderCastDays{min-width:90px}
.mg-opt-group:has(#optDanmaku:not(:checked)) .mg-opt-sub,.mg-opt-group:has(#optOrderCast:not(:checked)) .mg-opt-sub,.mg-opt-group:has(#optSoldShow:not(:checked)) .mg-opt-sub,.mg-opt-group:has(#optHotOn:not(:checked)) .mg-opt-sub{display:none}
/* 折叠设置卡：主题配色 / 展示选项各自一张，默认收起只留一行摘要，点整行展开 */
.mg-set-card.mg-fold{flex-shrink:0;padding:0;overflow:hidden}
.mg-fold>summary{display:flex;align-items:center;gap:12px;min-height:54px;padding:12px 16px;list-style:none;cursor:pointer;user-select:none;transition:background .15s}
.mg-fold>summary::-webkit-details-marker{display:none}
.mg-fold>summary:hover{background:#f4f7ff}
.mg-fold>summary>b{flex:0 0 auto;font-size:14px;color:var(--mg-text);padding-left:10px;border-left:3px solid var(--mg-primary);line-height:1.3}
.mg-fold-sum{flex:1 1 auto;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;color:#8a94a6}
.mg-fold-sum .cnt{font-weight:700;color:#475569}
.mg-fold-sum .off{color:#a0a9b8}
.mg-fold-sum .chip{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;background:#eef2ff;color:#3651d4;font-style:normal;font-weight:600;line-height:1.6}
.mg-fold-sum .dot{width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px rgba(15,23,42,.15)}
.mg-fold-go{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border:1px solid #dce5ff;border-radius:999px;background:#fff;color:var(--mg-primary);font-size:12px;font-style:normal;font-weight:700}
.mg-fold-go::before{content:'展开设置'}
.mg-fold-go::after{content:'';width:6px;height:6px;margin-top:-3px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:rotate(45deg);transition:transform .15s}
.mg-fold[open]>summary{border-bottom:1px dashed #e6eaf3;background:#f8faff}
.mg-fold[open] .mg-fold-go::before{content:'收起'}
.mg-fold[open] .mg-fold-go::after{margin-top:3px;transform:rotate(-135deg)}
.mg-fold-body{padding:14px 16px 16px}
.mg-fold .mg-theme-box,.mg-fold .mg-display-opts{padding:0;border:0;border-radius:0;background:none}

/* 模板编辑器：左侧手机实时预览 + 右侧分组配置（对齐付费单页编辑器体验） */
.editor-dialog.tpl-editor{width:min(1180px,100%);max-height:94vh;display:flex;flex-direction:column;overflow:hidden;background:#fff}
/* 标题栏不参与 flex 压缩，避免被弹窗高度挤扁后裁出半行字 */
.tpl-editor .share-head{flex:none;align-items:center}
.tpl-editor .share-head h2{margin:0}
.tpl-editor .editor-body{flex:1;min-height:0;display:grid;grid-template-columns:440px minmax(0,1fr);padding:0}
.mg-preview-side{padding:20px 22px;overflow-y:auto;border-right:1px solid var(--mg-line);background:linear-gradient(180deg,#f6f8ff 0,#f8f9fc 100%)}
.preview-label{margin-bottom:12px;color:#526075;font-size:14px;font-weight:700}
.preview-label small{display:block;margin-top:2px;color:#98a1b2;font-size:12px;font-weight:400}
.preview-status{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
/* 状态标签可换行，金额固定在右侧不被挤压 */
.preview-status span{display:flex;flex-wrap:wrap;gap:5px;min-width:0}
.preview-status span em{padding:3px 9px;border:1px solid #dce5ff;border-radius:999px;color:#4c1d95;background:#fff;font-size:12px;font-style:normal;font-weight:700;line-height:18px;white-space:nowrap}
.preview-status span em:first-child{border-color:#bbf7d0;color:#15803d;background:#f0fdf4}
.preview-status b{flex-shrink:0;color:#e11d48;font-size:18px;font-weight:800;line-height:26px;white-space:nowrap}
.mg-preview-side .phone{width:395px;max-width:100%;box-sizing:border-box;margin:0 auto;padding:10px;border-radius:34px;background:#182033;box-shadow:0 18px 40px rgba(21,28,48,.22)}
.phone-screen{height:740px;border-radius:24px;overflow:hidden;background:#fff;position:relative}
.phone-screen iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.preview-links{display:flex;justify-content:center;gap:9px;margin-top:13px}
.preview-links button{min-height:36px;padding:0 16px;border:1px solid #ddd6fe;border-radius:9px;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s}
.preview-links button:hover{background:#f5f3ff}
.preview-tip{margin:12px 4px 0;font-size:12px;color:#8a94a6;line-height:1.7}
.mg-settings-side{display:flex;flex-direction:column;min-width:0;overflow-y:auto;padding:18px 22px 26px;background:#fff}
.mg-set-card{padding:16px;border:1px solid var(--mg-line);border-radius:16px;background:#fbfcff;margin-bottom:14px;box-shadow:0 4px 14px rgba(15,23,42,.03)}
.mg-set-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.mg-set-head b{font-size:14px;color:var(--mg-text);padding-left:10px;border-left:3px solid var(--mg-primary);line-height:1.3}
.mg-set-head span{font-size:12px;color:#8a94a6}
.mg-set-card .grid.compact,.mg-set-card .mg-comp-toolbar{margin-bottom:0}
.mg-set-card .mg-comp-list{margin-top:12px;margin-bottom:0}
.mg-foot-btns{display:flex;gap:10px;flex-wrap:wrap}
.tpl-editor .editor-foot{position:sticky;bottom:-26px;justify-content:flex-end;gap:14px;margin:0 -22px -26px;padding:12px 22px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-top:1px solid #eef1f8}
.tpl-editor .editor-foot .foot-actions{display:flex;gap:10px;flex-wrap:nowrap;flex-shrink:0}
.tpl-editor .editor-foot .hint{flex:1;min-width:0;line-height:1.6}
.editor-foot button.ghost{background:#fff;color:#6d28d9;border:1px solid #ddd6fe;box-shadow:none}
.editor-foot button.ghost:hover{background:#f5f3ff}
@media(max-width:980px){
  .tpl-editor .editor-body{grid-template-columns:1fr}
  .mg-preview-side{border-right:0;border-bottom:1px solid var(--mg-line);max-height:44vh}
  .phone-screen{height:380px}
}

/* 经营总览三栏：手机预览 | 模板选择 | 收益详情（对标竞品版式） */
.mg-overview-top{display:grid;grid-template-columns:minmax(340px,400px) minmax(320px,1fr) minmax(240px,330px);gap:16px;align-items:stretch}
.mg-overview-top>.panel{margin-bottom:0}
.mg-preview-panel .mg-pv-body{display:flex;flex-direction:column;gap:12px;padding:16px 18px 18px;align-items:center}
.mg-pv-phone{width:100%}
.mg-pv-phone .phone{width:100%;max-width:310px;margin:0 auto;padding:9px;border-radius:30px;background:#182033;box-shadow:0 16px 36px rgba(21,28,48,.20)}
.mg-pv-phone .phone-screen{height:600px;border-radius:22px;overflow:hidden;background:#fff;position:relative}
.mg-pv-phone .phone-screen iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.mg-pv-cap{margin:0;text-align:center;font-size:12px;color:#8a94a6;line-height:1.7}
/* 模板选择中间卡 */
.mg-tplsel-body{display:flex;flex-direction:column;gap:12px;padding:16px 18px 18px}
.mg-tplsel-body>select{width:100%;min-height:42px;border:1px solid var(--mg-line);border-radius:10px;background:#f8fafc;padding:0 12px;font-size:14px;font-weight:600;color:#1f2937}
.mg-tplsel-notice{padding:10px 12px;border-radius:10px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-size:12px;line-height:1.7}
.mg-tplsel-notice b{display:block;color:#78350f}
.mg-tplsel-gen{min-height:46px;border:0;border-radius:12px;background:linear-gradient(135deg,#8b5cf6,#6d28d9);color:#fff;font-size:15px;font-weight:800;cursor:pointer;box-shadow:0 10px 22px rgba(109,40,217,.28);transition:filter .15s}
.mg-tplsel-gen:hover{filter:brightness(1.06)}
.mg-tplsel-link{display:flex;gap:8px}
.mg-tplsel-link input{flex:1;min-width:0;min-height:38px;border:1px solid var(--mg-line);border-radius:10px;background:#f8fafc;padding:0 10px;font-size:12px;color:#4b5563}
.mg-tplsel-link button{min-height:38px;padding:0 14px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.mg-tplsel-link button:hover{background:#f5f3ff}
.mg-tplsel-info{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;color:#1f2937;font-weight:600}
.mg-tplsel-info b{color:#7c3aed;font-weight:800;white-space:nowrap}
.mg-tplsel-remark{padding:9px 12px;border-radius:10px;background:#f5f3ff;border:1px solid #ede9fe;color:#6d28d9;font-size:12px;line-height:1.7}
.mg-tplsel-remark b{display:inline-block;margin-right:8px;padding:2px 8px;border-radius:6px;background:#ede9fe;color:#5b21b6;font-size:11px}
.mg-tplsel-ops{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.mg-tplsel-ops button{min-height:38px;padding:0 6px;border:1px solid #e5e7f0;border-radius:10px;background:#fbfcff;color:#6b7280;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}
.mg-tplsel-ops button:hover{background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe}
/* 访问趋势 */
.mg-trend-tools{position:relative;display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.mg-trend-now{color:#8b96a8;font-size:12.5px;font-variant-numeric:tabular-nums;white-space:nowrap}
/* 分段切换：实时 / 昨天 / 近7天 / 近30天 / 自定义，连成一条，选中项蓝边蓝字 */
.mg-trend-switch{display:flex;gap:0}
/* 时间范围切换优先级高于 .panel-head button：未选中白底，当前选中淡蓝底 */
.panel-head .mg-trend-switch button{position:relative;min-height:34px;margin-left:-1px;padding:0 16px;border:1px solid #e1e6ef;border-radius:0;background:#fff;box-shadow:none;color:#536176;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.panel-head .mg-trend-switch button:first-child{margin-left:0;border-radius:8px 0 0 8px}
.panel-head .mg-trend-switch button:last-child{border-radius:0 8px 8px 0}
.panel-head .mg-trend-switch button:hover{z-index:1;border-color:#cbd7fb;background:#f8faff;color:#315efb;transform:none;filter:none;box-shadow:none}
.panel-head .mg-trend-switch button.active{z-index:2;background:#f1f5ff;border-color:#315efb;color:#315efb;font-weight:700;box-shadow:none}
/* 自定义日历浮层：双月并排，未来日期灰底不可选，今天下方蓝点，起止日蓝底、中间淡蓝 */
.mg-trend-cal{position:absolute;right:0;top:calc(100% + 8px);z-index:40;width:560px;padding:12px 16px 10px;border:1px solid #e3e8f2;border-radius:12px;background:#fff;box-shadow:0 18px 40px -12px rgba(15,23,42,.25);user-select:none}
.mg-trend-cal .cal-nav{position:absolute;top:12px;left:12px;display:flex;gap:2px}
.mg-trend-cal .cal-nav.r{left:auto;right:12px}
.mg-trend-cal .cal-nav span{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;color:#647187;font-size:16px;cursor:pointer}
.mg-trend-cal .cal-nav span:hover{background:#f1f5ff;color:#315efb}
.mg-trend-cal .cal-nav span.off{color:#d3d8e1;cursor:not-allowed;background:none}
.mg-trend-cal .cal-ms{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.mg-trend-cal .cal-t{height:28px;line-height:28px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #eef1f6;box-sizing:content-box;text-align:center;color:#1d2b45;font-size:13.5px;font-weight:700}
.mg-trend-cal .cal-w,.mg-trend-cal .cal-d{display:grid;grid-template-columns:repeat(7,1fr);row-gap:3px}
.mg-trend-cal .cal-w span{height:28px;line-height:28px;text-align:center;color:#8b96a8;font-size:12.5px}
.mg-trend-cal .cal-d span{position:relative;height:32px;line-height:32px;text-align:center;color:#1d2b45;font-size:13px;cursor:pointer}
.mg-trend-cal .cal-d span[data-d]:hover{border-radius:7px;background:#eef3ff;color:#315efb}
.mg-trend-cal .cal-d span.out{color:#c8ced8;cursor:default}
.mg-trend-cal .cal-d span.dis{background:#f5f7fa;color:#c3c9d4;cursor:not-allowed}
.mg-trend-cal .cal-d span.in{background:#eef3ff;color:#315efb}
.mg-trend-cal .cal-d span.edge,.mg-trend-cal .cal-d span.edge:hover{border-radius:7px;background:#315efb;color:#fff;font-weight:700}
.mg-trend-cal .cal-d span.now::after{content:'';position:absolute;left:50%;bottom:3px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#315efb}
.mg-trend-cal .cal-d span.edge.now::after{background:#fff}
.mg-trend-cal .cal-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:9px;border-top:1px solid #eef1f6}
.mg-trend-cal .cal-foot em{font-style:normal;color:#8b96a8;font-size:12px}
.mg-trend-cal .cal-foot em b{color:#315efb}
.mg-trend-cal .cal-foot span{padding:4px 10px;border:1px solid #dce3f0;border-radius:7px;color:#536176;font-size:12px;cursor:pointer;white-space:nowrap}
.mg-trend-cal .cal-foot span:hover{border-color:#b9c8f8;color:#315efb}
@media(max-width:640px){.mg-trend-tools{justify-content:flex-start}.mg-trend-switch{width:100%}.panel-head .mg-trend-switch button{flex:1;padding:0 6px}.mg-trend-cal{left:0;right:auto;width:min(320px,calc(100vw - 40px))}.mg-trend-cal .cal-ms{grid-template-columns:1fr}.mg-trend-cal .cal-m:first-child{display:none}}
.mg-trend-body{padding:6px 22px 22px;min-height:500px}
.mg-trend-body .mg-empty{min-height:420px}
.mg-trend-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:2px 0 10px}
.mg-trend-summary>div{position:relative;overflow:hidden;min-height:92px;padding:15px 18px;border:1px solid #e3e8f2;border-radius:12px;background:#fbfcff}
.mg-trend-summary>div::before{content:'';position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:0 4px 4px 0;background:#315efb}
.mg-trend-summary>div.orders::before{background:#f3aa18}.mg-trend-summary>div.rate::before{background:#13a978}
.mg-trend-summary span{display:block;color:#69778c;font-size:13px}.mg-trend-summary b{display:inline-block;margin-top:6px;color:#1d2b45;font-size:30px;line-height:1}.mg-trend-summary small{margin-left:8px;color:#9aa5b5;font-size:11.5px}
/* 趋势图：平滑折线（SVG）+ 左侧刻度 + 日期轴；鼠标在图上任意位置移动，吸附到最近一天显示竖向参考线与当天明细浮层 */
.mg-line{position:relative;margin-top:14px;user-select:none}
.mg-line svg{display:block;width:100%;overflow:visible}
.mg-line .grid line{stroke:#e9edf4;stroke-dasharray:4 4}
.mg-line .grid line.base{stroke:#dfe5ef;stroke-dasharray:none}
.mg-line .ylab{fill:#8b96a8;font-size:12px}
.mg-line .xlab{fill:#8b96a8;font-size:12px}
.mg-line .xlab.today{fill:#315efb;font-weight:700}
.mg-line .ln{fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.mg-line .ln.v{stroke:#315efb}.mg-line .ln.o{stroke:#f3aa18}
.mg-line .dot{fill:#fff;stroke-width:1.6}
.mg-line .dot.v{stroke:#315efb}.mg-line .dot.o{stroke:#f3aa18}
.mg-line .guide{stroke:#9fb0cf;stroke-width:1;stroke-dasharray:4 3}
.mg-line .hot{stroke:#fff;stroke-width:2.5}
.mg-line .hot.v{fill:#315efb}.mg-line .hot.o{fill:#f3aa18}
.mg-line .hover-layer{opacity:0;transition:opacity .12s}
.mg-line.on .hover-layer{opacity:1}
.mg-line .hit{fill:transparent;cursor:crosshair}
.mg-line-tip{position:absolute;top:8px;left:0;z-index:6;min-width:160px;padding:10px 12px;border:1px solid #e3e8f2;border-radius:10px;background:rgba(255,255,255,.97);box-shadow:0 12px 28px -10px rgba(15,23,42,.28);pointer-events:none;opacity:0;transition:opacity .12s}
.mg-line.on .mg-line-tip{opacity:1}
.mg-line-tip>b{display:block;margin-bottom:6px;padding-bottom:6px;border-bottom:1px solid #eef1f6;color:#1d2b45;font-size:12.5px;font-weight:800;white-space:nowrap}
.mg-line-tip>span{display:flex;align-items:center;gap:7px;margin-top:4px;color:#647187;font-size:12.5px;white-space:nowrap}
.mg-line-tip>span i{width:8px;height:8px;border-radius:50%;background:#315efb}.mg-line-tip>span i.o{background:#f3aa18}.mg-line-tip>span i.r{background:#13a978}
.mg-line-tip>span em{margin-left:auto;padding-left:16px;font-style:normal;color:#1d2b45;font-size:13.5px;font-weight:800}
.mg-chart-legend .hint{border-style:dashed;color:#8792a5;font-size:12px}
.mg-chart-legend{display:flex;gap:22px;justify-content:center;align-items:center;margin-top:12px;font-size:13.5px;color:#647187}
@media(max-width:900px){.mg-trend-body{min-height:420px;padding:4px 14px 16px}.mg-trend-summary b{font-size:22px}.mg-chart-legend{flex-wrap:wrap;gap:10px}}
.mg-chart-legend span{padding:7px 12px;border:1px solid #e7ebf3;border-radius:999px;background:#fff}.mg-chart-legend b{color:#2c3a51}
.mg-chart-legend i{display:inline-block;width:14px;height:4px;border-radius:4px;margin-right:7px;vertical-align:3px}
.mg-chart-legend i.v{background:#315efb}.mg-chart-legend i.o{background:#f3aa18}
/* 访问构成：Top5 条形 / 浏览器环形图 / 高频 IP 表格 + 黑名单胶囊 */
.mg-insight{margin-top:14px}
.it-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.it-panel{margin-bottom:0;padding:18px 20px}
.it-panel .panel-head{margin-bottom:12px}
.it-panel.it-wide{grid-column:1/-1}
.it-row{display:flex;align-items:center;gap:10px;padding:7px 0}
.it-rank{width:18px;height:18px;flex:none;border-radius:6px;background:#eef3ff;color:#315efb;font-size:11px;font-weight:700;display:grid;place-items:center}
.it-name{flex:none;width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2c3a51;font-size:13px;font-weight:600}
.it-bar{flex:1;height:8px;border-radius:99px;background:#eef1f6;overflow:hidden}
.it-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#5b8cff,#315efb)}
.it-row em{font-style:normal;width:44px;text-align:right;color:#8b96a8;font-size:12.5px}
.it-row b{width:56px;text-align:right;color:#1d2b45;font-size:13.5px}
.it-empty{padding:26px 0;text-align:center;color:#9aa5b5;font-size:13px}
.it-browser{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.it-donut{position:relative;width:170px;height:170px;flex:none;border-radius:50%}
.it-hole{position:absolute;inset:26px;border-radius:50%;background:#fff;display:grid;place-content:center;text-align:center}
.it-hole b{color:#315efb;font-size:24px;line-height:1.1}
.it-hole span{color:#8b96a8;font-size:12px}
.it-legend{flex:1;min-width:200px;display:grid;grid-template-columns:1fr 1fr;gap:8px 18px}
.it-legend div{display:flex;align-items:center;gap:7px;font-size:12.5px;color:#536176}
.it-legend i{width:9px;height:9px;border-radius:3px;flex:none}
.it-legend em{margin-left:auto;font-style:normal;color:#8b96a8}
.it-table{width:100%;border-collapse:collapse;table-layout:fixed}
.it-table th{padding:9px 10px;background:#f7f9fc;color:#69778c;font-size:12.5px;font-weight:600;text-align:left}
.it-table td{padding:10px;border-top:1px solid #eef1f6;color:#2c3a51;font-size:13px;text-align:left}
/* 列宽固定：表头与表体同列同宽，避免内容居中/左混排导致上下错位 */
.it-table th:first-child,.it-table td:first-child{width:70px}
.it-table th:nth-child(3),.it-table td:nth-child(3){width:120px}
.it-table th:last-child,.it-table td:last-child{width:110px}
.it-table td.ip{font-family:Consolas,Menlo,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.it-table .op-btn{min-height:30px;padding:0 12px;font-size:12px}
.it-panel .mg-pager{padding-top:12px}
.it-black{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px dashed #e3e8f2}
.it-black>b{color:#69778c;font-size:12.5px}
.it-black span{display:inline-flex;align-items:center;gap:8px;padding:5px 8px 5px 10px;border:1px solid #fecdd3;border-radius:8px;background:#fff5f6;color:#b91c1c;font-size:12.5px;font-family:Consolas,Menlo,monospace}
.it-black span em{font-style:normal;color:#c98f96;font-size:11.5px}
.it-black span i{width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:#ffe4e6;color:#b91c1c;font-size:12px;font-style:normal;cursor:pointer}
.it-black span i:hover{background:#b91c1c;color:#fff}
.it-black em.none{color:#9aa5b5;font-size:12.5px;font-style:normal}
.mg-black-ip{padding:14px 16px;border:1px solid #fecdd3;border-radius:10px;background:#fff5f6;color:#b91c1c;font-size:15px;font-weight:700;font-family:Consolas,Menlo,monospace;text-align:center}
/* 拉黑确认弹窗留白放宽：IP 胶囊与按钮之间、按钮与弹窗底边之间不再紧贴 */
#ipBlackMask .editor-body{padding:26px 26px 24px}
#ipBlackMask .editor-foot{margin-top:22px}
.editor-foot .foot-actions button.danger{background:#e11d48;box-shadow:0 6px 14px -6px rgba(225,29,72,.5);color:#fff}
@media(max-width:900px){.it-grid{grid-template-columns:1fr}.it-name{width:130px}}
/* 推广记录筛选区 */
.mg-rec-filters{display:grid;grid-template-columns:1.3fr .9fr 1fr 1.2fr auto;gap:10px;align-items:end;padding:14px 18px 6px}
.mg-rec-filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#6b7280;margin:0}
.mg-rec-filters input,.mg-rec-filters select{width:100%;min-height:38px;border:1px solid var(--mg-line);border-radius:10px;background:#f8fafc;padding:0 10px;font-size:13px;color:#1f2937}
.mg-rec-dates{display:flex;align-items:center;gap:6px}
.mg-rec-dates em{font-style:normal;color:#9aa3b2;font-size:12px}
.mg-rec-btns{display:flex;gap:8px}
.mg-rec-hints{padding:0 18px 10px}
.mg-rec-hints p{margin:0 0 2px;font-size:12px;color:#9aa3b2}
/* 全部下单：顶部黄条说明未付款单数；未付款行整行置灰、金额划线 */
.mg-rec-sum{margin:0 0 10px;padding:10px 14px;border:1px solid #fde68a;border-radius:10px;background:#fffbeb;color:#92400e;font-size:13px;line-height:1.6}
.mg-rec-sum[hidden]{display:none}
.mg-rec-sum b{color:#78350f}
#recordList tr.mg-row-unpaid td{background:#fafbfc;color:#94a3b8}
#recordList tr.mg-row-unpaid .mg-amt{text-decoration:line-through}
/* 访问记录表：时间/IP/访客标识固定宽并不折行，剩下的宽度让给「推广链接」和「设备 / 来源」；
   访客标识和短码是哈希，用等宽字体比对更容易，完整值在 title 里悬停可看 */
#recordThead th.mg-visit-ctime,#recordList td.mg-visit-ctime{width:168px;white-space:nowrap}
.mg-visit-link{display:flex;flex-direction:column;gap:2px;min-width:0}
.mg-visit-link b{font-size:13px;font-weight:700;color:var(--mg-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-visit-link small{font-size:11px;color:var(--mg-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace;white-space:nowrap}
#recordList td.mg-visit-vid{width:150px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:var(--mg-sub);white-space:nowrap;cursor:help}
#recordList td.mg-visit-ip{width:140px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace;font-size:12px;white-space:nowrap}
#recordList td.mg-visit-ua{max-width:300px;font-size:12px;color:var(--mg-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:help}
.mg-subtabs b{margin:0;min-width:28px;padding:2px 8px;border-radius:999px;font-size:12px;text-align:center;font-variant-numeric:tabular-nums;background:#e2e8f0;color:#526177}
.panel-head .mg-subtabs button.active b{background:#eef3ff;color:#315efb}
.panel-head .mg-subtabs button.active[data-sub="paid"] b{background:#dcfce7;color:#0a7d50}
/* 选择模板弹窗卡片 */
.mg-pick-remark{margin:2px 0 8px;padding:8px 10px;border-radius:10px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-size:12px;line-height:1.6}
.mg-pick-remark b{display:inline-block;margin-right:8px;padding:2px 8px;border-radius:6px;background:#fde68a;color:#78350f;font-size:11px}
.mg-pick-price{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:#6b7280;margin-bottom:8px}
.mg-pick-price i{font-style:normal;color:#7c3aed;font-size:15px;font-weight:800}
.mg-pick-linkbox{display:flex;flex-direction:column;gap:6px;margin:8px 0 0;font-size:12px;font-weight:600;color:#6b7280}
.mg-pick-linkbox input{width:100%;min-height:36px;border:1px solid var(--mg-line);border-radius:9px;background:#f8fafc;padding:0 10px;font-size:12px;color:#4b5563}
.mg-pick-notice{margin:8px 0 0;padding:8px 10px;border-radius:9px;font-size:12px;font-weight:600}
.mg-pick-notice.ok{background:#f5f3ff;border:1px solid #ddd6fe;color:#6d28d9}
.mg-pick-notice.err{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c}
/* 模板档案弹窗：左手机预览 + 右独属数据 */
.editor-dialog.tpl-detail{width:min(1040px,96vw)}
.mg-detail-body{display:grid;grid-template-columns:330px minmax(0,1fr);gap:18px;padding:18px}
.mg-detail-phone .phone{width:310px;margin:0 auto;padding:9px;border-radius:30px;background:#182033;box-shadow:0 16px 36px rgba(21,28,48,.20)}
.mg-detail-phone .phone-screen{height:620px;border-radius:22px;overflow:hidden;background:#fff;position:relative}
.mg-detail-phone .phone-screen iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.mg-detail-phone .mg-pv-cap{margin-top:10px}
.mg-detail-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.mg-detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mg-dstat{padding:12px 14px;border:1px solid var(--mg-line);border-radius:12px;background:#fbfcff}
.mg-dstat span{display:block;font-size:12px;color:#8a94a6;margin-bottom:4px}
.mg-dstat b{font-size:18px;color:#1f2937}
.mg-dstat b.hl{color:#7c3aed}
.mg-detail-link label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#6b7280}
.mg-detail-link input{width:100%;min-height:38px;border:1px solid var(--mg-line);border-radius:10px;background:#f8fafc;padding:0 10px;font-size:12px;color:#4b5563}
.mg-detail-ops{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px}
.mg-detail-ops>.op-btn{width:100%;min-width:0;min-height:38px;padding:0 10px}
.mg-detail-payments{grid-column:1/-1;min-width:0;margin-top:2px;padding:16px;border:1px solid #e8e4ff;border-radius:16px;background:linear-gradient(145deg,#fff 0%,#fbfaff 100%)}
.mg-detail-pay-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.mg-detail-pay-head h3{margin:0;color:#1f2937;font-size:16px;font-weight:800}
.mg-detail-pay-head p{margin:4px 0 0;color:#8a94a6;font-size:12px}
.mg-detail-pay-table{width:100%;overflow-x:auto;border:1px solid #eef1f8;border-radius:12px;background:#fff}
.mg-detail-pay-table table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}
.mg-detail-pay-table th{padding:10px 12px;text-align:left;white-space:nowrap;background:#f8fafc;border-bottom:1px solid #eef1f8;color:#7b8495;font-size:12px;font-weight:800}
.mg-detail-pay-table td{padding:11px 12px;border-bottom:1px solid #f1f3f9;color:#253047;vertical-align:middle}
.mg-detail-pay-table tr:last-child td{border-bottom:0}
.mg-detail-pay-table tr:hover td{background:#fcfbff}
.mg-detail-pay-table td.empty{text-align:center;padding:28px;color:#8a94a6}
.mg-pay-time{white-space:nowrap}.mg-pay-time small{display:block;margin-top:3px;color:#e11d48;font-size:11px}
.mg-pay-order{max-width:235px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;word-break:break-all}
.mg-income-ok{color:#059669;font-size:13px}.mg-income-reversed{color:#e11d48;font-size:12px;font-weight:700}
.mg-detail-pay-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.mg-detail-pay-foot span{color:#8a94a6;font-size:12px}
.mg-detail-pay-foot button{min-height:34px;padding:0 16px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:#6d28d9;font-size:12px;font-weight:700;cursor:pointer}
.mg-detail-pay-foot button:hover{background:#f5f3ff}.mg-detail-pay-foot button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:760px){.mg-detail-body{grid-template-columns:1fr}.editor-dialog.tpl-detail{width:96vw}.mg-detail-payments{padding:12px}.mg-detail-pay-head{align-items:flex-start}.mg-detail-pay-head p{max-width:210px}}
/* 模板修改记录：左侧版本列表 + 右侧手机预览 */
.editor-dialog.tpl-history{width:min(980px,96vw)}
.mg-history-body{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;padding:18px}
.mg-history-list{display:flex;flex-direction:column;gap:10px;max-height:560px;overflow:auto;padding-right:4px}
.mg-history-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--mg-line);border-radius:12px;background:#fff;transition:border-color .15s,background .15s}
.mg-history-item:hover{border-color:#c7d2fe}
.mg-history-item.on{border-color:#6d5efc;background:#f6f5ff;box-shadow:0 0 0 2px rgba(109,94,252,.12)}
.mg-history-main{min-width:0;flex:1;cursor:pointer}
.mg-history-main b{font-size:14px;color:#1f2937;margin-right:8px}
.mg-history-main p{margin:4px 0 2px;font-size:13px;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-history-main span:not(.badge){display:block;font-size:12px;color:#8a94a6;line-height:1.7}
.mg-history-item .op-row{flex-shrink:0;flex-wrap:nowrap}
.mg-history-phone .phone{width:310px;margin:0 auto;padding:9px;border-radius:30px;background:#182033;box-shadow:0 16px 36px rgba(21,28,48,.20)}
.mg-history-phone .phone-screen{height:620px;border-radius:22px;overflow:hidden;background:#fff;position:relative}
.mg-history-phone .phone-screen iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.mg-history-phone .mg-pv-cap{margin-top:10px}
@media(max-width:760px){.mg-history-body{grid-template-columns:1fr}.mg-history-list{max-height:none}.mg-history-item{flex-direction:column;align-items:stretch}.editor-dialog.tpl-history{width:96vw}}
/* 入口域名绑定弹窗：域名池（平台/自有分组点选）/ 入口地址标签行带状态与复制测试解绑 / 输入+保存同行实时校验 / 部署包 / 三步指引折叠 */
/* 复制/打开测试/解绑：已并入「入口地址」标签行，原「当前推广入口」卡的 .mg-entry-now* 样式已随结构移除 */
.mg-entry-ops{display:flex;gap:6px;margin-top:8px}
.mg-entry-ops[hidden],.mg-entry-unbind[hidden],.mg-entry-check[hidden]{display:none!important}
.mg-entry-ops button{min-height:28px;padding:0 10px;border:1px solid #d9e1f0;border-radius:8px;background:#fff;color:#315efb;font-size:12px;font-weight:700;cursor:pointer}
.mg-entry-ops button:hover{background:#f5f8ff;border-color:#b9c8f5}
.mg-entry-unbind{font-size:12px;color:#94a3b8;text-decoration:none}
.mg-entry-unbind:hover{color:#dc2626;text-decoration:none}
.mg-entry-inrow{display:flex;gap:8px;margin-top:6px}
.mg-entry-inrow input{flex:1;min-width:0}
.mg-entry-inrow input:focus{outline:0;border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.12)}
.mg-entry-inrow button{flex:0 0 auto;min-height:42px;padding:0 22px;border:0;border-radius:10px;background:#315efb;color:#fff;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap}
.mg-entry-inrow button:hover{background:#2a50d8}
.mg-entry-check{margin:6px 0 0;font-size:12px;font-weight:600;word-break:break-all}
.mg-entry-check.ok{color:#059669}
.mg-entry-check.bad{color:#dc2626}
.mg-entry-tip{margin:6px 0 0;font-size:12px;color:#94a3b8;line-height:1.6}
/* 会员群域名池：代理入口弹窗与管理员代配弹窗共用；弹窗在 #app 外，不加 #app 前缀 */
.mg-pool-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px}
.mg-pool-head b{font-size:13px;color:#1f2937}
.mg-pool-head span{font-size:12px;color:#94a3b8;text-align:right}
.mg-pool{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;max-height:168px;overflow:auto;padding:1px}
.mg-pool-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;margin:0;padding:9px 11px;border:1px solid #dfe3ee;border-radius:10px;background:#fff;text-align:left;cursor:pointer;box-shadow:none;transition:border-color .15s,background .15s}
.mg-pool-item:hover{border-color:#b9c8f5;background:#f8faff}
.mg-pool-item.on{border-color:#315efb;background:#f0f4ff;box-shadow:inset 0 0 0 1px #315efb}
.mg-pool-item b{max-width:100%;overflow:hidden;font-size:13px;font-weight:700;color:#1f2937;text-overflow:ellipsis;white-space:nowrap}
.mg-pool-item i{max-width:100%;overflow:hidden;font-size:12px;font-style:normal;color:#64748b;text-overflow:ellipsis;white-space:nowrap}
.mg-pool-item.on b{color:#315efb}
.mg-pool-item.last{border-style:dashed;background:#fcfcfd}
.mg-pool-item.last.on{border-style:solid;background:#f0f4ff}
.mg-pool-empty{grid-column:1/-1;padding:12px;border:1px dashed #dfe3ee;border-radius:10px;font-size:12px;color:#94a3b8;line-height:1.7;text-align:center}
.mg-pool-empty a{color:#315efb;font-weight:700}
.mg-entry-saverow{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:2px 0 14px}
.mg-entry-saverow button{min-height:38px;padding:0 18px;border:0;border-radius:10px;background:#6d28d9;color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.mg-entry-dl{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px 14px;border:1px dashed #dce5fb;border-radius:12px;background:#f7f9ff;margin-bottom:12px}
.mg-entry-dl b{font-size:13px;color:#1f2937}
.mg-entry-dl p{margin:4px 0 0;font-size:12px;color:#8a94a6;line-height:1.7}
/* 明确限定下载 ghost 按钮，避免与后置全局 button.ghost 同特异性时被覆成紫色；平台 dim 态仍由下方规则覆盖 */
.mg-entry-dl button.ghost{flex:0 0 auto;min-height:38px;padding:0 14px;border:1px solid #d9e1f0;border-radius:10px;background:#fff;color:#315efb;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s}
.mg-entry-dl button.ghost:hover{background:#f5f8ff}
.mg-entry-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:4px}
.mg-entry-steps i{display:flex;width:22px;height:22px;border-radius:50%;background:#edf2ff;color:#315efb;font-size:12px;font-weight:800;font-style:normal;align-items:center;justify-content:center;margin-bottom:6px}
.mg-entry-steps b{font-size:13px;color:#1f2937}
.mg-entry-steps p{margin:4px 0 0;font-size:12px;color:#8a94a6;line-height:1.6}
@media(max-width:560px){.mg-entry-steps{grid-template-columns:1fr}}
/* 入口域名池（v2，代理入口弹窗与管理员代配弹窗共用）：主行完整名称/备注，副行完整 URL；长内容自然换行 */
.mg-pool.v2{grid-template-columns:1fr;gap:6px;max-height:none;overflow:visible}
/* 域名不多（≤6 条）时全展开，不出现半截卡片；多了才限高滚动 */
.mg-pool.v2.scroll{max-height:252px;overflow:auto;padding-right:5px;scrollbar-width:thin;scrollbar-color:#d7dceb transparent}
.mg-pool.v2.scroll::-webkit-scrollbar{width:6px}
.mg-pool.v2.scroll::-webkit-scrollbar-track{background:transparent}
.mg-pool.v2.scroll::-webkit-scrollbar-thumb{background:#d7dceb;border-radius:999px}
.mg-pool.v2.scroll::-webkit-scrollbar-thumb:hover{background:#b9c8f5}
.mg-pool.v2 .mg-pool-item{flex-direction:row;align-items:flex-start;gap:10px;position:relative;overflow:hidden;padding:9px 12px 9px 14px}
.mg-pool.v2 .mg-pool-item .pi-txt{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.mg-pool.v2 .mg-pool-item b{font-size:13.5px;line-height:1.35}
.mg-pool.v2 .mg-pool-item i{font-size:11.5px;line-height:1.55}
.mg-pool.v2 .mg-pool-item b,.mg-pool.v2 .mg-pool-item i{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;word-break:break-word}
.mg-pool.v2 .mg-pool-item i em{font-style:normal;color:#94a3b8}
.mg-pool.v2 .mg-pool-item.last i em{color:#b48a2f}
.mg-pool.v2 .mg-pool-item.on::before{content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:24px;border-radius:0 3px 3px 0;background:#315efb}
.mg-pool-shell{position:relative}
.mg-pool-fade{position:absolute;left:1px;right:11px;bottom:1px;height:34px;border-radius:0 0 10px 10px;background:linear-gradient(rgba(255,255,255,0),#fff 72%);pointer-events:none}
.mg-pool-fade[hidden]{display:none}
/* 计数必须提权到 .mg-pool-head .mg-pool-count：上面 .mg-pool-head span 是 (0,1,1)，单类名压不过它 */
.mg-pool-head .mg-pool-count{flex:0 0 auto;font-size:12px;font-weight:700;color:#64748b;text-align:right}
.mg-pool-head .mg-pool-count[hidden]{display:none}
.mg-pool-cur{flex:0 0 auto;align-self:flex-start;margin-top:1px;padding:3px 9px;border-radius:999px;background:#ecfdf5;color:#059669;font-size:11px;font-weight:800;white-space:nowrap}
/* 分组小标题：平台域名 / 我自己的域名；只有同时存在两组时才渲染，滚动时吸顶 */
.mg-pool-gt{grid-column:1/-1;position:sticky;top:-1px;z-index:2;display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:4px 2px 5px;background:#fff}
.mg-pool-gt b{font-size:11.5px;font-weight:800;color:#64748b}
.mg-pool-gt em{font-style:normal;font-weight:600;color:#a8b2c4}
.mg-pool-gt span{flex:0 0 auto;font-size:11.5px;font-weight:700;color:#a8b2c4}
.mg-pool-gt~.mg-pool-gt{margin-top:6px;padding-top:9px;border-top:1px solid #eef1f7}
/* 入口地址标签行：状态徽章与复制/测试/解绑并排，省掉独立的「当前推广入口」卡（同一地址原本要显示三遍） */
.mg-entry-lab{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:2px}
.mg-entry-lab>label{margin:0}
.mg-entry-lab .mg-state-badge{padding:4px 9px;font-size:11px}
.mg-entry-lab-ops{display:flex;align-items:center;gap:7px}
.mg-entry-lab-ops[hidden]{display:none}
.mg-entry-lab-ops .mg-entry-ops{margin:0}
.mg-entry-ops button[hidden]{display:none}
/* 部署包卡片跟随所选域名强弱：平台域名转灰，自有域名加蓝边 + 「必做」徽章 */
.mg-entry-dl.dim{border-color:#eef1f7;background:#fafbfd}
.mg-entry-dl.dim b{color:#8a94a6}
.mg-entry-dl.dim p{color:#b4bcc9}
.mg-entry-dl.dim button{color:#8a94a6;border-color:#e8ebf4}
.mg-entry-dl.need{border-style:solid;border-color:#b9c8f5;background:#f5f8ff}
.mg-entry-dl[hidden]{display:none}
.mg-entry-must{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;background:#fff7e8;color:#b46a13;font-size:11px;font-weight:800;vertical-align:1px}
.mg-entry-must[hidden]{display:none}
/* 3 步指引默认折叠；展开后单列横排（原三列每格仅 170px，会把句子切碎） */
.mg-entry-help{margin-bottom:4px}
.mg-entry-help>button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:0 12px;border:1px solid var(--mg-line);border-radius:10px;background:#fff;color:#475569;font-size:12.5px;font-weight:700;cursor:pointer}
.mg-entry-help>button:hover{border-color:#b9c8f5;background:#f8faff}
.mg-entry-help>button i{font-style:normal;color:#94a3b8;transition:transform .15s}
.mg-entry-help.open>button i{transform:rotate(180deg)}
.mg-entry-help .mg-entry-steps{display:none;grid-template-columns:1fr;gap:10px;margin:10px 0 2px}
.mg-entry-help.open .mg-entry-steps{display:grid}
.mg-entry-help .mg-entry-steps>div{display:grid;grid-template-columns:22px 1fr;gap:2px 10px}
.mg-entry-help .mg-entry-steps i{grid-row:1;align-self:center;margin:0}
.mg-entry-help .mg-entry-steps b{grid-column:2;align-self:center}
.mg-entry-help .mg-entry-steps p{grid-column:2;margin:0}
.mg-entry-foot-hint{margin:0;font-size:12px;color:#94a3b8}
/* 仅入口弹窗的完成按钮沿用已确认预览的紫色，不受后置工作台主题转灰规则影响 */
#entryMask .editor-foot button.ghost{color:#6d28d9;border-color:#e2d8fb}
#entryMask .editor-foot button.ghost:hover{color:#6d28d9;background:#f5f3ff}
.mg-tpl-entry-config{margin-top:2px}.mg-tpl-entry-config>.mg-hint{margin:8px 0 0;line-height:1.7}
/* 面板头多按钮与入口文案配置弹窗行：文字输入 + 显隐开关同行 */
.mg-head-actions{display:flex;gap:8px;align-items:center}
.mg-label-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin-bottom:12px}
.mg-label-row .mg-block{margin:0}
.mg-label-row .mg-switch{margin:0;white-space:nowrap}
.mg-tpl-entry-preview{min-height:260px;margin-top:12px;border:1px dashed #d8dce8;border-radius:14px;background:#f5f5f5;display:grid;place-items:center;overflow:hidden;text-align:center}.mg-tpl-entry-preview span{display:block}
.tpl-entry-direct{padding:36px 20px}.tpl-entry-direct b,.tpl-entry-direct small{display:block}.tpl-entry-direct b{font-size:18px;color:#1f2937}.tpl-entry-direct small{margin-top:7px;color:#8a94a6;font-size:12px}
.tpl-entry-auto{width:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#000;color:#fff}.tpl-entry-auto i{width:42px;height:42px;margin-bottom:16px;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;animation:mgSpin .8s linear infinite}.tpl-entry-auto p{margin:0;color:#fff;font-size:14px}
.tpl-entry-h6{width:100%;min-height:260px;padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff}.tpl-penguin{position:relative;width:64px;height:64px;margin-bottom:6px;border-radius:50%;background:linear-gradient(135deg,#1e88e5,#64b5f6);box-shadow:0 4px 12px rgba(30,136,229,.2)}.tpl-penguin .head{position:absolute;top:8px;left:8px;width:48px;height:48px;border-radius:50%;background:#fff}.tpl-penguin .face{position:absolute;top:8px;left:8px;width:32px;height:32px;border-radius:50%;background:#1e88e5}.tpl-penguin .beak{position:absolute;top:20px;left:36px;width:12px;height:8px;border-radius:50%;background:#ff9800;transform:rotate(-20deg)}.tpl-penguin em{position:absolute;top:14px;right:9px;width:19px;height:19px;border-radius:50%;background:#757575;color:#fff;font:700 16px/19px Arial;font-style:normal}.tpl-entry-h6 h3{margin:10px 0 0;color:#000;font-size:16px;font-weight:500}.tpl-entry-h6 p{max-width:250px;margin:10px 0 12px;color:#757575;font-size:12px;line-height:1.6}.tpl-entry-h6>span{width:230px;margin-top:7px;padding:9px;border-radius:7px;color:#fff;font-size:12px;font-weight:600}.tpl-h6-go{background:linear-gradient(135deg,#1e88e5,#64b5f6);box-shadow:0 4px 12px rgba(30,136,229,.3)}.tpl-h6-back{background:#212121}
.tpl-entry-h7{width:100%;min-height:260px;padding:14px;background:#f5f5f5;display:grid;place-items:center}.tpl-h7-card{width:100%;max-width:280px;overflow:hidden;border-radius:13px;background:#fff;box-shadow:0 4px 20px rgba(0,0,0,.05)}.tpl-h7-head{position:relative;padding:14px;background:linear-gradient(135deg,#1a6dfc,#0d5bdb)}.tpl-h7-head:after{position:absolute;left:50%;bottom:-14px;width:28px;height:28px;transform:translateX(-50%);border-radius:50%;background:#fff;content:""}.tpl-h7-head i{position:relative;z-index:2;display:grid;place-items:center;width:52px;height:52px;margin:0 auto;border:10px solid #fff;border-radius:50%;background:linear-gradient(135deg,#1a6dfc,#0d5bdb);box-shadow:0 4px 12px rgba(0,0,0,.1);color:#fff;font-size:18px;font-style:normal}.tpl-h7-content{padding:23px 14px 14px}.tpl-h7-content h3{margin:0;color:#1a1a1a;font-size:16px;font-weight:600}.tpl-h7-content p{margin:13px 0;padding:8px 10px;border-left:3px solid #1a6dfc;border-radius:6px;background:#f8f9fa;color:#888;font-size:10px;line-height:1.5;text-align:left}.tpl-h7-content span{margin-top:7px;padding:9px;border-radius:7px;font-size:12px}.tpl-h7-go{background:linear-gradient(135deg,#1a6dfc,#0d5bdb);box-shadow:0 4px 12px rgba(26,109,252,.3);color:#fff}.tpl-h7-back{background:#f0f0f0;color:#666}
@media(max-width:1200px){.mg-overview-top{grid-template-columns:1fr 1fr}.side-income{grid-column:1/-1}}
@media(max-width:860px){.mg-overview-top{grid-template-columns:1fr}.mg-rec-filters{grid-template-columns:1fr 1fr}.mg-tplsel-ops{grid-template-columns:1fr 1fr}}
/* ghost 按钮全局兜底（低特异性：顶栏/面板头等单独定义仍可覆盖）：任何容器里的 ghost 都不再落浏览器默认黑框 */
button.ghost{min-height:36px;padding:0 14px;border:1px solid #ddd6fe;border-radius:10px;background:#fff;color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;box-shadow:none;transition:background .15s}
button.ghost:hover{background:#f5f3ff}
button.ghost.danger{border-color:#fecaca;color:#b91c1c}
button.ghost.danger:hover{background:#fef2f2}
/* 去掉 bootstrap reboot 给 button:focus 套的黑色焦点圈（点过的按钮残留黑框）；键盘 Tab 导航保留淡紫指示 */
button:focus{outline:0}
button:focus-visible{outline:2px solid #c4b5fd;outline-offset:2px}

/* 支付后跳转设置 */
.mg-select-label select{font-weight:700}
.mg-paycfg-summary{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#f8fafc;border:1px solid #eef1f8}
.mg-paycfg-summary:empty{display:none}
.mg-paycfg-summary p{margin:8px 0 0;font-size:12px;color:var(--mg-sub)}
.mg-paycfg-summary b{color:#e11d48}
.mg-paycfg-summary.ok{background:#f0fdf4;border-color:#bbf7d0}
.mg-paycfg-summary.ok b,.mg-paycfg-summary.ok p{color:#047857}
.mg-progress{height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden}
.mg-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#f43f5e,#f59e0b);transition:width .35s ease}
.mg-paycfg-summary.ok .mg-progress span{background:linear-gradient(90deg,#10b981,#059669)}
.mg-paycfg-list{display:grid;gap:12px}
.mg-paycfg-item{padding:16px;border-radius:14px;border:1px solid var(--mg-line);background:#fff;transition:border-color .2s,background .2s}
.mg-paycfg-item.done{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4 0,#fff 64px)}
.mg-paycfg-item .head{display:flex;gap:10px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.mg-paycfg-item .head .idx{width:24px;height:24px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:var(--mg-grad);color:#fff;font-size:12px;font-weight:800}
.mg-paycfg-item .head b{font-size:15px;color:var(--mg-text)}
.mg-paycfg-item .head .badge{margin-left:auto}
/* 支付后跳转弹窗：双列表单 + 解锁按钮实时预览 + 保存右对齐 */
.mg-paycfg-row{display:grid;grid-template-columns:minmax(0,1fr) 168px;gap:10px;align-items:end;margin-bottom:12px}
.mg-paycfg-row label{margin:0}
.mg-paycfg-row .mg-color-label input[type="color"]{width:100%;height:42px;padding:4px;border:1px solid var(--mg-line);border-radius:10px;background:#fff;cursor:pointer}
@media(max-width:560px){.mg-paycfg-row{grid-template-columns:1fr}}
.mg-paycfg-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.mg-paycfg-preview{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--mg-sub);font-weight:600}
.mg-paycfg-preview i{font-style:normal;min-width:104px;padding:8px 16px;border-radius:10px;color:#fff;font-size:13px;font-weight:700;text-align:center;letter-spacing:.5px;box-shadow:0 8px 16px -8px rgba(15,23,42,.45);transition:background .15s}
.mg-paycfg-save{min-height:40px;padding:0 26px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px -8px rgba(99,102,241,.7);transition:transform .15s,filter .15s}
.mg-paycfg-save:hover{transform:translateY(-1px);filter:brightness(1.05)}
.mg-paycfg-save:disabled{opacity:.6;cursor:not-allowed;transform:none}
/* 支付后跳转弹窗对齐参照版式：顶部告知条 + 标题行价格右置 + 输入下提示 + 底部完成栏 */
.mg-paycfg-notice{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-size:13px;line-height:1.7}
.mg-paycfg-notice b{display:block;color:#78350f;margin-bottom:2px}
.mg-paycfg-item .head{justify-content:space-between;align-items:baseline}
.mg-paycfg-item .head b{font-size:14px;font-weight:700;color:#1f2937}
.mg-paycfg-price{margin-left:auto;color:#7c3aed;font-size:15px;font-weight:800;white-space:nowrap}
.mg-paycfg-hint{margin:-2px 0 12px;font-size:12px;color:#8a94a6;line-height:1.6}
/* 套餐组：共用地址说明 + 「每个套餐单独设置跳转」折叠区，套餐行填了地址标绿「单独地址」，空着标灰「跟随共用」 */
.mg-paycfg-share{margin:-4px 0 8px}.mg-paycfg-share b{margin-right:6px;padding:1px 8px;border-radius:999px;background:#eef2ff;color:#4f46e5;font-size:11.5px;font-weight:700}
/* 「每个套餐单独设置跳转」：做成显眼的浅紫入口条（图标 + 大标题 + 说明 + 右侧「点击展开」按钮），收起时也一眼看得见 */
.mg-paycfg-pkgs{margin-top:16px;border:1.5px solid #c7d2fe;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 14px rgba(79,70,229,.08)}
.mg-paycfg-pkgs>summary{display:flex;align-items:center;gap:12px;padding:13px 14px;cursor:pointer;list-style:none;background:linear-gradient(90deg,#eef2ff,#f5f3ff);user-select:none;transition:background .15s}
.mg-paycfg-pkgs>summary:hover{background:linear-gradient(90deg,#e0e7ff,#ede9fe)}
.mg-paycfg-pkgs>summary::-webkit-details-marker{display:none}
.mg-paycfg-pkgs>summary .ico{flex:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#4f46e5;color:#fff;font-size:16px;font-style:normal;box-shadow:0 3px 8px rgba(79,70,229,.3)}
.mg-paycfg-pkgs>summary .tt{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.mg-paycfg-pkgs>summary .tt b{font-size:15px;font-weight:800;color:#3730a3}
.mg-paycfg-pkgs>summary .tt em{font-size:12.5px;font-style:normal;font-weight:500;color:#6366f1}
.mg-paycfg-pkgs>summary .cnt{flex:none;padding:3px 10px;border-radius:999px;background:#fff;border:1px solid #c7d2fe;color:#64748b;font-size:12px;font-weight:700}
.mg-paycfg-pkgs>summary .cnt.on{background:#dcfce7;border-color:#86efac;color:#15803d}
.mg-paycfg-pkgs>summary .tg{flex:none;padding:6px 12px;border-radius:9px;background:#4f46e5;color:#fff;font-size:12.5px;font-weight:700;text-decoration:none;white-space:nowrap}
.mg-paycfg-pkgs>summary .tg:after{content:'点击展开 ▾'}.mg-paycfg-pkgs[open]>summary .tg{background:#fff;color:#4f46e5;box-shadow:inset 0 0 0 1px #c7d2fe}.mg-paycfg-pkgs[open]>summary .tg:after{content:'收起 ▴'}
.mg-paycfg-pkgs:not([open])>summary .tg{animation:mgPkgTgPulse 2.2s ease-in-out infinite}
@keyframes mgPkgTgPulse{0%,100%{box-shadow:0 0 0 0 rgba(79,70,229,.45)}50%{box-shadow:0 0 0 6px rgba(79,70,229,0)}}
.mg-paycfg-pkgs[open]>summary{border-bottom:1px solid #e0e7ff}
.mg-paycfg-pkgs>.mg-paycfg-sub{margin:10px 14px 0}
.mg-paycfg-pkgs>.mg-paycfg-hint{margin:10px 14px 14px}
@media (max-width:560px){.mg-paycfg-pkgs>summary{flex-wrap:wrap}.mg-paycfg-pkgs>summary .tt{flex-basis:calc(100% - 46px)}.mg-paycfg-pkgs>summary .cnt{margin-left:46px}.mg-paycfg-pkgs>summary .tg{margin-left:auto}}
.mg-paycfg-sub{margin-top:10px;padding:12px;border:1px solid var(--mg-line);border-radius:12px;background:#fafbfd}
.mg-paycfg-sub.done{border-color:#bbf7d0;background:#f6fef9}
.mg-paycfg-sub-h{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}.mg-paycfg-sub-h b{font-size:13px;color:#1f2937}.mg-paycfg-sub-h span{color:#7c3aed;font-size:13px;font-weight:700}
.mg-paycfg-sub-h em{margin-left:auto;padding:1px 8px;border-radius:999px;font-size:11.5px;font-style:normal;font-weight:700}
.mg-paycfg-sub-h em.own{display:none;background:#dcfce7;color:#15803d}.mg-paycfg-sub-h em.share{background:#f1f5f9;color:#64748b}
.mg-paycfg-sub.done .mg-paycfg-sub-h em.own{display:inline-block}.mg-paycfg-sub.done .mg-paycfg-sub-h em.share{display:none}
.mg-paycfg-sub-h em.lock{background:#e0e7ff;color:#315efb}.mg-paycfg-sub.locked{border-color:#c9d8fb;background:#f4f8ff}.mg-paycfg-sub.locked .mg-paycfg-hint{margin:0}
.mg-paycfg-sub>input{margin-bottom:10px}.mg-paycfg-sub .mg-paycfg-row{margin-bottom:8px}
.mg-paycfg-sub-prev{display:inline-block;min-width:96px;padding:6px 14px;border-radius:9px;color:#fff;font-size:12.5px;font-style:normal;font-weight:700;text-align:center;opacity:.45}.mg-paycfg-sub.done .mg-paycfg-sub-prev{opacity:1}
/* 解锁按钮「和套餐 1 一样」开关 + 预览同一行；开着时收起文案 / 颜色输入，关掉才出现 */
.mg-paycfg-btnline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.mg-paycfg-same{flex:1;min-width:220px;padding:8px 12px}.mg-paycfg-same span{min-width:0}.mg-paycfg-same small{display:block;margin-top:2px;color:#94a3b8;font-size:11.5px;font-weight:500}
.mg-paycfg-sub.same .mg-paycfg-same{border-color:#bfd0ff;background:#f5f8ff}
.mg-paycfg-sub-pv{display:inline-flex;align-items:center;gap:8px;color:#8a94a6;font-size:12px;font-weight:600}
.mg-paycfg-sub.same .mg-paycfg-row{display:none}
.paycfg-foot{margin-top:16px;justify-content:space-between;border-top:1px solid #eef1f8;background:transparent;backdrop-filter:none;position:static;padding:14px 0 0}
.paycfg-foot .foot-actions button{min-height:40px;padding:0 26px;border:0;border-radius:10px;background:var(--mg-grad);color:#fff;font-size:14px;font-weight:700;cursor:pointer}
.paycfg-foot .foot-actions button:disabled{opacity:.6;cursor:not-allowed}
/* 未保存提示：改过的按钮卡片橙边 +「未保存」角标，底部说明变橙色计数 */
.mg-paycfg-dirty{display:none;padding:3px 10px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#c2410c;font-size:12px;font-weight:700}
.mg-paycfg-item.dirty{border-color:#fdba74;background:linear-gradient(180deg,#fff7ed 0,#fff 64px)}
.mg-paycfg-item.dirty .mg-paycfg-dirty{display:inline-flex}
/* 管理员统一配置跳转的按钮：只读卡片（蓝底+徽章），不给代理输入框 */
.mg-paycfg-item.locked{border-color:#dce5fb;background:linear-gradient(180deg,#f7f9ff 0,#fff 64px)}
.mg-paycfg-item.locked .head b::after{content:'管理员配置';margin-left:8px;padding:2px 8px;border-radius:999px;background:#e8eeff;color:#315efb;font-size:11px;font-weight:700;vertical-align:1px}
#payCfgFootTip.warn{color:#c2410c;font-weight:700}
.mg-search{margin-bottom:10px}
.mg-grant-users{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;align-content:start;max-height:320px;overflow:auto;border:1px solid #eef1f8;border-radius:12px;padding:10px;background:#fff}
.mg-grant-users .mg-empty{grid-column:1/-1}
/* 授权用户：卡片式多列，整卡可点，已选高亮；顶部计数 + 批量操作 */
.mg-grant-chip{display:flex;align-items:center;gap:9px;min-width:0;padding:9px 11px;border:1px solid #e5e7eb;border-radius:11px;background:#fff;cursor:pointer;user-select:none;transition:border-color .15s,background .15s,box-shadow .15s}
.mg-grant-chip:hover{border-color:#c4b5fd;background:#faf9ff}
.mg-grant-chip .ck{flex:0 0 18px;width:18px;height:18px;display:grid;place-items:center;border:1.5px solid #cbd5e1;border-radius:6px;background:#fff;color:#fff;font-style:normal;font-size:12px;font-weight:800;line-height:1;transition:background .15s,border-color .15s}
.mg-grant-chip.on{border-color:#a78bfa;background:#f5f3ff;box-shadow:0 4px 12px -8px rgba(124,58,237,.6)}
.mg-grant-chip.on .ck{border-color:transparent;background:linear-gradient(135deg,#7c3aed,#2563eb)}
.mg-grant-chip.on .ck::after{content:'✓'}
.mg-grant-chip .tx{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.mg-grant-chip .tx b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:700;color:#334155}
.mg-grant-chip .tx small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:#94a3b8}
.mg-grant-chip.on .tx b{color:#5b21b6}
.mg-grant-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.mg-grant-count{display:flex;align-items:baseline;gap:4px;font-size:12px;color:#64748b}
.mg-grant-count b{font-size:15px;color:#6d28d9}
.mg-grant-count em{margin-left:8px;font-style:normal;color:#a0a9b8}
.mg-grant-acts{display:flex;gap:6px;flex-wrap:wrap}
.mg-grant-acts button{min-height:28px;padding:0 11px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#475569;font-size:12px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.mg-grant-acts button:hover{border-color:#c4b5fd;background:#f5f3ff;color:#6d28d9}
.mg-grant-acts button.on{border-color:transparent;background:linear-gradient(90deg,#7c3aed,#2563eb);color:#fff}
/* 模板可见范围：编辑器内说明条 + 授权用户勾选；列表中隐藏模板整行淡化 */
.mg-scope-tip{margin:12px 0 0;padding:9px 12px;border-radius:10px;font-size:12px;line-height:1.6;background:#eef4ff;color:#2f5bd8;border:1px solid #dbe6ff}
.mg-scope-tip.is-users{background:#fff8eb;color:#b45309;border-color:#fde7c2}
.mg-scope-tip.is-hidden{background:#f3f4f6;color:#4b5563;border-color:#e5e7eb}
.mg-scope-tip:empty{display:none}
.mg-scope-users{margin-top:10px}
.mg-scope-users .mg-search{margin-bottom:8px}
.mg-scope-users .mg-grant-users{max-height:260px}
tr.is-hidden-tpl>td{background:#fafafa}
tr.is-hidden-tpl>td b{color:#9ca3af}
/* 独立收款授权：搜索+筛选条 + 卡片网格，一屏多看几个人、勾选状态一眼可辨 */
.mg-paygrant-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.mg-paygrant-bar input{flex:1;min-width:200px;max-width:320px}
.mg-paygrant-filters{display:flex;gap:6px}
.mg-paygrant-filters button{min-height:34px;padding:0 14px;border:1px solid var(--mg-line);border-radius:999px;background:#fff;color:var(--mg-sub);font-size:12px;font-weight:700;cursor:pointer}
.mg-paygrant-filters button.active{background:var(--mg-grad);border-color:transparent;color:#fff}
.mg-paygrant-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;max-height:280px;overflow:auto;padding:2px}
.mg-paygrant-item{display:flex;gap:8px;align-items:center;padding:10px 12px;border:1px solid var(--mg-line);border-radius:12px;background:#fff;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.mg-paygrant-item:hover{border-color:#c4b5fd;box-shadow:0 6px 16px -10px rgba(124,58,237,.5)}
.mg-paygrant-item.on{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4,#fff)}
.mg-paygrant-item input{width:auto;min-height:auto;flex-shrink:0}
.mg-paygrant-item .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mg-text)}
.mg-paygrant-item .bz{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mg-muted);font-weight:500;font-size:12px}
.mg-paygrant-item .tag{margin-left:auto;flex-shrink:0;padding:2px 8px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-size:11px;font-weight:700}
.mg-paygrant-item .tag:not(.off){background:#dcf5e8;color:#0f7a4b}
.mg-paygrant-item .tag.off{background:#fff4e5;color:#b45309}
/* 独立收款授权：输入框式下拉选择器，点击展开选人面板，收起时只占一行 */
.mg-paygrant-drop{position:relative}
.mg-paygrant-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:42px;padding:0 14px;border:1px solid #dfe3ee;border-radius:10px;background:#fff;color:#334155;font-size:14px;font-weight:600;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.mg-paygrant-trigger:hover{border-color:#c7cde0}
.mg-paygrant-drop.open .mg-paygrant-trigger{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.16)}
.mg-paygrant-trigger .ar{font-style:normal;color:#94a3b8;transition:transform .15s}
.mg-paygrant-drop.open .mg-paygrant-trigger .ar{transform:rotate(180deg)}
.mg-paygrant-panel{display:none;position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:40;padding:12px;border-radius:14px;background:#fff;border:1px solid var(--mg-line);box-shadow:0 18px 40px rgba(15,23,42,.16)}
.mg-paygrant-drop.open .mg-paygrant-panel{display:block;animation:mgFade .15s ease}
.mg-paygrant-panel .mg-paygrant-bar{margin-bottom:10px}

/* 经营工作台主题：克制的企业蓝、紧凑信息密度与清晰任务流程 */
:root{--mg-grad:linear-gradient(135deg,#315efb 0%,#4268f4 100%);--mg-line:#e5eaf3;--mg-text:#172033;--mg-sub:#68758a;--mg-muted:#98a3b5;--mg-primary:#315efb}
.mg-admin-app{background:#f4f6fa}
.mg-topbar{overflow:visible;min-height:76px;padding:16px 22px;margin-bottom:14px;border:1px solid var(--mg-line);border-radius:14px;background:#fff;color:var(--mg-text);box-shadow:0 4px 14px rgba(31,47,77,.04)}
.mg-topbar::before,.mg-topbar::after{display:none}
.mg-topbar-text{display:flex;align-items:center;gap:13px}
.mg-page-icon{position:relative;overflow:hidden;display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:linear-gradient(145deg,#5b8cff 0%,#315efb 55%,#2a50d8 100%);color:#fff;font-size:22px;font-weight:800;letter-spacing:1px;text-shadow:0 2px 6px rgba(15,35,110,.35);box-shadow:0 12px 26px -8px rgba(49,94,251,.55),inset 0 1px 0 rgba(255,255,255,.35),inset 0 -2px 6px rgba(20,40,120,.25)}
.mg-page-icon::before{content:'';position:absolute;left:8%;right:8%;top:-46%;height:80%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.38),rgba(255,255,255,0));pointer-events:none}
.mg-topbar small{display:block;padding:0;border:0;border-radius:0;background:transparent;color:#8792a5;font-size:11px;font-weight:600;letter-spacing:.8px}
.mg-topbar h1{margin:2px 0 1px;color:var(--mg-text);font-size:22px;letter-spacing:0}
.mg-topbar p{color:#7b8799;font-size:12px;line-height:1.5;opacity:1}
.mg-top-actions{gap:8px}
.mg-top-actions button,.mg-top-actions a{min-height:36px;padding:0 14px;border-radius:9px;background:#315efb;color:#fff;font-size:13px;box-shadow:0 6px 14px rgba(49,94,251,.16)}
.mg-top-actions button.ghost,.mg-top-actions a.ghost{border:1px solid #dce3f0;background:#fff;color:#536176;box-shadow:none;backdrop-filter:none}
.mg-top-actions button.ghost:hover,.mg-top-actions a.ghost:hover{border-color:#b9c8f8;background:#f5f8ff;color:#315efb}
.stats,.finance-stats{gap:10px;margin-bottom:14px}
.stat{min-height:88px;padding:15px 18px 14px 19px;border-radius:13px;box-shadow:0 3px 12px rgba(31,47,77,.035)}
.stat:hover{transform:none;border-color:#cfd9ee;box-shadow:0 8px 20px rgba(31,47,77,.07)}
.stat::before{top:20px;bottom:20px;width:3px;background:var(--c,#315efb)}
.stat::after{right:14px;top:16px;width:38px;height:38px;border-radius:11px;opacity:.08}
.stat:nth-child(5n+1){--c:#315efb}.stat:nth-child(5n+2){--c:#06a6d8}.stat:nth-child(5n+3){--c:#6d5ce8}.stat:nth-child(5n+4){--c:#16a878}.stat:nth-child(5n+5){--c:#ed8b2c}
.stat span{margin-bottom:5px;font-size:12px}.stat b{font-size:23px}
.tabs{gap:3px;padding:5px;margin-bottom:16px;border-radius:12px;box-shadow:none}
.tabs button{min-height:40px;padding:0 22px;border-radius:9px;font-size:15px}
.tabs button:hover{background:#f3f6ff;color:#315efb}
.tabs button.active{background:#315efb;box-shadow:0 5px 12px rgba(49,94,251,.2)}
.panel{padding:18px 20px;margin-bottom:14px;border-radius:14px;box-shadow:0 3px 12px rgba(31,47,77,.035)}
.panel-head{margin-bottom:14px}
.panel-head h2{margin-bottom:4px;font-size:16px}.panel-head h2::before{width:3px;height:15px;background:#315efb}
.panel-head p{font-size:12px}
.panel-head button{min-height:34px;border-radius:8px;background:#315efb;box-shadow:0 5px 12px rgba(49,94,251,.15)}
.panel-head button.ghost{border-color:#d9e1f0;color:#526177}.panel-head button.ghost:hover{background:#f5f8ff;color:#315efb}
/* 弹窗与主页一体：紫渐变头改为白底卡片头（与页面 panel-head 同构：蓝色左条 + 深色标题 + 灰色副标题），去掉装饰大圆 */
.share-dialog,.editor-dialog{border-radius:14px;box-shadow:0 24px 60px -18px rgba(31,47,77,.35)}
.editor-dialog.wide{background:#f4f6fa}
.share-head{padding:16px 20px;background:#fff;border-bottom:1px solid var(--mg-line);color:var(--mg-text)}
.share-head::after{display:none}
.share-head h2{display:flex;align-items:center;gap:8px;margin:0 0 4px;font-size:16px;font-weight:800;color:var(--mg-text)}
.share-head h2::before{content:'';width:3px;height:15px;border-radius:4px;background:#315efb}
.share-head p{font-size:12px;color:#7b8799;opacity:1}
.icon-close{width:32px;height:32px;background:#f1f4f9;color:#526177;font-size:18px}
.icon-close:hover{background:#e4e9f2;color:#172033}
/* 弹窗内残留紫色按钮/描边统一为工作台蓝 */
.mg-entry-saverow button{background:#315efb}
.mg-form-row button,.filters button,.editor-foot button{box-shadow:0 6px 14px -6px rgba(49,94,251,.45)}
.mg-form-row button.ghost,.filters button.ghost,.editor-foot button.ghost{border-color:#d9e1f0;color:#526177}
.mg-form-row button.ghost:hover,.filters button.ghost:hover,.editor-foot button.ghost:hover{background:#f5f8ff;color:#315efb}
.mg-paygrant-drop.open .mg-paygrant-trigger{border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.14)}
/* 首页统计卡：去掉右侧空色块装饰（易被误认为加载失败的图标），仅保留左侧色条 */
.stat::after{display:none}
/* 输入焦点环与零星紫色徽章/步骤条统一为工作台蓝 */
input:focus,select:focus,textarea:focus{border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.14)}
.mg-count{background:#e8eeff;color:#315efb}
.mg-steps span{background:#f5f8ff;border-color:#dce5fb;color:#315efb}
.mg-inline-workflow{padding:13px 14px 12px;border:1px solid #dce5fb;border-radius:11px;background:linear-gradient(135deg,#f7f9ff,#fbfcff)}
.mg-inline-workflow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:9px}
.mg-inline-workflow-head b{color:#25324a;font-size:13px}.mg-inline-workflow-head p{margin:2px 0 0;color:#7c889b;font-size:11px}
.mg-inline-workflow-head strong{color:#315efb;font-size:18px;line-height:1}
.mg-workflow-progress{width:100%;height:5px;overflow:hidden;border-radius:999px;background:#e5eaf4}
.mg-workflow-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#315efb,#13aa78);transition:width .3s ease}
.mg-setup-steps{position:relative;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:10px}
.mg-setup-steps::before{content:'';position:absolute;left:9%;right:9%;top:13px;height:1px;background:#dce3ee}
.mg-setup-steps button{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:3px 4px;border:0;border-radius:8px;background:transparent;color:#526177;text-align:center;cursor:pointer}
.mg-setup-steps button:hover,.mg-setup-steps button.current{background:#eef3ff;color:#315efb}
.mg-setup-steps button.done{background:transparent;color:#11865f}
.mg-setup-steps button.done::after{content:'✓';position:absolute;left:calc(50% + 7px);top:0;display:grid;place-items:center;width:12px;height:12px;border-radius:50%;background:#13aa78;color:#fff;font-size:8px;font-weight:900}
.mg-setup-steps i{display:grid;place-items:center;width:26px;height:26px;border:3px solid #f8faff;border-radius:50%;background:#e7ebf3;color:#748196;font-size:10px;font-style:normal;font-weight:800;box-sizing:border-box}
.mg-setup-steps button.current i{background:#315efb;color:#fff}.mg-setup-steps button.done i{background:#dff4e9;color:#11865f}
.mg-setup-steps span{min-width:0}.mg-setup-steps b,.mg-setup-steps small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-setup-steps b{font-size:11px}.mg-setup-steps small{margin-top:1px;color:#96a0b0;font-size:9px;font-weight:400}
.mg-overview-top{grid-template-columns:minmax(320px,370px) minmax(400px,1fr) minmax(260px,300px);gap:14px}
.mg-overview-top>.panel{overflow:hidden;padding:0}
.mg-overview-top>.panel>.panel-head{padding:16px 18px 0}
.mg-live{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:#edf9f4;color:#12845e;font-size:11px;font-weight:700}
.mg-live i{width:6px;height:6px;border-radius:50%;background:#18ad7a;box-shadow:0 0 0 3px rgba(24,173,122,.12)}
.mg-preview-panel .mg-pv-body{gap:8px;padding:4px 16px 14px}
.mg-pv-phone .phone{width:100%;max-width:310px;padding:8px;border-radius:28px;background:#202a3d;box-shadow:0 14px 32px rgba(24,36,60,.2)}
.mg-pv-phone .phone-screen{height:620px;border-radius:21px}
/* 手机预览等比缩放：app.js fitPhoneScreen 按「框宽 / 虚拟手机宽」写 --pv-s，iframe 按虚拟宽渲染后缩小铺满 */
.phone-screen.is-fit iframe{width:calc(100% / var(--pv-s,1));height:calc(100% / var(--pv-s,1));transform:scale(var(--pv-s,1));transform-origin:0 0}
.mg-pv-cap{font-size:11px}
.mg-tplsel-body{gap:11px;padding:4px 18px 18px}
.mg-field-title{color:#59677c;font-size:12px}.mg-field-title select{margin-top:6px}
.mg-tplsel-body>select,.mg-field-title select{min-height:40px;background:#fff}
.mg-tplsel-info{padding:11px 12px;border:1px solid #e5eaf3;border-radius:9px;background:#f8fafc}
.mg-tplsel-info b{font-size:12.5px;font-weight:600;color:#7b8799}
.mg-tplsel-info b em{font-style:normal;font-size:15px;font-weight:800;color:#315efb}
.mg-tplsel-manage{padding:11px 12px;border:1px solid #e5eaf3;border-radius:10px;background:#fff}
.mg-manage-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px}
.mg-manage-head>b{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.mg-manage-head>b.ready{background:#eaf8f1;color:#11865f}.mg-manage-head>b.todo{background:#fff1f2;color:#d52c52}.mg-manage-head>b.warn{background:#fff7e8;color:#b46a13}.mg-manage-head>b.draft{background:#edf2ff;color:#315efb}
.mg-manage-head>span{position:relative;min-width:0;padding-left:16px;color:#475467;font-size:12px;font-weight:600;line-height:1.55}
.mg-manage-head>span::before{content:'';position:absolute;left:2px;top:.5em;width:7px;height:7px;border-radius:50%;background:#315efb}
.mg-manage-head.ready>span::before{background:#11b47e}.mg-manage-head.todo>span::before{background:#e11d48}.mg-manage-head.warn>span::before{background:#e8952b}
.mg-manage-head>button{min-height:28px;padding:0 10px;border:1px solid #cdd8f8;border-radius:7px;background:#f5f8ff;color:#315efb;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.mg-tplsel-manage .mg-link-prices{margin-top:10px;padding-top:9px;border-top:1px solid #eef1f6}
.mg-manage-empty{padding:5px 0;color:#8792a5;font-size:12px;text-align:center}
.mg-tplsel-remark{border-color:#dbe4ff;background:#f5f8ff;color:#3c5dbd}
.mg-tplsel-remark b{background:#e5ecff;color:#3157c9}
.mg-tplsel-gen{min-height:52px;border-radius:11px;background:#315efb;box-shadow:0 9px 20px rgba(49,94,251,.24);font-size:15px}
.mg-tplsel-gen:disabled{background:#aab4c7;box-shadow:none;cursor:not-allowed}
.mg-tplsel-link button{border-color:#cdd8f8;color:#315efb}.mg-tplsel-link button:disabled{opacity:.5;cursor:not-allowed}
.mg-config-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
/* 推广操作恢复为卡片式入口：每张卡「彩色标签 + 说明文字」，比纯文字小按钮好认好点。
   字号按本页运营后台口径放大（说明 13px、标签 11px），原来的 12px/10px 在这么宽的卡片里偏小。 */
.mg-manage-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.mg-config-actions button{display:flex;align-items:center;gap:8px;min-width:0;min-height:56px;padding:8px 10px;border:1px solid #dbe3f0;border-radius:10px;background:#fff;color:#2f3c50;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,transform .15s,box-shadow .15s}
.mg-config-actions button:hover:not(:disabled){border-color:#9fb3f2;background:#f7f9ff;transform:translateY(-1px);box-shadow:0 8px 18px -13px rgba(49,94,251,.7)}
.mg-config-actions button:active:not(:disabled){transform:translateY(0)}
.mg-config-actions button:disabled{opacity:.48;cursor:not-allowed;background:#f8fafc;transform:none;box-shadow:none}
.mg-config-actions button>span{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;border-radius:8px;background:#edf2ff;color:#315efb;font-size:11px;font-weight:800}
/* 中间列宽度有限，13px 下七字文案会折行；balance 把两行字数摊平，
   避开「支付后内容设 / 置」这种末字孤行，min-height 已留足两行的余量。 */
.mg-config-actions button>b{min-width:0;font-size:13px;font-weight:650;line-height:1.35;white-space:normal;text-wrap:balance}
.mg-manage-actions button.danger{border-color:#f1d5db;background:#fffafb;color:#b8324d}
.mg-manage-actions button.danger>span{background:#fff0f3;color:#d23d59}
.mg-manage-actions button.danger:hover:not(:disabled){border-color:#e9acb8;background:#fff5f7;color:#c62f4d}
/* 前六个入口统一卡片规格；暂停与删除属风险操作，单独排最后一行并保留黄／红语义色 */
.side-income .mg-income-rows{padding:0 18px 14px}.mg-irow{padding:13px 1px}.mg-irow b{font-size:21px}
.mg-irate{padding-top:15px}.mg-irate p{line-height:1.65}.mg-irate b{font-size:29px;color:#315efb}
.mg-irow:first-child b{color:#315efb}.mg-irow .lb i.hl,.mg-irate .lb i.hl{background:#315efb}
.mg-overview-bottom{display:grid;grid-template-columns:1fr;gap:14px;margin-top:14px;align-items:start}
.mg-overview-bottom>.panel{margin-bottom:0}
.mg-trend-body{min-height:390px;padding:4px 18px 18px}.mg-trend-body .mg-empty{min-height:330px}
.mg-chart-col .bars i.v{background:linear-gradient(180deg,#7894ff,#315efb)}.mg-chart-legend i.v{background:#315efb}
.panel-head .mg-trend-switch button.active{border-color:#cbd7fb;background:#f1f5ff;color:#315efb}
.mg-card:hover{border-color:#cbd7fb;box-shadow:0 12px 26px -12px rgba(49,72,130,.28)}
.op-btn.primary,.withdraw-submit,.payment-save button,.finance-config button,.mg-paycfg-save{background:#315efb}
.op-btn{border-color:#d9e1f0;color:#4262bf}.op-btn:hover{background:#f5f8ff}
/* 主操作按钮悬停时保持蓝底白字，避免被后置的通用 .op-btn:hover 覆盖成白底白字 */
.op-btn.primary:hover{border-color:#315efb;background:#264fe0;color:#fff;filter:none;transform:translateY(-1px);box-shadow:0 9px 18px -9px rgba(49,94,251,.7)}
.mg-count{background:#edf2ff;color:#315efb}
@media(max-width:1380px){.mg-workflow{grid-template-columns:1fr}.mg-overview-top{grid-template-columns:310px minmax(400px,1fr)}.side-income{grid-column:1/-1}.side-income .mg-income-rows{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.side-income .mg-irow,.side-income .mg-irate{border:0;padding:10px}.mg-irate{align-items:center}}
@media(max-width:900px){.mg-setup-steps{grid-template-columns:repeat(2,1fr)}.mg-overview-top{grid-template-columns:1fr}.mg-config-actions{grid-template-columns:1fr 1fr}.side-income .mg-income-rows{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.mg-topbar{padding:14px}.mg-topbar p{display:none}.mg-top-actions{width:100%}.mg-top-actions button,.mg-top-actions a{flex:1;justify-content:center}.mg-workflow{padding:14px}.mg-setup-steps{grid-template-columns:1fr}.mg-overview-bottom{display:block}.mg-overview-bottom>.panel{margin-bottom:14px}.side-income .mg-income-rows{grid-template-columns:1fr}.mg-pv-phone .phone{width:230px}.mg-manage-head{grid-template-columns:1fr}.mg-manage-head>b{width:max-content}.mg-config-actions{grid-template-columns:1fr}}

/* 收益提现：余额主卡 + 分步表单 + 双记录区 */
.mg-wallet-overview{display:grid;grid-template-columns:320px minmax(0,1fr);gap:12px;margin-bottom:14px}
.mg-wallet-balance{position:relative;overflow:hidden;min-height:128px;padding:20px 22px;border-radius:15px;background:linear-gradient(135deg,#173a8f 0%,#315efb 68%,#4a72ff 100%);color:#fff;box-shadow:0 12px 28px -14px rgba(27,67,170,.55)}
.mg-wallet-balance::before,.mg-wallet-balance::after{content:'';position:absolute;border-radius:50%;background:rgba(255,255,255,.08)}
.mg-wallet-balance::before{width:170px;height:170px;right:-65px;top:-90px}.mg-wallet-balance::after{width:90px;height:90px;right:45px;bottom:-65px}
.mg-wallet-balance>*{position:relative;z-index:1}
.mg-wallet-balance-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:rgba(255,255,255,.78)}
.mg-wallet-balance-top i{padding:3px 8px;border-radius:999px;background:rgba(255,255,255,.14);font-size:10px;font-style:normal}
.mg-wallet-balance strong{display:block;margin:9px 0 2px;font-size:31px;letter-spacing:.2px}.mg-wallet-balance p{margin:0;color:rgba(255,255,255,.7);font-size:11px}
.mg-wallet-balance button{position:absolute;right:20px;bottom:18px;min-height:34px;padding:0 14px;border:1px solid rgba(255,255,255,.45);border-radius:9px;background:#fff;color:#2452d8;font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 6px 14px rgba(20,48,120,.18)}
.mg-wallet-overview>.finance-stats{grid-template-columns:repeat(3,1fr);gap:12px;margin:0}
.mg-wallet-overview .finance-stats .stat{min-height:128px;display:flex;flex-direction:column;justify-content:center;padding-left:22px}
.mg-wallet-overview .finance-stats .stat span{font-size:12px}.mg-wallet-overview .finance-stats .stat b{font-size:22px}
.mg-wallet-overview .finance-stats .stat small{display:block;margin-top:7px;color:#98a3b5;font-size:10px}
.mg-finance-layout{display:block}
.mg-finance-layout>.panel,.mg-finance-records>.panel{margin-bottom:0}
.mg-finance-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0;align-items:start}
.withdraw-dialog{width:min(760px,100%)}
.withdraw-panel{padding:20px}
.withdraw-dialog .withdraw-panel{padding:18px 24px 24px}
.mg-withdraw-modal-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:3px;padding:10px 12px;border:1px solid #e4e9f2;border-radius:11px;background:#f8fafc}
.mg-withdraw-modal-notice p{margin:0;color:#718096;font-size:11px;text-align:right}
.mg-safe-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:#ecf8f2;color:#11865f;font-size:10px;font-weight:800}.mg-safe-badge::before{content:'✓'}
.mg-withdraw-section{padding:15px 0;border-top:1px solid #edf0f5}.mg-withdraw-section:first-of-type{padding-top:3px;border-top:0}
.mg-section-title{display:flex;align-items:center;gap:9px;margin-bottom:11px}.mg-section-title>i{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#edf2ff;color:#315efb;font-size:11px;font-style:normal;font-weight:800}
.mg-section-title b{display:block;color:#25324a;font-size:13px}.mg-section-title p{margin:1px 0 0;color:#96a0b0;font-size:10px}
.withdraw-panel .withdraw-amount{display:flex;align-items:center;gap:10px;margin:0;padding:8px 8px 8px 16px;border:1px solid #dce3ef;border-radius:11px;background:#fbfcfe}
.withdraw-panel .withdraw-amount:focus-within{border-color:#7695fc;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.withdraw-panel .withdraw-amount>div{display:flex;align-items:center;gap:7px;min-width:0}.withdraw-panel .withdraw-amount em{font-size:27px;font-weight:900;color:#25324a}.withdraw-panel .withdraw-amount input{min-width:0;height:48px;padding:0;border:0;background:transparent;font-size:32px!important;line-height:1;font-weight:900;letter-spacing:.2px;box-shadow:none}.withdraw-panel .withdraw-amount input:focus{box-shadow:none}
.withdraw-panel .withdraw-amount button{min-height:34px;padding:0 11px;border-color:#cdd8f8;color:#315efb;font-size:11px}
.mg-amount-meta{display:flex;justify-content:space-between;gap:10px;margin-top:7px;color:#8a96a8;font-size:10px}.mg-amount-meta b{color:#315efb}.mg-amount-meta .ok{color:#11865f}.mg-amount-meta .err{color:#d52c52}
.withdraw-panel .receive-grid{grid-template-columns:1fr 1fr;gap:10px;margin:0}.withdraw-panel .receive-grid .receive-account{grid-column:1/-1}
.withdraw-panel .receive-grid label{font-size:11px;color:#617087}.withdraw-panel .receive-grid input,.withdraw-panel .receive-grid select{min-height:39px;margin-top:5px;border-radius:9px;font-size:12px}
.mg-receipt-section{margin:3px -10px 0;padding:16px 10px!important;border:1px solid #dbe5ff!important;border-radius:13px;background:linear-gradient(135deg,#f8faff,#f4f7ff)}
.mg-recommend-tag,.mg-optional-tag{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;vertical-align:1px;font-size:9px;font-weight:800}
.mg-recommend-tag{background:#315efb;color:#fff}.mg-optional-tag{background:#eef1f5;color:#7b8798}
.withdraw-panel .receive-upload{display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;gap:14px;margin:0;padding:14px;border:2px dashed #9fb4fa;border-radius:13px;background:#fff;cursor:pointer;box-shadow:0 8px 22px -18px rgba(49,94,251,.65);transition:border-color .15s,background .15s,box-shadow .15s}
.withdraw-panel .receive-upload:hover{border-color:#315efb;background:#f9fbff;box-shadow:0 10px 24px -15px rgba(49,94,251,.55)}
.withdraw-panel .receive-upload>div:nth-child(2) b{display:block;color:#233456;font-size:14px}.withdraw-panel .receive-upload p{margin:5px 0 2px;color:#66758c;font-size:11px}.withdraw-panel .receive-upload small{display:block;color:#a0a9b7;font-size:9px}
.withdraw-panel .receive-preview{width:76px;height:76px;padding:0;border:1px solid #dbe4fb;border-radius:12px;background:#edf2ff center/cover no-repeat;color:#315efb;font-size:30px;box-shadow:inset 0 0 0 5px rgba(255,255,255,.55)}
.withdraw-panel .receive-upload>button{min-height:36px;padding:0 14px;border:0;background:#315efb;color:#fff;font-size:11px;pointer-events:none;box-shadow:0 7px 16px -9px rgba(49,94,251,.7)}
.withdraw-panel .receive-upload.has-file{border-style:solid;border-color:#86d8ba;background:#f4fcf8;box-shadow:0 8px 22px -18px rgba(17,134,95,.55)}
.withdraw-panel .receive-upload.has-file>div:nth-child(2) b{color:#11865f}.withdraw-panel .receive-upload.has-file>button{background:#11865f}
.mg-remark-section{padding-bottom:4px}.mg-remark-section .mg-section-title{margin-bottom:8px}
.mg-withdraw-remark{display:block;margin:0;color:#526177;font-size:11px}.mg-withdraw-remark textarea{min-height:78px;margin:0;border:1px solid #dce3ef;border-radius:10px;background:#fbfcfe;font-size:12px}.mg-withdraw-remark textarea:focus{border-color:#7695fc;background:#fff;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-withdraw-submitbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:16px -20px -20px;padding:14px 20px;border-top:1px solid #e9edf4;border-radius:0 0 14px 14px;background:#f8fafc}
.withdraw-dialog .mg-withdraw-submitbar{margin:16px -24px -24px;padding:14px 24px}
.mg-withdraw-submitbar>div{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:2px 8px}.mg-withdraw-submitbar span{color:#788599;font-size:10px}.mg-withdraw-submitbar b{color:#173a8f;font-size:18px}.mg-withdraw-submitbar small{grid-column:1/-1;color:#a0a9b7;font-size:9px}
.withdraw-panel .withdraw-submit{width:auto;min-width:124px;min-height:42px;margin:0;border-radius:9px;font-size:13px;box-shadow:0 8px 16px -9px rgba(49,94,251,.7)}.withdraw-panel .withdraw-submit:disabled{background:#b8c1d1;box-shadow:none;cursor:not-allowed}
.mg-finance-records .panel{padding:18px}.mg-finance-records .panel-head{align-items:center}
.mg-finance-records .table-wrap{border-radius:11px}.mg-finance-records .table-wrap th{padding:11px 12px;font-size:11px}.mg-finance-records .table-wrap td{padding:12px;font-size:12px}.mg-finance-records .table-wrap td.empty{padding:0}
.mg-withdraw-records .table-wrap table{min-width:760px}.mg-revenue-panel .table-wrap table{min-width:820px}
.mg-table-empty{display:flex;flex-direction:column;align-items:center;gap:5px;padding:24px 10px}.mg-table-empty i{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#edf2ff;color:#315efb;font-size:17px;font-style:normal}.mg-table-empty b{color:#526177;font-size:12px}.mg-table-empty span{color:#9aa4b3;font-size:10px}
@media(max-width:1380px){.mg-wallet-overview{grid-template-columns:290px minmax(0,1fr)}.mg-finance-layout{grid-template-columns:1fr}.mg-finance-records{grid-template-columns:1fr 1fr}.mg-finance-records .panel{min-width:0}}
@media(max-width:980px){.mg-wallet-overview{grid-template-columns:1fr}.mg-wallet-overview>.finance-stats{grid-template-columns:repeat(3,1fr)}.mg-finance-records{grid-template-columns:1fr}.mg-setup-steps{grid-template-columns:repeat(5,1fr)}}
@media(max-width:640px){.mg-wallet-overview>.finance-stats{grid-template-columns:1fr}.mg-wallet-balance button{position:static;margin-top:12px}.withdraw-dialog .withdraw-panel{padding:14px 16px calc(16px + env(safe-area-inset-bottom))}.mg-withdraw-modal-notice{align-items:flex-start;flex-direction:column}.mg-withdraw-modal-notice p{text-align:left}.withdraw-panel .receive-grid{grid-template-columns:1fr}.withdraw-panel .receive-grid .receive-account{grid-column:auto}.withdraw-panel .receive-upload{grid-template-columns:50px 1fr}.withdraw-panel .receive-upload>button{display:none}.mg-withdraw-submitbar{align-items:flex-end}.withdraw-dialog .mg-withdraw-submitbar{margin:14px -16px calc(-16px - env(safe-area-inset-bottom));padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.mg-setup-steps{grid-template-columns:repeat(5,1fr)}.mg-setup-steps small{display:none}}

/* 控件规格审计：表单 42px、紧凑操作 34px；同组控件严格同高同轴 */
.filters{align-items:center}
.filters>input,.filters>select,.filters>button{height:42px;min-height:42px;margin:0;box-sizing:border-box}
.filters>button,.mg-rec-btns>button{display:inline-flex;align-items:center;justify-content:center;line-height:1}
.filters>button:not(.ghost):hover,.mg-rec-btns>button:not(.ghost):hover{color:#fff}
.filters>button:disabled,.mg-rec-btns>button:disabled{opacity:.55;cursor:not-allowed;transform:none;filter:none}
/* 访问记录下「导出 Excel」会置灰，opacity 压暗的文字还是要看得清是哪个按钮，这里给明确的灰底深灰字 */
.mg-rec-btns>button.ghost:disabled{opacity:1;background:#f1f5f9;border-color:#e2e8f0;color:#5a6676}
.mg-platform-filters{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(180px,1.1fr) minmax(150px,.9fr) minmax(150px,.9fr) 76px 76px;align-items:center}
.mg-platform-filters>*{width:100%;min-width:0}
.mg-platform-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}
.mg-platform-stat{position:relative;overflow:hidden;min-height:112px;padding:17px 18px;border:1px solid #e7ebf4;border-radius:14px;background:linear-gradient(145deg,#fff,#f8faff)}
.mg-platform-stat::before{content:'';position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 4px 4px 0;background:#315efb}
.mg-platform-stat:nth-child(4n+2)::before{background:#06a6d8}.mg-platform-stat:nth-child(4n+3)::before{background:#7c3aed}.mg-platform-stat:nth-child(4n+4)::before{background:#16a878}
.mg-platform-stat span{display:block;color:#69758a;font-size:12px}.mg-platform-stat b{display:block;margin:7px 0 5px;color:#172033;font-size:24px;line-height:1.2}.mg-platform-stat small{color:#98a3b5;font-size:11px}
.mg-admin-order-filters{display:grid;grid-template-columns:minmax(150px,1.05fr) minmax(145px,1fr) minmax(160px,1.1fr) minmax(125px,.8fr) minmax(140px,.85fr) minmax(140px,.85fr) 72px;align-items:center}
.mg-admin-order-filters>input,.mg-admin-order-filters>select,.mg-admin-order-filters>button{width:100%;min-width:0}
.mg-admin-order-filters>button{padding:0 12px}
.mg-order-summary{display:grid;grid-template-columns:minmax(220px,1.4fr) repeat(5,minmax(110px,.72fr));gap:10px;margin:14px 0 16px;padding:12px;border:1px solid #e2e8f5;border-radius:14px;background:#f8faff}
.mg-order-summary>div{display:flex;flex-direction:column;justify-content:center;min-height:62px;padding:8px 12px;border-left:1px solid #e4e9f4}
.mg-order-summary>div span{color:#7b879a;font-size:11px}.mg-order-summary>div b{margin-top:5px;color:#1f2937;font-size:17px}
.mg-order-summary .mg-order-summary-title{border-left:0}.mg-order-summary-title b{margin:0;color:#315efb;font-size:14px}.mg-order-summary-title span{margin-top:5px;line-height:1.5}
.mg-cell-sub{display:block;margin-top:3px;color:#98a3b5;font-size:10px;font-weight:400}
.mg-entry-filters>input{flex:1 1 260px;min-width:220px}
.mg-entry-filters>button{flex:0 0 auto}
.mg-rec-filters{padding:14px 18px}
.mg-rec-filters input,.mg-rec-filters select{height:42px;min-height:42px}
.mg-rec-filters label>input,.mg-rec-filters label>select{margin-top:0}
/* 推广记录按钮行：查询/重置/导出 Excel 必须同一行；原来的两列栅格会把「导出 Excel」挤到第二行并溢出 42px 高的容器，
   这里让它横跨「查找记录」右侧的剩余列，三个按钮按内容宽度排开；
   .filters{align-items:center} 在本文件更往后，会把整行居中，所以单独底部对齐，
   再补上和 .filters label input 相同的 10px 下外边距，底边才会和「查找记录」输入框齐平 */
.mg-rec-btns{grid-column:2/-1;align-self:end;margin-bottom:10px;display:flex;align-items:center;gap:8px;height:42px;min-width:0}
.mg-rec-btns>button{height:42px;min-height:42px;margin:0;flex:0 0 auto}
/* 访问记录隐掉了订单状态/领取资格/日期口径三项，只剩日期范围+模板+查找记录占三列，
   按钮行改从第四列起，和筛选项同行，不再空出一整行 */
@media(min-width:1341px){.mg-rec-filters.mg-rec-visit .mg-rec-btns{grid-column:4/-1}}
.panel-head button,.op-btn,.mg-pager button{display:inline-flex;align-items:center;justify-content:center;line-height:1;box-sizing:border-box}
.panel-head button,.op-btn,.mg-pager button{height:34px;min-height:34px}
.editor-foot button,.payment-save button,.finance-config button,.share-link-box button,.mg-paycfg-save,.paycfg-foot .foot-actions button{display:inline-flex;align-items:center;justify-content:center;height:42px;min-height:42px;line-height:1;box-sizing:border-box}
.editor-foot .foot-actions,.payment-save>span{display:flex;align-items:center;gap:10px}
.mg-comp-add>select,.mg-comp-add>button{height:42px;min-height:42px;box-sizing:border-box}
.mg-tplsel-link input,.mg-tplsel-link button{height:38px;min-height:38px;box-sizing:border-box}

@media(max-width:1100px){
  .mg-admin-order-filters,.mg-platform-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mg-admin-order-filters>button,.mg-platform-filters>button{width:100%}
  .mg-platform-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mg-order-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mg-order-summary .mg-order-summary-title{grid-column:1/-1}
  /* 窄桌面与平板：右侧剩余列已不够三个按钮平铺，按钮行改占整行，仍保持单行不溢出 */
  .mg-rec-btns{grid-column:1/-1;align-self:auto}
}
/* 861~1340px：筛选项的 .filters input{min-width:140px} / input[type=date]{min-width:150px} 让五列最少要 942px，
   窄桌面放不下就会把筛选区横向撑出滚动条，这里降成三列，并让「日期范围」跨两列保住两个日期框的宽度 */
@media(min-width:861px) and (max-width:1340px){
  .mg-rec-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mg-rec-filters>label:first-child{grid-column:span 2}
}
/* ≤860px 已降到两列，单列宽度仍不够「日期范围」，让它独占整行 */
@media(max-width:860px){
  .mg-rec-filters>label:first-child{grid-column:1/-1}
}
@media(max-width:760px){
  .mg-admin-order-filters,.mg-platform-filters{grid-template-columns:1fr 1fr}
  .mg-entry-filters>input{flex-basis:100%;min-width:100%}
  .mg-entry-filters>button{flex:1 1 calc(50% - 10px)}
  .editor-foot{align-items:flex-end}
}
@media(max-width:640px){
  .mg-rec-filters,.mg-admin-order-filters,.mg-platform-filters{grid-template-columns:1fr}
  .mg-platform-stats,.mg-order-summary{grid-template-columns:1fr}
  .mg-order-summary .mg-order-summary-title{grid-column:auto}
  .mg-rec-btns{grid-column:1/-1;flex-wrap:wrap;width:100%;height:auto}
  .mg-rec-btns>button{flex:1 1 calc(50% - 4px)}
  /* 手机宽度放不下两个日期框（各自最少 150px），改成上下两行，「至」竖向居中做连接符，避免筛选区被撑出横向滚动 */
  .mg-rec-dates{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .mg-rec-dates input[type=date]{width:100%;min-width:0}
  .mg-rec-dates em{grid-area:1/2/3/3;align-self:center}
  .mg-entry-filters>button{flex-basis:100%;width:100%}
  .editor-foot{align-items:stretch;flex-direction:column}
  .editor-foot>span,.editor-foot .foot-actions{width:100%}
  .editor-foot .foot-actions>button,.editor-foot>button{flex:1}
  .payment-save{align-items:stretch;flex-direction:column}
  .payment-save>span,.payment-save button{width:100%}
}

/* toast：最上层 */
.mg-toast{position:fixed;left:50%;bottom:32px;transform:translateX(-50%);z-index:100000;background:rgba(15,23,42,.92);backdrop-filter:blur(8px);color:#fff;border-radius:12px;padding:12px 22px;font-size:14px;font-weight:600;max-width:86vw;box-shadow:0 16px 40px rgba(15,23,42,.3);animation:mgToast .25s ease}

@keyframes mgFade{from{opacity:0}to{opacity:1}}
@keyframes mgPop{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes mgToast{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes mgSpin{to{transform:rotate(360deg)}}

/* 移动端：弹窗改底部抽屉 */
@media(max-width:640px){
  .mg-topbar{padding:22px 18px;border-radius:16px}
  .mg-topbar h1{font-size:22px}
  .mg-top-actions button,.mg-top-actions a{min-height:36px;padding:0 12px;font-size:13px}
  .panel{padding:18px 16px;border-radius:16px}
  .mg-cards,.tpl-grid{grid-template-columns:1fr}
  .mask{padding:0;align-items:flex-end}
  .share-dialog,.editor-dialog,.editor-dialog.narrow,.editor-dialog.wide{width:100%;max-height:92vh;border-radius:20px 20px 0 0}
  .receipt-viewer{min-height:280px;max-height:calc(92vh - 82px);padding:14px 12px calc(14px + env(safe-area-inset-bottom))}
  .receipt-viewer img{max-height:calc(92vh - 120px)}
  .mg-receipt-section{margin-left:0;margin-right:0}
  .withdraw-panel .receive-upload{grid-template-columns:64px minmax(0,1fr);gap:11px;padding:12px}
  .withdraw-panel .receive-preview{width:64px;height:64px}
  .withdraw-panel .receive-upload>button{grid-column:1/-1;width:100%}
  .mg-pick-steps em{display:none}
}

/* ===== 代理首页改版：问候条 + 图标统计卡 + 推广二维码（布局对标同行代理首页，配色沿用蓝色工作台） ===== */
.mg-hello{display:flex;align-items:center;gap:14px;margin:0 0 14px;padding:16px 20px;border-radius:16px;background:linear-gradient(120deg,#eef3ff 0%,#f8faff 55%,#eafbf2 100%);border:1px solid #e3ebfd}
.mg-hello-ico{width:46px;height:46px;flex:none;border-radius:14px;background:linear-gradient(135deg,#315efb,#5b8cff);display:grid;place-items:center;font-size:22px;box-shadow:0 10px 20px -8px rgba(49,94,251,.5)}
.mg-hello-txt{min-width:0}
.mg-hello-txt b{font-size:16px;font-weight:800;color:var(--mg-text)}
.mg-hello-txt p{margin:3px 0 0;font-size:12.5px;color:#7b8799}
.mg-hello-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.mg-hello-actions button{min-height:36px;padding:0 14px;border:1px solid #dce3f0;border-radius:9px;background:#fff;color:#536176;font-size:13px;font-weight:700;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.mg-hello-actions button:hover{border-color:#b9c8f8;background:#f5f8ff;color:#315efb}
.mg-hello-actions button.primary{border-color:#315efb;background:#315efb;color:#fff;box-shadow:0 6px 14px rgba(49,94,251,.24)}
.mg-hello-actions button.primary:hover{background:#2a51e0}
/* 顶栏合并问候条：代理快捷按钮并入右侧，副标题前加状态圆点（绿=已就绪 / 蓝=下一步 / 橙=已停用） */
.mg-top-user{display:contents}
.mg-topbar p.mg-top-tip{position:relative;padding-left:14px;font-weight:600}
.mg-topbar p.mg-top-tip::before{content:'';position:absolute;left:0;top:.62em;width:7px;height:7px;border-radius:50%;background:#315efb}
.mg-topbar p.mg-top-tip.ok{color:#0f8a5f}.mg-topbar p.mg-top-tip.ok::before{background:#13a978;box-shadow:0 0 0 3px rgba(19,169,120,.15)}
.mg-topbar p.mg-top-tip.todo{color:#315efb}
.mg-topbar p.mg-top-tip.warn{color:#b46a13}.mg-topbar p.mg-top-tip.warn::before{background:#e8952b}
@media(max-width:640px){.mg-topbar p.mg-top-tip{display:block}}
/* 统计卡：左渐变图标块 + 大数字 + 右侧快捷入口（仅首页 #stats，不影响提现页统计卡） */
#stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
#stats .stat{display:flex;align-items:center;gap:14px;padding:20px 18px;position:relative;transition:border-color .18s,box-shadow .18s}
#stats .stat:hover{border-color:#c9d6f5;box-shadow:0 10px 24px -12px rgba(49,94,251,.35)}
#stats .stat::before{display:none}
#stats .stat .ic{width:54px;height:54px;flex:none;border-radius:15px;display:grid;place-items:center}
#stats .stat .ic svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
#stats .stat .ic1{background:linear-gradient(135deg,#e8eeff,#dbe6ff);color:#315efb}
#stats .stat .ic2{background:linear-gradient(135deg,#e4f6ee,#d5f0e2);color:#0a9e63}
#stats .stat .ic3{background:linear-gradient(135deg,#fff2e4,#ffe7cf);color:#d97a0a}
#stats .stat .ic4{background:linear-gradient(135deg,#e5f5ff,#d4ecff);color:#0f8ed9}
#stats .stat .ic5{background:linear-gradient(135deg,#efe9ff,#e3d9ff);color:#7c5cf0}
#stats .stat .tx{min-width:0}
#stats .stat .tx span{margin-bottom:4px;font-size:13px;color:#7b8799}
#stats .stat .tx b{font-size:28px}
#stats .stat .tx small{display:block;margin-top:6px;font-size:12px;color:#94a3b8;line-height:1.5}
#stats .stat .tx small i{font-style:normal;margin:0 2px;color:#475569;font-weight:700}
#stats .stat .lk{display:none}
#stats .stat .go{position:absolute;right:10px;top:10px;display:inline-flex;align-items:center;gap:2px;min-height:44px;padding:0 10px 0 12px;border:0;border-radius:10px;background:transparent;color:#315efb;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
#stats .stat .go svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
#stats .stat:hover .go{background:#eef3ff}#stats .stat:hover .go svg{transform:translateX(2px)}
#stats .stat.mg-stat-paid{border-color:#bfe9d4;background:linear-gradient(135deg,#f3fcf7,#fff 60%)}
#stats .stat.mg-stat-paid .tx b{color:#0a7d50}
#stats .stat.mg-stat-paid .tx span{color:#0a7d50;font-weight:700}
#stats .stat.mg-stat-unpaid .tx b{color:#94a3b8}
#stats .stat.mg-stat-income .tx b{color:#3157d5}
/* 推广管理卡单栏：二维码统一在「链接与二维码」弹窗里看，卡内不再重复放一份，让出宽度给右侧收益概览 */
.mg-tplsel-main{display:flex;flex-direction:column;gap:12px;min-width:0}
@media (min-width:1381px){
  /* 收益概览列再加宽约 60px（中间推广管理卡相应让出），字号与佣金卡整体放大，填满卡片底部空白 */
  /* 中间推广管理卡加宽约 30px：左列与收益概览列各让一点，列间距收紧 4px，链接行复制按钮不再贴边 */
  .mg-overview-top{grid-template-columns:minmax(280px,320px) minmax(380px,1fr) minmax(360px,430px);gap:10px}
  .side-income .mg-income-rows{padding:4px 24px 22px}
  .side-income .mg-irow{padding:19px 1px}
  .side-income .mg-irow .lb{font-size:16px}
  .side-income .mg-irow b{font-size:27px}
  .side-income .mg-irate p{font-size:12.5px}
  .side-income .mg-income-rows .mg-irate{margin-top:16px;padding:20px 20px 18px}
  .side-income .mg-irate .mg-irate-head .lb{font-size:15px}
  .side-income .mg-irate .mg-irate-head b{font-size:38px}
  .side-income .mg-irate .mg-irate-head b i{font-size:18px}
  .side-income .mg-irate .mg-irate-bar{height:10px;margin:14px 0 8px}
  .side-income .mg-irate .mg-irate-legend{font-size:12.5px}
  .side-income .mg-irate .mg-irate-rules{margin-top:13px;gap:7px}
  .side-income .mg-irate .mg-irate-rules li{font-size:13.5px}
  .side-income .mg-irate .mg-irate-sum{margin-top:16px;padding-top:14px}
  .side-income .mg-irate .mg-irate-sum span{font-size:13px}
  .side-income .mg-income-rows .mg-irate .mg-irate-sum b{margin-top:4px;font-size:14px}
}
/* 佣金比例区：浅蓝底卡 + 分成条 + 勾选规则 + 三格对账，比三行灰字更显眼 */
.side-income .mg-irate{display:block;margin-top:12px;padding:16px 16px 14px;border:1px solid #dfe7fb;border-radius:14px;background:linear-gradient(180deg,#f5f8ff,#fff 70%)}
.mg-irate-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.side-income .mg-irate .mg-irate-head b{font-size:32px;line-height:1;color:#315efb}
.mg-irate-bar{height:8px;margin:12px 0 7px;border-radius:999px;background:#e3e9f8;overflow:hidden}
.mg-irate-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#5b82ff,#315efb)}
.mg-irate-legend{display:flex;justify-content:space-between;font-size:11.5px;font-weight:700;color:#315efb}
.mg-irate-legend span:last-child{color:#94a0b5}
.mg-irate-legend i{display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:2px;background:#315efb;vertical-align:0}
.mg-irate-legend span:last-child i{background:#cfd8ec}
.mg-irate-rules{margin:11px 0 0;padding:0;list-style:none;display:grid;gap:5px}
.mg-irate-rules li{position:relative;padding-left:20px;font-size:12.5px;line-height:1.5;color:#475467;font-weight:600}
.mg-irate-rules li::before{content:'✓';position:absolute;left:0;top:1px;width:14px;height:14px;border-radius:50%;background:#e8eeff;color:#315efb;font-size:9.5px;font-weight:900;line-height:14px;text-align:center}
/* 自己收款块：绿色区分「钱已到你自己商户」与平台结算 */
.side-income .mg-irate.mg-iself{border-color:#cdeedd;background:linear-gradient(180deg,#f0fbf5,#fff 70%)}
.side-income .mg-irate.mg-iself .mg-irate-head b{color:#0f9f61}
.mg-iself .mg-irate-rules li::before{background:#dcf5e8;color:#0f9f61}
/* 对账金额保持完整：常规卡宽沿用三列，空间不足自动换行，长金额不使用省略号。 */
.mg-irate-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,80px),1fr));row-gap:10px;margin-top:12px;border-top:1px dashed #dbe3f4;padding-top:10px}
.mg-irate-sum>div{min-width:0;padding:0 4px;border-left:1px solid #edf1f8}
.mg-irate-sum>div:first-child{padding-left:0;border-left:0}
.mg-irate-sum span{display:block;font-size:11px;color:#8792a5;white-space:nowrap}
.side-income .mg-irate .mg-irate-sum b{display:block;margin-top:4px;font-size:14px;line-height:1.4;font-weight:800;font-variant-numeric:tabular-nums;color:#1f2937;white-space:normal;overflow-wrap:anywhere}
.side-income .mg-irate .mg-irate-sum .neg b{color:#e5484d}
@media (max-width:1380px){
  .side-income .mg-income-rows{grid-template-columns:repeat(3,minmax(0,1fr))}
  .side-income .mg-irate{grid-column:1/-1;margin-top:4px;padding:14px 16px 12px;border:1px solid #dfe7fb}
}
@media (max-width:900px){.side-income .mg-income-rows{grid-template-columns:1fr 1fr}.side-income .mg-irow:nth-child(3){grid-column:1/-1}}
@media (max-width:640px){.side-income .mg-income-rows{grid-template-columns:1fr}}
@media (max-width:900px){
  #stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mg-hello{flex-wrap:wrap}
  .mg-hello-actions{margin-left:0;justify-content:flex-start}
}

/* ===== 模板编辑器：管理员统一配置独立小卡（支付按钮字段下方，实时显示锁定状态） ===== */
.mg-admin-jump{margin-top:10px;padding:12px 12px 10px;border:1px dashed #d7e0f2;border-radius:12px;background:#f8faff}
.mg-admin-jump.on{border-style:solid;border-color:#c9d8fb;background:#f4f8ff}
.mg-admin-jump-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0;list-style:none;cursor:pointer;user-select:none}
.mg-admin-jump[open] .mg-admin-jump-head{margin-bottom:9px}
.mg-admin-jump-head::-webkit-details-marker{display:none}
/* 可收起：标题行右侧「展开 ▾ / 收起 ▴」 */
.mg-admin-jump-head::after{content:'展开 ▾';margin-left:auto;padding:2px 9px;border:1px solid #d7e0f2;border-radius:999px;background:#fff;font-size:11.5px;font-weight:700;color:#315efb;white-space:nowrap}
.mg-admin-jump[open] .mg-admin-jump-head::after{content:'收起 ▴'}
.mg-admin-jump-head:hover::after{border-color:#315efb}
.mg-admin-jump-head b{font-size:12.5px;font-weight:800;color:#315efb}
.mg-admin-jump-head b::before{content:'';display:inline-block;width:3px;height:11px;border-radius:3px;background:#315efb;margin-right:6px;vertical-align:-1px}
.mg-admin-jump-head span{font-size:11.5px;color:#8792a5}
.mg-admin-jump.on .mg-admin-jump-head span{color:#315efb;font-weight:700}
.mg-admin-jump.bad{border-style:solid;border-color:#f5c2c2;background:#fff6f6}
.mg-admin-jump.bad .mg-admin-jump-head span{color:#dc2626;font-weight:700}
.mg-admin-jump.bad .mg-admin-jump-grid label:first-child input{border-color:#f0a3a3}
.mg-admin-jump-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,190px) minmax(0,190px);gap:8px}
.mg-admin-jump-grid label{display:flex;flex-direction:column;gap:5px;font-size:11.5px;color:#59677c;font-weight:700}
.mg-admin-jump-grid input{min-height:38px;border:1px solid var(--mg-line);border-radius:9px;background:#fff;padding:0 10px;font-size:12.5px;color:#1f2937}
.mg-admin-jump-grid input:focus{border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.14);outline:none}
/* 套餐分别跳转：共用地址下方每个套餐一行（名称 / 地址 / 文案 / 颜色），填了地址的行变蓝、隐藏的行置灰 */
.mg-aj-pkgs{margin-top:12px;padding:12px;border:1.5px solid #c7d2fe;border-radius:12px;background:linear-gradient(180deg,#eef2ff,#f8faff 60px)}
.mg-aj-pkgs-h{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:8px}.mg-aj-pkgs-h b{font-size:14px;font-weight:800;color:#3730a3}.mg-aj-pkgs-h b:before{content:'☰';display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:7px;border-radius:7px;background:#4f46e5;color:#fff;font-size:12px;vertical-align:1px}.mg-aj-pkgs-h span{font-size:12px;color:#6366f1}
.mg-aj-pkg{display:grid;grid-template-columns:minmax(0,150px) minmax(0,1fr) minmax(0,150px) auto;gap:8px;align-items:center;padding:8px;margin-top:6px;border:1px solid var(--mg-line);border-radius:10px;background:#fff}
.mg-aj-pkg.own{border-color:#c9d8fb;background:#f4f8ff}.mg-aj-pkg.bad{border-color:#f5c2c2;background:#fff6f6}.mg-aj-pkg.hid{opacity:.6}
.mg-aj-pkg-n{display:flex;flex-direction:column;gap:2px;min-width:0}.mg-aj-pkg-n b{font-size:12.5px;color:#1f2937}.mg-aj-pkg-n span{font-size:11.5px;color:#7c3aed;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-aj-pkg-n em{font-size:11px;font-style:normal;font-weight:700;color:#8792a5}.mg-aj-pkg.own .mg-aj-pkg-n em{color:#315efb}.mg-aj-pkg.bad .mg-aj-pkg-n em{color:#dc2626}
.mg-aj-pkg>input{min-height:36px;border:1px solid var(--mg-line);border-radius:9px;background:#fff;padding:0 10px;font-size:12.5px;color:#1f2937;min-width:0}
.mg-aj-pkg>input:focus{border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.14);outline:none}
.mg-aj-color{display:flex;align-items:center;gap:8px}.mg-aj-color input[type=color]{width:40px;height:32px;padding:3px;border:1px solid var(--mg-line);border-radius:9px;background:#fff;cursor:pointer}.mg-aj-color.def input[type=color]{opacity:.45}
@media (max-width:760px){.mg-aj-pkg{grid-template-columns:1fr}}
/* 解锁按钮颜色：色块预览+取色器+hex 一行、预设色点一行、沿用开关一行，纵向堆叠不再挤在单行 */
.mg-admin-color{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.mg-ac-row{display:flex;align-items:center;gap:9px}
.mg-ac-sw{width:34px;height:34px;border-radius:9px;flex:none;border:1px solid rgba(15,23,42,.1);box-shadow:inset 0 0 0 2px #fff}
.mg-admin-color input[type=color]{width:46px;height:34px;min-height:34px;padding:3px;border:1px solid var(--mg-line);border-radius:9px;background:#fff;cursor:pointer}
.mg-admin-color input[type=color]:disabled{opacity:.45;cursor:not-allowed}
.mg-ac-hex{font-family:Consolas,Menlo,monospace;font-size:12px;font-weight:700;color:#59677c;text-transform:uppercase}
.mg-ac-presets{display:flex;gap:8px}
.mg-ac-presets i{width:22px;height:22px;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(15,23,42,.14);transition:transform .15s}
.mg-ac-presets i:hover{transform:scale(1.15)}
/* 沿用默认色时取色器已 disabled，预设色点一并置灰禁点，避免点了没反应 */
.mg-admin-color.def .mg-ac-presets{opacity:.4;pointer-events:none}
.mg-ac-def{display:inline-flex;align-items:center;gap:8px;font-size:11.5px;font-weight:600;color:#59677c;white-space:nowrap;font-style:normal;cursor:pointer}
.mg-ac-def input{appearance:none;-webkit-appearance:none;width:38px;height:21px;min-height:0;border-radius:999px;background:#d7dce6;position:relative;cursor:pointer;transition:background .18s;flex:none;margin:0;padding:0}
.mg-ac-def input::after{content:'';position:absolute;top:2.5px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:left .18s}
.mg-ac-def input:checked{background:#315efb}
.mg-ac-def input:checked::after{left:19px}
.mg-admin-jump p{margin:8px 0 0;font-size:11px;line-height:1.7;color:#8792a5}
@media (max-width:760px){.mg-admin-jump-grid{grid-template-columns:1fr}}

/* ---------- 售后服务：模板售后卡 / 代理售后设置 / 投诉管理 ---------- */
/* 推广管理按钮组 8 个：前 6 个整齐 3×2，暂停与删除两个「开关类」操作并排最后一行各占一半（6 列栅格，普通按钮跨 2 列） */
@media(min-width:901px){#overview .mg-manage-actions{grid-template-columns:repeat(6,minmax(0,1fr))}#overview .mg-manage-actions button{grid-column:span 2}#overview .mg-manage-actions button.danger,#overview .mg-manage-actions button.pause{grid-column:span 3}}
.mg-manage-actions button.danger,.mg-manage-actions button.pause{min-height:44px;justify-content:center}
.mg-manage-actions button.pause{border-color:#f3dfb8;background:#fffcf5;color:#a15c07}
.mg-manage-actions button.pause>span{background:#fff4dc;color:#c27803}
.mg-manage-actions button.pause:hover:not(:disabled){border-color:#ebc77d;background:#fff8ea}
.mg-manage-actions button.pause.on{border-color:#b7e4c7;background:#f5fcf7;color:#1c7c43}
.mg-manage-actions button.pause.on>span{background:#e3f7ea;color:#1c9a50}
.mg-kf-config{display:flex;gap:16px;align-items:flex-start;margin-top:4px}
.mg-kf-thumb{position:relative;flex:0 0 120px;width:120px;height:120px;display:grid;place-items:center;overflow:hidden;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;color:#94a3b8;font-size:12px;text-align:center}
.mg-kf-thumb img{width:100%;height:100%;object-fit:contain;background:#fff}
.mg-kf-thumb i{position:absolute;left:6px;top:6px;padding:1px 7px;border-radius:999px;background:rgba(15,23,42,.62);color:#fff;font-size:10px;font-style:normal;font-weight:700}
.mg-kf-pick{cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.mg-kf-pick:hover{border-color:#315efb;background:#f5f8ff;box-shadow:0 0 0 3px rgba(49,94,251,.08)}
.mg-kf-pick:has(img){border-style:solid;border-color:var(--mg-line)}
.mg-kf-pick:has(img)::after{content:'点击更换';position:absolute;left:0;right:0;bottom:0;padding:5px 0;background:rgba(15,23,42,.58);color:#fff;font-size:11px;font-weight:600;opacity:0;transition:opacity .15s}
.mg-kf-pick:has(img):hover::after{opacity:1}
.mg-kf-empty{display:flex;flex-direction:column;align-items:center;gap:6px;color:#8a96aa;font-size:12px;font-weight:600}
.mg-kf-empty b{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#eef3ff;color:#315efb;font-size:20px;font-weight:500;line-height:1}
.mg-kf-fields{flex:1;min-width:0}
.mg-kf-fields .mg-block:last-child{margin-bottom:0}
.mg-kf-label{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:#334155}
.mg-kf-label em{margin-left:6px;font-style:normal;font-weight:400;font-size:12px;color:var(--mg-muted)}
.mg-kf-inrow{display:flex;gap:8px}
.mg-kf-inrow input{flex:1;min-width:0}
.mg-kf-inrow button{flex:0 0 auto;min-height:42px;padding:0 18px;border:1px solid #d6e0ff;border-radius:10px;background:#f5f8ff;color:#315efb;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s}
.mg-kf-inrow button:hover{background:#eaf0ff;border-color:#b8c9ff}
/* 客服联系方式：类型下拉与号码拼成一个输入组（自定义时中间插入名称框），右侧删除，最多 3 行 */
.mg-kf-contacts{display:flex;flex-direction:column;gap:8px}
.mg-kf-crow{display:flex;align-items:stretch}
.mg-kf-crow>*{position:relative;margin:0}
.mg-kf-crow>*:focus{z-index:1}
.mg-kf-crow .pick{flex:0 0 104px;width:104px;padding-right:26px;border-radius:10px 0 0 10px;background-color:#f8fafc;color:#334155;font-size:13px;font-weight:600;cursor:pointer}
.mg-kf-crow .lb{display:none;flex:0 0 88px;width:88px;min-width:0;margin-left:-1px;border-radius:0;font-size:13px}
.mg-kf-crow.custom .lb{display:block}
.mg-kf-crow .val{flex:1;min-width:0;margin-left:-1px;border-radius:0 10px 10px 0}
.mg-kf-crow .del{flex:0 0 42px;width:42px;min-height:42px;margin-left:8px;padding:0;border:1px solid var(--mg-line);border-radius:10px;background:#fff;color:#94a3b8;font-size:18px;line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.mg-kf-crow .del:hover:not(:disabled){border-color:#fecaca;background:#fef2f2;color:#dc2626}
.mg-kf-cadd{display:flex;align-items:center;gap:6px;width:100%;min-height:38px;padding:0 12px;border:1px dashed #c7d4f7;border-radius:10px;background:#f8faff;color:#315efb;font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s}
.mg-kf-cadd b{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#e5ecff;font-size:14px;line-height:1}
.mg-kf-cadd em{margin-left:auto;color:var(--mg-muted);font-size:12px;font-style:normal;font-weight:400}
.mg-kf-cadd:hover:not(:disabled){border-color:#9fb4f5;background:#eef3ff}
.mg-kf-cadd[hidden]{display:none}
.mg-kf-cnote{margin:6px 0 0;font-size:12px;line-height:1.5;color:var(--mg-muted);overflow-wrap:anywhere}
/* 模板售后卡：两张入口卡 + 分段切换（视图，取值走隐藏 select）+ 客服弹窗内容面板 */
.mg-svc-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mg-svc-mode{display:flex;flex-direction:column;padding:14px;border:1px solid var(--mg-line);border-radius:14px;background:#fff;transition:border-color .2s,box-shadow .2s,background .2s}
.mg-svc-mode select[hidden]{display:none!important}
.mg-svc-mode[data-mode=force]{border-color:#bbe7cb;box-shadow:0 8px 18px -14px rgba(22,163,74,.6)}
.mg-svc-mode[data-mode=off]{background:#fafbfd}
.mg-svc-mode-head{display:flex;align-items:center;gap:11px;margin-bottom:12px}
.mg-svc-mode-head>div{min-width:0}
.mg-svc-mode-head b{display:block;font-size:14px;color:var(--mg-text);line-height:1.3}
.mg-svc-mode-head small{display:block;margin-top:3px;font-size:12px;color:var(--mg-sub);line-height:1.4}
.mg-svc-ico{flex:0 0 38px;width:38px;height:38px;display:grid;place-items:center;border-radius:11px;transition:background .2s,color .2s}
.mg-svc-ico svg{width:19px;height:19px}
.mg-svc-ico.cp{background:#fff1f2;color:#e11d48}
.mg-svc-ico.kf{background:#eef3ff;color:#315efb}
.mg-svc-mode[data-mode=off] .mg-svc-ico{background:#f1f5f9;color:#a3adbd}
.mg-svc-mode[data-mode=off] .mg-svc-mode-head b{color:#64748b}
.mg-svc-select{-webkit-appearance:none;appearance:none;width:100%;min-height:42px;margin:0;padding:0 40px 0 13px;border:1px solid var(--mg-line);border-radius:10px;background:#f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center/15px;color:#1e293b;font-size:13px;font-weight:700;cursor:pointer;text-overflow:ellipsis;transition:border-color .15s,background-color .15s,box-shadow .15s}
.mg-svc-mode .mg-svc-select{margin-top:auto}
/* 悬浮按钮图标：预览尺寸与访客页一致（默认 50px 渐变圆，自定义图 60px） */
.mg-svc-icon{display:flex;align-items:center;gap:10px;margin-top:10px;padding:9px 10px;border:1px dashed var(--mg-line);border-radius:10px;background:#fafbfd}
.mg-svc-mode[data-mode=off] .mg-svc-icon{display:none}
.mg-svc-icon-prev{flex:0 0 52px;width:52px;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
.mg-svc-icon-prev.def{flex-basis:44px;width:44px;height:44px;margin:4px;border-radius:50%;color:#fff;font-size:9px;font-weight:700;line-height:1.1;box-shadow:0 4px 10px rgba(15,23,42,.18)}
.mg-svc-icon-prev.def svg{width:16px;height:16px}
.mg-svc-icon-prev.def.cp{background:linear-gradient(135deg,#ff8a4c,#f5222d)}
.mg-svc-icon-prev.def.kf{background:linear-gradient(135deg,#36cfc9,#1677ff)}
.mg-svc-icon-prev img{width:100%;height:100%;object-fit:contain}
.mg-svc-icon-txt{flex:1;min-width:0}
.mg-svc-icon-txt b{display:block;font-size:13px;color:var(--mg-text);line-height:1.3}
.mg-svc-icon-txt small{display:block;margin-top:2px;font-size:11px;color:var(--mg-sub);line-height:1.4}
.mg-svc-icon button{flex:0 0 auto;min-height:30px;padding:0 12px;border:1px solid #d6e0ff;border-radius:8px;background:#f5f8ff;color:#315efb;font-size:12px;font-weight:700;cursor:pointer}
.mg-svc-icon button:hover{background:#eaf0ff}
.mg-svc-icon button.del{border-color:#fecdd3;background:#fff1f2;color:#e11d48}
.mg-svc-icon button.del:hover{background:#ffe4e6}
.mg-svc-icon button[hidden]{display:none}
.mg-svc-select:hover{border-color:#b6c3e0;background-color:#fff}
.mg-svc-select:focus{background-color:#fff}
.mg-svc-select option{font-weight:600;color:#1e293b}
.mg-svc-mode[data-mode=on] .mg-svc-select{color:#315efb}
.mg-svc-mode[data-mode=force] .mg-svc-select,.mg-svc-mode[data-mode=lock] .mg-svc-select{color:#16a34a}
.mg-svc-mode[data-mode=off] .mg-svc-select{color:#64748b}
.mg-svc-mode[data-mode=on]{border-color:#c9d6fb;box-shadow:0 8px 18px -14px rgba(49,94,251,.6)}
.mg-svc-mode[data-mode=lock]{border-color:#bbe7cb;box-shadow:0 8px 18px -14px rgba(22,163,74,.6)}
.mg-kf-config.locked .mg-kf-pick{cursor:not-allowed}
.mg-kf-config.locked .mg-kf-pick:hover{border-color:var(--mg-line);background:#f8fafc;box-shadow:none}
.mg-kf-config.locked .mg-kf-pick::after{display:none}
.mg-kf-config.locked input:disabled{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}
.mg-svc-card .mg-kf-config{margin-top:12px;padding:14px;border:1px solid var(--mg-line);border-radius:14px;background:#fff}
.mg-kf-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.mg-kf-title b{font-size:14px;color:var(--mg-text)}
.mg-kf-title span{font-size:12px;color:var(--mg-muted)}
.mg-svc-note{display:flex;align-items:center;gap:7px;margin:12px 0 0;padding:9px 12px;border-radius:10px;background:#f2f6ff;color:#4b5b78;font-size:12px;line-height:1.6}
.mg-svc-note::before{content:'i';flex:0 0 16px;width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:#315efb;color:#fff;font-size:11px;font-weight:800;font-style:italic;font-family:Georgia,serif}
.mg-svc-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;margin-bottom:10px;border:1px solid var(--mg-line);border-radius:12px;background:#fff}
.mg-svc-row b{font-size:14px;color:#1e293b}
.mg-svc-row p{margin:4px 0 0;font-size:12px;line-height:1.6;color:var(--mg-sub)}
.mg-svc-row .mg-switch{padding:0;border:0;background:none}
.mg-svc-row.locked{background:#f8fafc}
.mg-svc-row.locked .mg-switch{opacity:.6;cursor:not-allowed}
.mg-svc-row.locked .mg-switch input{cursor:not-allowed}
.mg-cp-filters input{min-width:200px}
.mg-cp-filters select{max-width:260px}
.mg-cp-notify{display:flex;align-items:center;justify-content:space-between;gap:10px 18px;flex-wrap:wrap;margin:0 0 12px;padding:9px 14px;border-radius:10px;font-size:13px;line-height:1.6}
.mg-cp-notify[hidden]{display:none}
.mg-cp-notify.warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a}
.mg-cp-notify.ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.mg-cp-notify a{margin-left:4px;color:#2563eb;font-weight:700;text-decoration:none}
.mg-cp-notify .mg-switch{color:#334155;font-size:13px}
/* ylb.css 的 #app input[type=checkbox]{width:auto;height:auto} 是 ID 级优先级，会把 appearance:none 的滑块轨道压成 0（只剩一个圆点），这里用同级选择器把尺寸补回来 */
#app .mg-switch input[type=checkbox]{width:38px;height:22px;min-height:0;margin:0}
#app .payment-checks input[type=checkbox]{width:34px;height:20px;min-height:20px;margin:0}
#app .mg-ac-def input[type=checkbox]{width:38px;height:21px;min-height:0;margin:0}
/* 投诉设置（管理员）：两张开关卡，标题 + 灰色说明，等宽两列 */
.mg-cp-sets{flex:1 1 100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}
.mg-cp-notify .mg-cp-set{align-items:center;gap:12px;padding:11px 14px;border-color:rgba(15,23,42,.08);background:rgba(255,255,255,.85)}
.mg-cp-set>span{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.4}
.mg-cp-set b{font-size:13.5px;font-weight:700;color:#1f2937}
.mg-cp-set em{font-style:normal;font-weight:500;font-size:12px;color:#94a3b8}
.mg-cp-set input:checked+span b{color:#5b21b6}
.mg-cp-set.locked{cursor:not-allowed}
.mg-cp-set.locked input{opacity:.55;cursor:not-allowed}
.mg-cp-table td{vertical-align:top}
.mg-cp-pending td{background:#fffdf5}
.mg-cp-main{min-width:220px;max-width:340px}
.mg-cp-main p{margin:6px 0 0;font-size:13px;line-height:1.6;color:#334155;white-space:pre-wrap;word-break:break-all}
.mg-cp-main .mg-cp-reply{padding:6px 9px;border-radius:8px;background:#f0f9ff;color:#0369a1;font-size:12px}
.mg-cp-cat{display:inline-block;padding:2px 9px;border-radius:999px;background:#fff1f2;color:#e11d48;font-size:12px;font-weight:700}
.mg-cp-imgs{display:flex;gap:6px;flex-wrap:wrap}
.mg-cp-imgs button{width:48px;height:48px;padding:0;overflow:hidden;border:1px solid var(--mg-line);border-radius:8px;background:#f8fafc;cursor:zoom-in}
.mg-cp-imgs img{width:100%;height:100%;object-fit:cover}
.mg-cp-order{font-size:12px;word-break:break-all}
.mg-cp-detail{padding:14px;margin-bottom:14px;border:1px solid var(--mg-line);border-radius:12px;background:#f8fafc}
.mg-cp-dhead{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mg-cp-dhead em{margin-left:auto;font-style:normal;font-size:12px;color:var(--mg-muted)}
.mg-cp-dtext{margin:10px 0;font-size:14px;line-height:1.7;color:#1e293b;white-space:pre-wrap;word-break:break-all}
.mg-cp-detail .mg-cp-imgs{margin-bottom:10px}
.mg-cp-detail .mg-cp-imgs button{width:72px;height:72px}
.mg-cp-dgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mg-cp-dgrid div{padding:8px 10px;border-radius:9px;background:#fff}
.mg-cp-dgrid span{display:block;font-size:11px;color:var(--mg-muted)}
.mg-cp-dgrid b{display:block;margin-top:2px;font-size:13px;word-break:break-all}
.mg-cp-quick{display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 12px}
.mg-cp-quick button{padding:4px 10px;border:1px solid #dbe3f0;border-radius:999px;background:#fff;color:#475569;font-size:12px;cursor:pointer}
.mg-cp-quick button:hover{border-color:#9fb3f2;color:#315efb}
.mg-req{font-style:normal;font-size:12px;color:#e11d48}
.mg-theme-box{display:flex;flex-direction:column;gap:8px;margin:0;padding:14px;border-radius:14px;background:#f8fafc;border:1px solid #eef1f8}
.mg-theme-box>b{display:flex;align-items:center;gap:8px;font-size:13px}
.mg-theme-box>b::before{content:'';width:4px;height:14px;border-radius:4px;background:var(--mg-grad)}
/* 主题配色：三行列表（名称 | 当前值 | 色块 | 恢复），未自定义时「恢复」隐藏 */
.mg-theme-row{display:flex;flex-direction:column;border:1px solid var(--mg-line);border-radius:12px;background:#fff;overflow:hidden}
.mg-theme-item{display:flex;align-items:center;gap:10px;margin:0;padding:10px 14px;background:#fff;font-weight:600;cursor:pointer;transition:background .15s}
.mg-theme-item+.mg-theme-item{border-top:1px solid #eef1f6}
.mg-theme-item:hover{background:#f8faff}
.mg-theme-item>span{flex:1;font-size:13px;font-weight:700;color:#1e293b}
label.mg-theme-item>input[type=color]{flex:0 0 auto;width:44px;height:30px;min-height:30px;margin:0;padding:3px;border:1px solid var(--mg-line);border-radius:8px;background:#fff;cursor:pointer}
label.mg-theme-item>input[type=color]::-webkit-color-swatch-wrapper{padding:0}
label.mg-theme-item>input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}
.mg-theme-item em{min-width:58px;text-align:right;font-style:normal;font-size:12px;font-weight:400;color:#98a3b5;font-family:Consolas,monospace}
.mg-theme-item.on em{color:#315efb}
.mg-theme-item button{min-height:0;height:26px;padding:0 10px;border:1px solid #dbe3f0;border-radius:999px;background:#fff;color:#64748b;font-size:12px;font-weight:400;box-shadow:none;cursor:pointer}
.mg-theme-item:not(.on) button{visibility:hidden}
.mg-theme-item button:hover{border-color:#9fb3f2;color:#315efb;background:#fff;transform:none}
.mg-adv-css{margin-top:2px}
.mg-adv-css summary{cursor:pointer;font-size:12px;color:#315efb;user-select:none}
.mg-adv-css textarea{width:100%;margin-top:8px;font-family:Consolas,monospace;font-size:12px}
.mg-cp-qitem{display:inline-flex;align-items:center;gap:2px;max-width:100%}
.mg-cp-qitem button{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-cp-qitem i{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;font-style:normal;font-size:12px;line-height:1;color:#98a3b5;cursor:pointer}
.mg-cp-qitem i:hover{background:#fee2e2;color:#e11d48}
.mg-cp-quick .mg-cp-qadd{border-style:dashed;border-color:#9fb3f2;color:#315efb}
/* 转化表不沿用访问明细的 70px 首列；内容完整单行，窄屏仅在表格内横向滚动。 */
.mg-console #right table.mg-funnel-table{table-layout:auto;width:100%;min-width:1240px}
.mg-console #right table.mg-funnel-table th,.mg-console #right table.mg-funnel-table td{width:auto;padding:10px 12px;line-height:1.5;white-space:nowrap;overflow-wrap:normal;word-break:normal;overflow:visible;text-overflow:clip}
.mg-console #right table.mg-funnel-table th:first-child,.mg-console #right table.mg-funnel-table td:first-child{width:20%;min-width:200px}
.mg-console #right table.mg-funnel-table td b{white-space:nowrap}
.mg-console #right table.mg-funnel-table .mg-cell-sub{display:inline;margin:0 0 0 8px;white-space:nowrap}
.mg-funnel-hl td{background:#eef4ff}
.mg-funnel-rate{color:#059669}
/* 模板管理列表放大：字号/行高加大；操作列收窄右对齐（与面板头「新建模板」同一竖线），外露 编辑/复制/授权 + 「更多」下拉 */
#templates .table-wrap table{font-size:15px}
#templates .table-wrap th{padding:15px 18px;font-size:14px}
#templates .table-wrap td{padding:20px 18px}
#templates .table-wrap td b{font-size:16px}
#templates .table-wrap .mg-muted{font-size:13px;line-height:1.9}
#templates .table-wrap .badge{padding:5px 12px;font-size:13px}
#templates .mg-tpl-ops{width:1%;white-space:nowrap;text-align:right}
#templates .mg-tpl-ops .op-row{justify-content:flex-end;flex-wrap:nowrap;gap:8px}
#templates .mg-tpl-ops .op-btn{flex:0 0 auto;min-width:76px;height:38px;min-height:38px;padding:0 16px;font-size:14px}
.mg-more-trigger i{margin-left:5px;font-style:normal;font-size:11px;opacity:.7;transition:transform .15s}
.mg-more.open .mg-more-trigger{border-color:#9fb3f2;background:#f5f8ff}
.mg-more.open .mg-more-trigger i{transform:rotate(180deg)}
.mg-tpl-menu{min-width:150px}
.mg-tpl-menu button{min-height:40px;font-size:14px}
.mg-tpl-menu button:hover{background:#f5f8ff;color:#315efb}
.mg-tpl-menu button.success{color:#059669}
.mg-tpl-menu button.danger{position:relative;margin-top:9px}
.mg-tpl-menu button.danger::before{content:'';position:absolute;left:8px;right:8px;top:-5px;border-top:1px solid #eef1f6}
@media (max-width:640px){.mg-kf-config{flex-direction:column}.mg-cp-dgrid{grid-template-columns:1fr}.mg-svc-modes{grid-template-columns:1fr}}

/* 选择推广模板：左上角只留「可推广」状态，「放大」挪到右上角（让开 iframe 滚动条），白底毛玻璃胶囊不压内容；
   鼠标移到小卡上时变蓝底、稍放大提示可点；放大预览弹窗（屏宽 375 = PV_VIRTUAL_W，按真实手机尺寸 1:1 渲染） */
.mg-pick-tl{position:absolute;z-index:4;top:10px;left:10px;display:flex;align-items:center;gap:6px;pointer-events:none}
.mg-pick-tl .cover-flag{position:static}
.mg-pick-zoom{position:absolute;z-index:5;top:10px;right:18px;display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 12px 0 10px;border:1px solid rgba(255,255,255,.9);border-radius:999px;background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#315efb;font-size:12.5px;font-weight:800;cursor:pointer;box-shadow:0 4px 14px rgba(15,23,42,.22);transition:background .15s,color .15s,transform .15s,box-shadow .15s}
.mg-pick-zoom svg{width:14px;height:14px;flex:none}
.mg-pick-live:hover .mg-pick-zoom{background:#315efb;border-color:#315efb;color:#fff;box-shadow:0 6px 16px rgba(49,94,251,.4)}
.mg-pick-zoom:hover{transform:scale(1.06)}
.mg-pick-zoom:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(49,94,251,.35)}
.mg-pvzoom{display:flex;flex-direction:column;align-items:center;gap:12px;max-height:100%}
.mg-pvzoom-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:395px;max-width:100%;color:#fff}
.mg-pvzoom-head b{font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-pvzoom-head .icon-close{background:rgba(255,255,255,.18);color:#fff}
.mg-pvzoom-head .icon-close:hover{background:rgba(255,255,255,.3)}
.mg-pvzoom .phone{width:395px;max-width:calc(100vw - 40px);box-sizing:border-box;padding:10px;border-radius:38px;background:#182033;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.mg-pvzoom .phone-screen{height:min(780px,calc(100vh - 150px));border-radius:28px;overflow:hidden;background:#fff;position:relative}
.mg-pvzoom .phone-screen iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.mg-pvzoom .mg-pv-cap{color:rgba(255,255,255,.75)}
/* 模板背景音乐 */
.mg-bgm-box{display:flex;flex-direction:column;gap:10px}
.mg-bgm-box audio{display:block;width:100%;height:40px}
.mg-bgm-box audio[hidden],.mg-bgm-box button[hidden]{display:none}
.mg-bgm-box .mg-kf-inrow button:disabled{opacity:.6;cursor:wait}
#tplBgmDel{border-color:#fecaca;background:#fff5f5;color:#dc2626}
#tplBgmDel:hover{background:#fee2e2;border-color:#fca5a5}
/* 文本段落富文本编辑器：上方工具栏（选中文字的加粗 / 字号 / 颜色 / 底色）+ 编辑区 + 整段设置条，整体一个圆角框 */
.mg-rte{border:1px solid #dfe3ee;border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.mg-rte:focus-within{border-color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.12)}
.mg-rte-bar{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid #eef1f8;border-radius:12px 12px 0 0;background:#f8faff}
.mg-rte-btn{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:32px;height:32px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#334155;font-size:15px;line-height:1;cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.mg-rte-btn:hover{background:#fff;border-color:#d7e0f2;color:#315efb}
.mg-rte-btn em{font-style:normal;font-size:10px;color:#94a3b8}
.mg-rte-tx{font-size:12.5px;font-weight:700}
.mg-rte-a,.mg-rte-hl{display:inline-flex;flex-direction:column;align-items:center;font-weight:800;line-height:1}
.mg-rte-a{font-size:15px}.mg-rte-hl{font-size:12.5px}
.mg-rte-a i,.mg-rte-hl i{display:block;width:16px;height:4px;margin-top:2px;border-radius:2px;background:#e11d48}
.mg-rte-hl i{width:24px;background:#fef08a;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.mg-rte-sep{width:1px;height:20px;margin:0 4px;background:#e2e8f0}
.mg-rte-dd{position:relative;display:inline-flex}
.mg-rte-pop{display:none;position:absolute;z-index:30;top:calc(100% + 6px);left:0;min-width:196px;padding:10px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;box-shadow:0 12px 32px -8px rgba(15,23,42,.25)}
.mg-rte-dd.open .mg-rte-pop{display:block}
.mg-rte-dd.open>.mg-rte-btn{background:#fff;border-color:#bfd0ff;color:#315efb}
.mg-rte-sw{display:grid;grid-template-columns:repeat(8,20px);gap:6px}
.mg-rte-sw i{width:20px;height:20px;border-radius:6px;box-shadow:inset 0 0 0 1px rgba(15,23,42,.12);cursor:pointer;transition:transform .12s}
.mg-rte-sw i:hover{transform:scale(1.18)}
.mg-rte-custom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 0;font-size:12.5px;font-weight:600;color:#475569;cursor:pointer}
.mg-rte-custom input[type=color]{width:44px;height:26px;min-height:26px;padding:2px;border:1px solid #dfe3ee;border-radius:7px;cursor:pointer}
.mg-rte-clear,.mg-rte-sizes .def{width:100%;min-height:30px;margin-top:8px;border:1px dashed #d7e0f2;border-radius:8px;background:#fff;color:#64748b;font-size:12.5px;cursor:pointer}
.mg-rte-clear:hover,.mg-rte-sizes .def:hover{border-color:#315efb;color:#315efb}
.mg-rte-sizes{display:flex;flex-direction:column;min-width:150px;max-height:300px;overflow:auto}
.mg-rte-sizes button:not(.def){padding:5px 10px;border:0;border-radius:7px;background:transparent;color:#1f2937;text-align:left;line-height:1.3;cursor:pointer}
.mg-rte-sizes button:not(.def):hover{background:#f1f5ff;color:#315efb}
.mg-rte-body{min-height:150px;max-height:80vh;overflow:auto;resize:vertical;padding:12px 14px;border-radius:0;color:#1f2937;font-size:15px;line-height:1.75;word-break:break-word;white-space:normal;outline:none;cursor:text}
.mg-rte-body.is-empty::before{content:attr(data-ph);color:#a0aec0;pointer-events:none}
.mg-rte-body.is-empty>br:only-child{display:none}
.mg-rte-block{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:8px 10px;border-top:1px solid #eef1f8;background:#fbfcff}
.mg-rte-lb{font-size:12px;font-weight:800;color:#315efb;line-height:1}
.mg-rte-seg{display:inline-flex;border:1px solid #dfe3ee;border-radius:8px;background:#fff;overflow:hidden}
.mg-rte-seg button{height:28px;padding:0 10px;border:0;background:transparent;color:#475569;font-size:12px;font-weight:700;cursor:pointer;line-height:1}
.mg-rte-seg button+button{border-left:1px solid #eef1f8}
.mg-rte-seg button.on{background:#315efb;color:#fff}
.mg-rte-block .mg-rte-sel,.mg-rte-cl{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;color:#475569;height:28px}
.mg-rte-block b{font-weight:700;line-height:1}
.mg-rte-block select{width:auto;min-height:28px;height:28px;margin:0;padding:0 6px;border-radius:8px;font-size:12px;line-height:1;vertical-align:middle}
.mg-rte-cl input[type=color]{width:34px;height:28px;min-height:28px;padding:2px;border:1px solid #dfe3ee;border-radius:7px;cursor:pointer;vertical-align:middle}
.mg-rte-cl.def input[type=color]{opacity:.4}
.mg-rte-def{display:inline-flex;align-items:center;gap:4px;margin:0;font-size:12px;color:#64748b;cursor:pointer;height:28px;line-height:1}
.mg-rte-def input{width:16px;height:16px;min-height:16px;margin:0;padding:0;vertical-align:middle}
.mg-rte-foot{display:flex;justify-content:space-between;gap:10px;padding:6px 10px;border-top:1px solid #eef1f8;font-size:11.5px;color:#94a3b8}
.mg-rte-foot em{flex:none;font-style:normal}.mg-rte-foot em.over{color:#e11d48;font-weight:700}
/* 源代码模式：点「</> 源代码」后编辑区换成深色代码框，其它工具按钮置灰；再点一次回到可视化 */
.mg-rte-srcbtn{margin-left:auto;border-color:#d7e0f2;background:#fff;color:#315efb}
.mg-rte-srcbtn.on,.mg-rte-srcbtn.on:hover{background:#315efb;border-color:#315efb;color:#fff}
.mg-rte .mg-rte-srcarea,.mg-rte .mg-rte-srcarea:hover,.mg-rte .mg-rte-srcarea:focus{display:none;width:100%;min-height:200px;max-height:80vh;margin:0;padding:12px 14px;border:0;border-radius:0;background:#0f172a;color:#e2e8f0;font:13px/1.7 Consolas,Monaco,"Courier New",monospace;white-space:pre-wrap;word-break:break-all;resize:vertical;outline:none;box-sizing:border-box;box-shadow:none;caret-color:#7dd3fc}
.mg-rte .mg-rte-srcarea::placeholder{color:#64748b;font-size:13px}
.mg-rte-srctip{display:none;padding:7px 10px;border-top:1px solid #eef1f8;background:#f8faff;font-size:11.5px;line-height:1.9;color:#64748b}
.mg-rte-srctip code{padding:1px 5px;border-radius:4px;background:#eef2ff;color:#315efb;font:11.5px Consolas,Monaco,monospace}
.mg-rte-src .mg-rte-body{display:none}
.mg-rte.mg-rte-src .mg-rte-srcarea,.mg-rte.mg-rte-src .mg-rte-srctip{display:block}
.mg-rte-src .mg-rte-bar>.mg-rte-btn:not(.mg-rte-srcbtn),.mg-rte-src .mg-rte-bar>.mg-rte-dd,.mg-rte-src .mg-rte-bar>.mg-rte-sep{opacity:.35;pointer-events:none}
@media(max-width:640px){.mg-rte-block{gap:8px}.mg-rte-foot span{display:none}}

/* 管理员用户明细：样式限定在专属列表和弹窗，不影响代理编辑器。 */
#adminUsers table{min-width:1150px}
#adminUsers .mg-user-entry{max-width:250px;overflow-wrap:anywhere;white-space:normal}
#adminUsers td.mg-num{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
#adminUsers td .op-btn+.op-btn{margin-left:6px}
#adminUsers td.mg-num.zero{color:#b6bfcf;font-weight:500}
#adminUserMask .mg-user-dialog{width:min(1180px,96vw);max-width:1180px}
#adminUserMask .mg-user-dialog .editor-body{padding:0 22px 22px;overflow:auto;background:#f6f8fc}
#adminUserMask .mg-user-dialog>.editor-foot{margin:0;padding:12px 22px;border-top:1px solid var(--mg-line);font-size:12px;color:var(--mg-sub);background:#fff}
#adminUserMask button:disabled{opacity:.5;cursor:not-allowed}
#adminUserMask .mg-user-tabs{position:sticky;top:0;z-index:3;display:flex;gap:4px;margin:0 -22px 18px;padding:0 22px;background:#fff;border-bottom:1px solid var(--mg-line);overflow-x:auto}
#adminUserMask .mg-user-tabs button{flex:none;min-height:46px;padding:0 16px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--mg-sub);font-size:14px;font-weight:700;box-shadow:none;cursor:pointer}
#adminUserMask .mg-user-tabs button:hover{color:#315efb;transform:none}
#adminUserMask .mg-user-tabs button.on{color:#315efb;border-bottom-color:#315efb}
#adminUserMask .mg-user-pane{display:none}
#adminUserMask .mg-user-pane.on{display:block}
#adminUserMask .mg-user-group{margin-bottom:16px}
#adminUserMask .mg-user-group h4{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--mg-sub)}
#adminUserMask .mg-user-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#adminUserMask .mg-user-kpi{padding:14px 16px;border:1px solid var(--mg-line);border-radius:12px;background:#fff}
#adminUserMask .mg-user-kpi span{display:block;font-size:12px;color:var(--mg-sub)}
#adminUserMask .mg-user-kpi b{display:block;margin-top:6px;font-size:22px;font-weight:800;color:var(--mg-text);font-variant-numeric:tabular-nums}
#adminUserMask .mg-user-kpi small{display:block;margin-top:2px;font-size:12px;color:var(--mg-muted)}
#adminUserMask .mg-user-kpi.main{border-color:#c9d6fe;background:#f3f6ff}
#adminUserMask .mg-user-kpi.main b{color:#315efb}
#adminUserMask .mg-user-kpi.zero b{color:#b6bfcf}
#adminUserMask .mg-user-tip{margin:0 0 16px;font-size:12px;color:var(--mg-sub)}
#adminUserMask .mg-user-tip summary{cursor:pointer;color:#315efb;font-weight:700;width:max-content}
#adminUserMask .mg-user-tip p{margin:8px 0 0;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid var(--mg-line);line-height:1.7}
#adminUserMask .mg-user-card{padding:16px;border:1px solid var(--mg-line);border-radius:12px;background:#fff}
#adminUserMask .mg-user-card-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
#adminUserMask .mg-user-card-head h3{margin:0;font-size:15px;font-weight:800;color:var(--mg-text)}
#adminUserMask .mg-user-entry-row{display:flex;gap:10px}
#adminUserMask .mg-user-entry-row input{flex:1;min-width:0}
#adminUserMask .mg-user-entry-row button{flex:none}
#adminUserMask .mg-user-meta{display:flex;gap:6px 20px;flex-wrap:wrap;margin-top:10px;color:var(--mg-sub);font-size:12px;overflow-wrap:anywhere}
#adminUserMask .mg-user-note{margin:8px 0 0;font-size:12px;color:var(--mg-muted);line-height:1.7;overflow-wrap:anywhere}
#adminUserMask .mg-user-lead{margin:0 0 14px;padding:10px 12px;border-radius:10px;background:#eef3ff;color:#3b4a6b;font-size:12px;line-height:1.7}
#adminUserMask .mg-user-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
#adminUserMask .table-wrap{background:#fff}
#adminUserMask .table-wrap th{padding:10px 12px;font-size:12px}
#adminUserMask .table-wrap td{padding:10px 12px;font-size:13px}
#adminUserMask .mg-user-ellipsis{max-width:340px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#adminUserMask .mg-user-warn{color:#e11d48;font-weight:700}
#adminUserMask .mg-user-link{margin-bottom:14px;padding:16px;border:1px solid var(--mg-line);border-radius:12px;background:#fff}
#adminUserMask .mg-user-link-head{display:flex;justify-content:space-between;gap:12px;align-items:center}
#adminUserMask .mg-user-link-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;flex:1}
#adminUserMask .mg-user-link-title b{font-size:15px;color:var(--mg-text)}
#adminUserMask .mg-user-id{font-size:12px;color:var(--mg-muted)}
#adminUserMask .mg-user-link-ops{display:flex;gap:8px;flex:none}
#adminUserMask .mg-user-act{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 14px;border:1px solid #c9d6fe;border-radius:8px;background:#f3f6ff;color:#315efb;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:none;cursor:pointer;transition:background .15s,border-color .15s}
#adminUserMask .mg-user-act:hover{background:#e6edff;border-color:#9fb6fd}
#adminUserMask .mg-user-act.primary{border-color:#315efb;background:#315efb;color:#fff}
#adminUserMask .mg-user-act.primary:hover{background:#2449d8}
#adminUserMask .mg-user-act.danger{border-color:#fecdd3;background:#fff5f6;color:#e11d48}
#adminUserMask .mg-user-act.danger:hover{background:#ffe4e8}
#adminUserMask .mg-user-act.success{border-color:#a7f3d0;background:#f0fdf6;color:#059669}
#adminUserMask .mg-user-act.success:hover{background:#dcfce9}
#adminUserMask .mg-user-proxy-cta{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding:12px 14px;border:1px solid #c9d6fe;border-radius:12px;background:linear-gradient(90deg,#f3f6ff,#fff)}
#adminUserMask .mg-user-proxy-cta>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#adminUserMask .mg-user-proxy-cta b{font-size:14px;color:var(--mg-text)}
#adminUserMask .mg-user-proxy-cta span{font-size:12.5px;line-height:1.6;color:var(--mg-sub)}
#adminUserMask .mg-user-proxy-cta button{flex:none;min-height:36px;padding:0 16px;border:0;border-radius:8px;background:#315efb;color:#fff;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer}
#adminUserMask .mg-user-proxy-cta button:hover{background:#2449d8}
#adminUserMask .mg-user-link-sub{display:flex;align-items:center;gap:10px;margin:12px 0;padding:6px 6px 6px 12px;border-radius:8px;background:#f6f8fc;font-size:12px;color:var(--mg-sub)}
#adminUserMask .mg-user-link-sub em{flex:none;font-style:normal;font-weight:700;color:var(--mg-text)}
#adminUserMask .mg-user-link-sub .mg-user-ellipsis{max-width:none;flex:1;min-width:0;font-family:Consolas,monospace}
#adminUserMask .mg-user-link-sub .mg-user-act{min-height:28px;padding:0 14px;font-size:12px}
#adminUserMask .mg-user-btns{border-radius:10px}
#adminUserMask .mg-user-btns table{min-width:820px}
#adminUserMask .mg-user-btns td.mg-user-ellipsis{max-width:280px;font-size:12px;color:var(--mg-sub)}
#adminUserMask .mg-user-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:4px;background:#eef3ff;color:#315efb;font-size:11px;font-weight:700;vertical-align:1px}
#adminUserMask .mg-user-btns .badge.warn{margin-left:6px}
#adminUserMask .mg-user-price{white-space:nowrap}
#adminUserMask .mg-user-price b{color:#315efb;font-variant-numeric:tabular-nums}
#adminUserMask .mg-user-price small{display:block;font-size:11px;color:var(--mg-muted);cursor:help}
#adminUserMask .mg-user-text{white-space:nowrap}
#adminUserMask .mg-user-swatch{display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:3px;vertical-align:-1px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
#adminUserMask .mg-user-ro{font-size:12px;color:var(--mg-muted);cursor:help;border-bottom:1px dashed #cbd5e1}
#adminUserMask tr[hidden]{display:none}
#adminUserMask tr.mg-user-edit td{background:#f6f8fc}
#adminUserMask .mg-user-button{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(140px,1fr) 120px auto;gap:10px;align-items:end}
#adminUserMask .mg-user-button label{font-size:12px;color:var(--mg-sub)}
#adminUserMask .mg-user-button input{margin-top:4px;min-height:36px;padding:7px 10px;font-size:13px}
#adminUserMask .mg-user-edit-ops{display:flex;gap:8px}
#adminUserMask .mg-user-edit-ops button{min-height:36px;white-space:nowrap}
#adminUserMask .mg-user-entry-row button,#adminUserMask .mg-user-edit-ops button:not(.ghost){min-height:42px;padding:0 18px;border:0;border-radius:10px;background:#315efb;color:#fff;font-size:13px;font-weight:700;cursor:pointer;box-shadow:none}
#adminUserMask .mg-user-edit-ops button:not(.ghost){min-height:36px}
#adminUserMask .mg-user-entry-row button:hover,#adminUserMask .mg-user-edit-ops button:not(.ghost):hover{background:#2449d8}
#adminUserMask .mg-user-seg{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}
#adminUserMask .mg-user-seg button{min-height:34px;padding:0 14px;border:1px solid var(--mg-line);border-radius:8px;background:#fff;color:var(--mg-sub);font-size:13px;font-weight:700;box-shadow:none;cursor:pointer}
#adminUserMask .mg-user-seg button.on{border-color:#315efb;background:#315efb;color:#fff}
#adminUserMask .mg-user-seg .mg-user-refresh{margin-left:auto}
#adminUserMask .mg-user-records table{min-width:700px}

/* 售后查单：数字完整展示，筛选两行收纳，退款确认与原支付平台信息清晰区分。 */
#adminOrders .mg-admin-order-filters{grid-template-columns:repeat(6,minmax(0,1fr));align-items:end}
#adminOrders .mg-admin-order-filters>label{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0;color:#69758a;font-size:12px;font-weight:600}
#adminOrders .mg-admin-order-filters .mg-order-keyword{grid-column:span 2}
#adminOrders .mg-admin-order-filters label>input,#adminOrders .mg-admin-order-filters label>select{width:100%;min-width:0;height:42px;min-height:42px;margin:0;font-size:13px;box-sizing:border-box}
#adminOrders .mg-order-filter-actions{display:flex;align-items:center;gap:8px;grid-column:span 2;flex-wrap:nowrap;min-width:0}
#adminOrders .mg-order-filter-actions>button{flex:none;height:42px;min-height:42px;margin:0;padding:0 18px;box-shadow:none}
.mg-order-help{margin:10px 0 14px;color:#6b778c;font-size:12px;line-height:1.8}
#adminOrders .mg-support-order-table{min-width:1600px}
#adminOrders .mg-support-order-table th:first-child{width:420px}
#adminOrders .mg-support-order-table td:first-child{white-space:normal}
.mg-order-identity{min-width:220px;max-width:520px;display:grid;gap:6px}
.mg-order-number{display:grid;grid-template-columns:60px minmax(0,1fr) 64px;gap:8px;align-items:center;min-width:0}
.mg-order-number>small{grid-column:auto;color:#64748b;font-size:12px;line-height:1.5;white-space:nowrap}
.mg-order-number>b{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal;overflow:visible;text-overflow:clip;color:#27364e;font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-variant-numeric:tabular-nums;user-select:text}
.mg-order-number>button.op-btn{display:inline-flex;align-items:center;justify-content:center;width:64px;min-width:64px;height:32px;min-height:32px;padding:0 8px;margin:0;font-size:13px;white-space:nowrap;box-sizing:border-box}
#adminOrders .mg-order-ops{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;width:max-content}
#adminOrders .mg-order-ops>button.op-btn{flex:none;width:auto;height:34px;min-height:34px;margin:0;white-space:nowrap;box-sizing:border-box}
#orderDetailMask .mg-order-detail-dialog{width:min(760px,96vw)}
#orderDetailMask .mg-order-identity{max-width:520px;margin:14px 0;padding:14px;border:1px solid #e3eaf7;border-radius:12px;background:#f8faff}
.mg-order-detail-status{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mg-order-detail-status strong{font-size:24px;color:#27364e;font-variant-numeric:tabular-nums}
.mg-order-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.mg-order-detail-grid>div{min-width:0;display:flex;flex-direction:column;gap:5px}
.mg-order-detail-grid span{font-size:12px;color:#7b879b}
.mg-order-detail-grid b{font-size:13px;color:#27364e;overflow-wrap:anywhere;white-space:normal;user-select:text}
#refundMask .refund-order-card b{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip;font-size:13px}
#refundMask .refund-alert{font-size:12px;align-items:flex-start}
#refundMask .mg-refund-confirm{display:flex;align-items:flex-start;gap:10px;margin:8px 0;font-size:13px;line-height:1.6;color:#34415b;cursor:pointer}
#refundMask .mg-refund-confirm>input{flex:none;appearance:auto;-webkit-appearance:checkbox;width:18px!important;height:18px!important;min-width:18px;min-height:18px;margin:2px 0 0!important;padding:0;accent-color:#315efb}
@media(max-width:1100px){#adminOrders .mg-admin-order-filters{grid-template-columns:repeat(3,minmax(0,1fr))}#adminOrders .mg-order-filter-actions{grid-column:1/-1}}
@media(max-width:640px){#adminOrders .mg-admin-order-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#adminOrders .mg-order-filter-actions>button{flex:1;padding:0 10px}#orderDetailMask .mg-order-detail-dialog{width:100%}.mg-order-detail-grid{grid-template-columns:1fr}#orderDetailMask .editor-foot>button{width:100%}.mg-order-identity{min-width:0}}

/* 退款详情直接阅读长图，按需放大查看，不影响提现收款码。 */
#refundDetailMask .refund-detail-dialog{width:min(960px,96vw);max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
#refundDetailMask .share-head{flex:none}
#refundDetailMask #refundDetailBody{min-height:0;overflow:auto;padding:20px 24px 24px;font-size:14px}
#refundDetailMask .refund-detail-status{gap:14px;padding:16px 18px}
#refundDetailMask .refund-detail-status>div{min-width:0}
#refundDetailMask .refund-detail-status b{font-size:16px;line-height:1.5}
#refundDetailMask .refund-detail-status span{font-size:12px;line-height:1.6}
#refundDetailMask .refund-detail-status strong{font-size:24px;white-space:nowrap;font-variant-numeric:tabular-nums}
#refundDetailMask .refund-detail-grid>div{gap:6px;padding:13px 16px}
#refundDetailMask .refund-detail-grid span{font-size:12px;line-height:1.5;color:#708096}
#refundDetailMask .refund-detail-grid b{font-size:14px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;user-select:text}
#refundDetailMask .refund-detail-grid small{font-size:12px;line-height:1.5;color:#7c899c}
#refundDetailMask .mg-refund-detail-number{display:flex;align-items:flex-start;gap:10px;min-width:0}
#refundDetailMask .mg-refund-detail-number b{min-width:0;flex:1;font:13px/1.7 Consolas,monospace}
#refundDetailMask .mg-refund-detail-number .op-btn{flex:none;min-height:30px;height:30px;margin:0;padding:0 10px;font-size:12px}
#refundDetailMask .refund-detail-note{padding:15px 16px}
#refundDetailMask .refund-detail-note>b,#refundDetailMask .refund-detail-title b{font-size:14px}
#refundDetailMask .refund-detail-note p{font-size:14px;line-height:1.8;overflow-wrap:anywhere;color:#526278}
#refundDetailMask .refund-detail-title{align-items:center;margin-top:18px}
#refundDetailMask .refund-detail-title span{font-size:12px}
#refundDetailMask .mg-refund-gallery{margin-top:10px;border:1px solid #dfe6f2;border-radius:12px;overflow:hidden;background:#f6f8fc}
#refundDetailMask .mg-refund-gallery-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #e3e9f3;background:#fff}
#refundDetailMask .mg-refund-gallery-bar>b{font-size:13px;color:#3c4d67;white-space:nowrap}
#refundDetailMask .mg-refund-gallery-bar>div{display:flex;gap:6px;flex-wrap:wrap}
#refundDetailMask .mg-refund-gallery-bar .op-btn{margin:0;min-height:34px;height:34px;padding:0 12px;font-size:13px}
#refundDetailMask .mg-refund-gallery-stage{display:block;width:100%;height:360px;min-height:0;margin:0;padding:14px;overflow:auto;overscroll-behavior:contain;border:0;border-radius:0;background:#eef2f8;box-shadow:none;box-sizing:border-box;text-align:center}
#refundDetailMask .mg-refund-gallery-stage:focus-visible{outline:2px solid #7892dc;outline-offset:-2px}
#refundDetailMask #refundGalleryImage{display:block;width:auto;height:auto;min-height:0;max-width:min(100%,420px);max-height:none;margin:0 auto;object-fit:contain;border-radius:4px}
#refundDetailMask #refundGalleryStatus{display:block;margin:40px 0 12px;font-size:14px;line-height:1.7;color:#697991;text-align:center}
#refundDetailMask .mg-refund-gallery-thumbs{display:flex;gap:10px;overflow-x:auto;padding:12px 14px;background:#fff}
#refundDetailMask .mg-refund-gallery-thumbs>button{flex:none;display:flex;flex-direction:column;align-items:center;gap:5px;width:96px;min-height:98px;margin:0;padding:7px;border:2px solid #e4eaf4;border-radius:9px;background:#f8faff;box-shadow:none;cursor:pointer}
#refundDetailMask .mg-refund-gallery-thumbs>button.on{border-color:#315efb;background:#eef3ff}
#refundDetailMask .mg-refund-gallery-thumbs img{display:block;width:76px;height:62px;object-fit:contain;border-radius:3px}
#refundDetailMask .mg-refund-gallery-thumbs span{font-size:12px;line-height:1.5;color:#315efb}
#refundDetailMask .mg-refund-gallery-tip{margin:0;padding:0 14px 12px;background:#fff;font-size:12px;line-height:1.6;color:#7a889c}
#refundDetailMask .refund-history-empty{font-size:14px;line-height:1.7}
#refundDetailMask .mg-refund-gallery button:disabled,#refundProofMask button:disabled{opacity:.45;cursor:not-allowed}
#refundProofMask{padding:24px;align-items:center;background:rgba(15,23,42,.55)}
#refundProofMask .mg-refund-proof-dialog{display:flex;flex-direction:column;width:min(920px,100%);max-width:920px;height:min(760px,calc(100vh - 64px));height:min(760px,calc(100dvh - 64px));max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:0;border-radius:16px;overflow:hidden;animation:none}
#refundProofMask .share-head{flex:none;position:relative;padding:14px 20px}
#refundDetailMask .mg-proof-close,#refundProofMask .mg-proof-close{display:inline-flex;align-items:center;justify-content:center;flex:none;width:auto;min-width:88px;height:40px;margin:0;padding:0 14px;border:1px solid #b9c9e7;border-radius:8px;background:#eef3ff;color:#2449ae;font-size:14px;font-weight:700;line-height:1.5;white-space:nowrap;cursor:pointer;box-sizing:border-box}
#refundDetailMask .mg-proof-close:hover,#refundProofMask .mg-proof-close:hover{background:#dfe9ff;border-color:#7892dc;transform:none}
#refundDetailMask .mg-proof-close:focus-visible,#refundProofMask .mg-proof-close:focus-visible{outline:2px solid #7892dc;outline-offset:2px}
#refundProofMask .mg-refund-proof-toolbar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px;border-bottom:1px solid #dfe6f2;background:#fff;flex-wrap:wrap}
#refundProofMask .mg-refund-proof-switch,#refundProofMask .mg-refund-proof-zoom{display:flex;align-items:center;gap:8px}
#refundProofMask .op-btn{margin:0;height:40px;min-height:40px;padding:0 14px;font-size:14px;border-radius:8px;box-shadow:none}
#refundProofMask #refundProofZoomIn,#refundProofMask #refundProofZoomOut{width:42px;padding:0;font-size:20px}
#refundProofMask #refundProofViewCount,#refundProofMask #refundProofScale{min-width:50px;color:#53647c;font-size:13px;text-align:center;font-variant-numeric:tabular-nums}
#refundProofMask #refundProofStage{position:relative;flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:none;cursor:grab;background:#eaf0f7;scroll-behavior:auto}
#refundProofMask #refundProofStage.is-dragging{cursor:grabbing}
#refundProofMask #refundProofCanvas{position:relative;min-width:100%;min-height:100%;width:100%;height:100%}
#refundProofMask #refundProofImage{position:absolute;display:block;margin:0;padding:0;max-width:none!important;max-height:none!important;min-width:0;min-height:0;object-fit:contain;border:0;border-radius:0;box-shadow:0 6px 24px rgba(29,47,77,.12);user-select:none;-webkit-user-drag:none}
#refundProofMask #refundProofStatus{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:20px;color:#64748b;font-size:14px;line-height:1.7;text-align:center;cursor:default}
#refundProofMask .mg-refund-proof-help{flex:none;display:flex;justify-content:space-between;gap:10px;padding:10px 20px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #dfe6f2;background:#fff;color:#718098;font-size:12px;line-height:1.6}
#refundProofMask [hidden],#refundDetailMask .mg-refund-gallery [hidden]{display:none!important}
@media(max-width:640px){#refundDetailMask .refund-detail-dialog{width:100%;max-height:94vh}#refundDetailMask #refundDetailBody{padding:16px 14px calc(18px + env(safe-area-inset-bottom))}#refundDetailMask .refund-detail-grid{grid-template-columns:1fr}#refundDetailMask .mg-refund-gallery-stage{height:300px;padding:12px}#refundDetailMask .mg-refund-gallery-bar{align-items:flex-start;flex-wrap:wrap}#refundDetailMask .mg-refund-gallery-bar .op-btn{min-height:40px;height:40px}#refundProofMask{padding:12px}#refundProofMask .mg-refund-proof-dialog{height:calc(100vh - 24px);height:calc(100dvh - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}#refundProofMask .share-head{padding:12px 14px}#refundProofMask .mg-refund-proof-toolbar{padding:10px 12px;gap:8px}#refundProofMask .mg-refund-proof-switch{width:100%;justify-content:center}#refundProofMask .mg-refund-proof-zoom{width:100%;justify-content:center;gap:5px;flex-wrap:wrap}#refundProofMask .op-btn{height:42px;min-height:42px;padding:0 10px;font-size:13px}#refundProofMask .mg-refund-proof-help{padding-left:12px;padding-right:12px;font-size:12px}#refundProofMask .mg-refund-proof-help>span{display:none}}

/* 订单领取资格：付款状态与领取状态分开展示，批量确认前保持明确边界。 */
.mg-access-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;margin:16px 0;border:1px solid #dce6f4;border-radius:12px;background:#f5f9ff}
.mg-access-tools>div{flex:1;min-width:220px}.mg-access-tools small,.mg-access-state small{display:block;margin-top:4px;color:#728098;line-height:1.6}
.mg-access-tools>span{color:#53647c;font-size:13px}.mg-access-check{display:flex;align-items:center;gap:8px;margin:0;font-weight:inherit}
.mg-access-check input,.mg-access-row-check,.mg-access-confirm input{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;padding:0;vertical-align:middle;accent-color:#3175e8;cursor:pointer}
.mg-access-row-check{float:left;margin:6px 10px 0 0}.mg-access-state{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.mg-access-state .badge{font-size:12px;padding:4px 10px}.mg-access-state small{margin-top:0;color:#94a3b8;font-size:11px;line-height:1.5}.mg-access-state.revoked .badge{background:#fff7ed;color:#ea580c}
#accessClearMask .mg-access-modal{width:min(960px,96vw);max-width:100%;box-sizing:border-box;max-height:92vh;max-height:92dvh;overflow:auto;background:white;border-radius:16px;padding:24px;box-shadow:0 18px 60px #142b4d33}
#accessClearMask .modal-head,#accessClearMask .modal-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}#accessClearMask .modal-head h2{margin:0;font-size:20px}#accessClearMask .modal-foot{justify-content:flex-end;margin-top:20px}
.mg-access-tools button,#accessClearMask .modal-foot button{min-height:42px;padding:10px 16px;border:1px solid #dce6f4;border-radius:10px;background:#fff;color:#315cb8;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer}
.mg-access-tools button.danger,#accessClearMask .modal-foot button.danger{background:#dc2626;border-color:#dc2626;color:#fff}
/* ylb.css 的 #right .danger{color:var(--ylb-danger)} 会把这个红底按钮刷成红底红字（文字看不见）；
   getNavList.js 把 ylb.css 挪到 head 末尾，同优先级时它后生效，所以这里带 #right 提权压回白字 */
#right .mg-access-tools button.danger{color:#fff}
.mg-access-tools button:hover:not(:disabled),#accessClearMask .modal-foot button:hover:not(:disabled){filter:brightness(.96)}
#accessClearMask button:disabled{opacity:.5;cursor:not-allowed}#accessClearMask button:focus-visible{outline:3px solid #93b5fb;outline-offset:3px}
/* 未勾选确认时的「确认清除」按钮原来是 opacity:.5 的红底白字，渲染出来是粉底近白字看不清，
   改成中性灰底深灰字，明确表达「先勾选确认才能点」，勾选后再变回红底白字 */
#accessClearMask .modal-foot button.danger:disabled{background:#f1f5f9;border-color:#e2e8f0;color:#5a6676;opacity:1}
#accessClearMask .modal-head>button{width:40px;height:40px;min-height:40px;flex:none;border:0;border-radius:10px;background:#f1f5f9;color:#475569;font-size:24px;cursor:pointer}
#accessClearMask .filters select,#accessClearMask .filters input{width:100%;min-width:0}
.mg-access-warning{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;border-radius:10px;padding:14px;margin:16px 0;font-size:14px;line-height:1.8}
#accessClearMask .filters{margin:16px 0}#accessClearMask .filters label{flex:1;min-width:200px}#accessCustomRange{width:100%;display:flex;gap:12px;flex-wrap:wrap}#accessCustomRange label{flex:1}
.mg-access-summary{padding:16px;background:#eef6ff;border-radius:10px;margin:16px 0;line-height:1.8}.mg-access-summary>b{font-size:20px;color:#245baa}.mg-access-summary p{margin:6px 0}.mg-access-summary small{color:#61728b}
/* 待清除订单预览表：原来 td:first-child 是 word-break:break-all + min-width:180px，40 位订单号必然被折成两行没法核对，
   改成等宽字体单行显示，其余列也不折行，表格最小宽按实际列宽调到 860px（弹窗内容区 912px，桌面不会出横向滚动） */
.mg-access-preview-table{max-height:360px;overflow:auto}.mg-access-preview-table table{min-width:860px}
.mg-access-preview-table th,.mg-access-preview-table td{white-space:nowrap}
.mg-access-preview-table td:first-child{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#1f2937}
#accessClearMask .mg-access-confirm{display:flex;align-items:flex-start;gap:10px;margin:18px 0;line-height:1.8;font-size:14px}#accessClearMask .mg-access-confirm input{margin-top:4px}
#accessClearMask [hidden],#records [hidden]{display:none!important}
@media(max-width:640px){#accessClearMask .mg-access-modal{padding:16px;border-radius:12px}.mg-access-tools{gap:8px}.mg-access-tools>div{flex-basis:100%}#accessClearMask .modal-foot button{flex:1;min-height:44px}#accessClearMask .filters label{min-width:100%}}
@media(max-width:900px){#adminUserMask .mg-user-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}#adminUserMask .mg-user-button{grid-template-columns:1fr 1fr}}
@media(max-width:760px){#adminUserMask .mg-user-dialog .editor-body{padding:0 12px 12px}#adminUserMask .mg-user-tabs{margin:0 -12px 14px;padding:0 12px}#adminUserMask .mg-user-tabs button{padding:0 10px;font-size:13px}#adminUserMask .mg-user-kpi b{font-size:18px}#adminUserMask .mg-user-entry-row{flex-direction:column}#adminUserMask .mg-user-button{grid-template-columns:1fr}#adminUserMask .mg-user-link-head{flex-direction:column;align-items:stretch}#adminUserMask .mg-user-link-ops>.mg-user-act{flex:1}}

/* 紧凑运营后台：仅此页面启用，兼容公共 ylb.css 后置加载及 app 外的弹窗。 */
body.mg-console{font-size:14px;line-height:1.6;--mg-muted:#64748b}
.mg-console #right{min-width:0;font-size:14px}
.mg-console #right .panel{border-color:#e4e9f2;box-shadow:0 3px 14px rgba(15,23,42,.035);border-radius:14px;padding:20px}
.mg-console #right .panel-head{margin-bottom:16px}
.mg-console #right .panel-head p{font-size:12px;line-height:1.7}
.mg-console #right label{font-size:14px}
.mg-console #right .filters{align-items:center;border:0;padding:10px 12px;gap:8px;border-radius:10px}
/* 订单筛选带字段标题，按钮按输入框底边对齐，避免通用居中规则把按钮抬高。 */
.mg-console #right #adminOrders .mg-admin-order-filters{align-items:end}
.mg-console #right #adminOrders .mg-order-filter-actions{align-self:end}
/* 管理员极窄屏：操作按钮自然换行，资格说明不再受固定最小宽度撑开。 */
@media(max-width:640px){.mg-console #right #adminOrders .mg-order-filter-actions{flex-wrap:wrap}.mg-console #right #adminOrders .mg-access-tools>div{min-width:0;flex-basis:100%}}
.mg-console #right .filters input,.mg-console #right .filters select,.mg-console #right .finance-config input,.mg-console #right .finance-config select,.mg-console #right .payment-panel input:not([type=checkbox]):not([type=color]),.mg-console #right .payment-panel select{height:38px;min-height:38px;font-size:14px;line-height:1.5;padding:7px 10px;margin-bottom:0;box-shadow:none}
.mg-console #right .filters input::placeholder{font-size:14px;color:#7b879b}
.mg-console #right .filters input:focus,.mg-console #right .filters select:focus,.mg-console #right .finance-config input:focus,.mg-console #right .payment-panel input:focus{outline:0;border-color:#7892dc;box-shadow:0 0 0 3px rgba(49,87,213,.12)}
.mg-console #right .filters button,.mg-console #right .panel-head .mg-head-actions button,.mg-console #right .panel-head>button,.mg-console #right .payment-save button,.mg-console #right .finance-config button{flex:none;width:auto;min-height:38px;height:38px;padding:0 16px;margin:0;border:1px solid #3157d5;border-radius:8px;background:#3157d5;color:#fff;font-size:14px;line-height:1.5;white-space:nowrap;box-shadow:none;box-sizing:border-box}
.mg-console #right .filters button.ghost,.mg-console #right .panel-head button.ghost,.mg-console #right .payment-save button.ghost{background:#fff;color:#3157d5;border-color:#d5dfee}
.mg-console #right .filters button.danger{background:#fff;color:#c42b45;border-color:#efbac4}
.mg-console #right .table-wrap{max-width:100%;overflow-x:auto;border-color:#e7ecf4;border-radius:10px;overscroll-behavior-x:contain}
.mg-console #right .table-wrap table{font-size:14px}
.mg-console #right .table-wrap th{font-size:13px;padding:12px 14px;line-height:1.5}
.mg-console #right .table-wrap td{font-size:14px;padding:14px;line-height:1.6}
.mg-console #right .table-wrap td b{font-size:14px}
.mg-console #right .table-wrap .mg-muted,.mg-console #right .mg-cell-sub,.mg-console .mask .mg-cell-sub{font-size:12px;color:#64748b;line-height:1.6}
.mg-console #right .mg-cell-sub{display:block;margin-top:4px}
.mg-console #right .table-wrap .badge{font-size:12px;padding:4px 10px}
.mg-console #right .table-wrap .op-row,.mg-console #right .table-wrap .mg-order-ops{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;width:max-content}
.mg-console #right .table-wrap .op-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:0;min-height:32px;height:32px;padding:0 12px;margin:0;border:1px solid #d5dfee;border-radius:7px;background:#fff;color:#3157d5;font-size:13px;line-height:1.5;white-space:nowrap;box-shadow:none;box-sizing:border-box}
.mg-console #right .table-wrap .op-btn.primary{background:#3157d5;border-color:#3157d5;color:#fff}
.mg-console #right .table-wrap .op-btn.danger{background:#fff;border-color:#efbac4;color:#c42b45}
.mg-console #right .table-wrap .op-btn:hover:not(:disabled){background:#f1f5ff;transform:none}
.mg-console #right .table-wrap .op-btn.primary:hover:not(:disabled){background:#294bbb}
.mg-console #right .table-wrap .op-btn.danger:hover:not(:disabled){background:#fff1f3}
.mg-console #right .mg-pager{flex-wrap:wrap}
.mg-console #right .mg-pager button{flex:0 0 auto;white-space:nowrap;min-height:32px;font-size:13px;line-height:1.5}
.mg-console #right .mg-pager>span{font-size:12px;line-height:1.6}
.mg-console #right button:focus-visible,.mg-console .mask button:focus-visible,.mg-console .mg-more-menu button:focus-visible{outline:2px solid #7892dc;outline-offset:2px}
.mg-console .editor-foot{justify-content:space-between}
.mg-console .mask .editor-foot button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;height:38px;padding:0 16px;font-size:14px;line-height:1.5;box-sizing:border-box;white-space:nowrap}
.mg-console .mask .editor-foot button:not(.ghost):not(.danger){background:#3157d5;color:#fff;border:1px solid #3157d5;box-shadow:none}
.mg-console .mask .editor-foot button.ghost{background:#fff;color:#3157d5;border:1px solid #d5dfee;box-shadow:none}
.mg-console .editor-foot .foot-actions button.danger,.mg-console .editor-foot button.danger,.mg-console #right .editor-foot button.danger{background:#fff;border:1px solid #efbac4;color:#c42b45;box-shadow:none}
.mg-console #orderDetailMask .editor-dialog>.editor-foot{margin:0;padding:14px 20px;border-top:1px solid #e7ecf4;gap:10px}
.mg-console #orderDetailMask .foot-actions{gap:8px}
.mg-console #right .badge+.mg-access-state{margin-top:8px}
.mg-console #right .mg-access-state small{font-size:12px;color:#64748b}

/* 投诉内容优先；中性设置区内保留独立的微信通知状态。 */
.mg-console #right .mg-cp-notify{display:block;padding:14px;background:#f8fafc;border:1px solid #e7ecf4;color:#334155}
.mg-console #right .mg-cp-notify[hidden]{display:none}
.mg-console #right .mg-cp-settings-title{margin:0 0 10px;font-size:14px;font-weight:700}
.mg-console #right .mg-cp-sets{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.mg-console #right .mg-cp-notify .mg-cp-set{padding:8px 0;border:0;background:transparent}
.mg-console #right .mg-cp-set b{font-size:14px}
.mg-console #right .mg-cp-set em{color:#64748b;font-size:12px;line-height:1.6}
.mg-console #right .mg-cp-notify-tx{display:block;margin-top:8px;font-size:12px;line-height:1.7;color:#64748b}
.mg-console #right .mg-cp-notify.ok .mg-cp-notify-tx{color:#16754b}
.mg-console #right .mg-cp-notify.warn .mg-cp-notify-tx{color:#97520a}
.mg-console #right .mg-cp-table{min-width:1200px}
.mg-console #right .mg-cp-main{min-width:260px;max-width:380px}
.mg-console #right .mg-cp-main>p{font-size:14px;line-height:1.75;word-break:normal;overflow-wrap:anywhere}
.mg-console #right .mg-cp-cat{background:#f1f5f9;color:#475569;font-weight:600}
.mg-console #right .mg-cp-main .mg-cp-reply{margin:10px 0 0;padding:8px 10px;border-left:3px solid #a6c8f5;border-radius:0 7px 7px 0;background:#f0f7ff;color:#365e91;font-size:12px}
.mg-console #right .mg-cp-reply p{margin:5px 0 0;font-size:14px;line-height:1.7;color:#365e91;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
.mg-console #right .mg-cp-reply summary{cursor:pointer;font-weight:700}
.mg-console #right .mg-cp-reply summary span{margin-left:10px;font-size:12px;font-weight:400}
.mg-console #right .mg-cp-table th:last-child,.mg-console #right .mg-cp-table td:last-child{width:1%;white-space:nowrap}
/* 原因小标签、举报标红、请平台介入记录、平台回复（红色左线，和商家回复区分） */
.mg-cp-reason{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:12px;font-weight:600}
.mg-cp-cat.is-report,.mg-console #right .mg-cp-cat.is-report{background:#fef2f2;color:#dc2626}
.mg-cp-esc{margin:8px 0 0;padding:6px 9px;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:12px;line-height:1.6}
.mg-cp-main .mg-cp-reply.is-pf,.mg-console #right .mg-cp-main .mg-cp-reply.is-pf,.mg-cp-detail .mg-cp-reply.is-pf{border-left-color:#f3a3a3;background:#fff5f5;color:#9f2d2d}
.mg-console #right .mg-cp-reply.is-pf p{color:#9f2d2d}
.mg-cp-detail .mg-cp-reply{margin:0 0 10px;padding:8px 10px;border-left:3px solid #a6c8f5;border-radius:0 7px 7px 0;background:#f0f7ff;color:#365e91;font-size:12px}
.mg-cp-detail .mg-cp-esc{margin:0 0 10px}

/* 完整入口链接与批量选择，不截断协议、端口或路径。 */
.mg-console #right .mg-entry-filters input{flex:0 1 300px;width:300px;min-width:180px}
.mg-console #right .mg-entry-batch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.mg-console #right .mg-entry-batch>span{font-size:12px;color:#64748b;white-space:nowrap}
.mg-console #entries table{min-width:1000px;table-layout:fixed}
.mg-console #entries th.sel{width:48px}
.mg-console #entries th:nth-child(2){width:160px}
.mg-console #entries th:nth-child(4){width:100px}
.mg-console #entries th:nth-child(5){width:150px}
.mg-console #entries th:last-child{width:186px}
.mg-console #right .mg-entry-url{display:flex;align-items:flex-start;gap:10px;min-width:0}
.mg-console #right .mg-entry-url .mg-domain{flex:1;min-width:0;font:14px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.mg-console #right .mg-entry-url .op-btn{flex:none}

/* 用户资金保持原有口径，固定身份与操作列方便横向核对。 */
.mg-console #right .mg-admin-users-table{min-width:1380px;border-collapse:separate;border-spacing:0}
.mg-console #right .mg-admin-users-table .mg-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.mg-console #right .mg-admin-users-table td.mg-num{font-weight:700}
.mg-console #right .mg-admin-users-table td.mg-num.zero{color:#64748b;font-weight:500}
.mg-console #right .mg-admin-users-table th:first-child,.mg-console #right .mg-admin-users-table td:first-child{position:sticky;left:0;z-index:2;min-width:160px;max-width:200px;box-shadow:2px 0 0 #e7ecf4}
.mg-console #right .mg-admin-users-table th:last-child,.mg-console #right .mg-admin-users-table td:last-child{position:sticky;right:0;z-index:2;width:1%;min-width:260px;box-shadow:-2px 0 0 #e7ecf4}
.mg-console #right .mg-admin-users-table td:first-child,.mg-console #right .mg-admin-users-table td:last-child{background:#fff}
.mg-console #right .mg-admin-users-table tr:hover td:first-child,.mg-console #right .mg-admin-users-table tr:hover td:last-child{background:#f8faff}
.mg-console #right .mg-admin-users-table .mg-user-entry{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;min-width:200px}
.mg-console #adminUserMask .mg-user-kpi.zero b{color:#64748b}

/* 结算表单按业务分组；收起只改变可见性，不清除随机金额存量值。 */
.mg-console #right .mg-finance-config{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;max-width:none;gap:18px}
.mg-console #right .mg-finance-group{display:grid;gap:12px;min-width:0;padding-right:18px;border-right:1px solid #e7ecf4}
.mg-console #right .mg-finance-group:nth-child(3){border-right:0;padding-right:0}
.mg-console #right .mg-finance-group h3{margin:0;font-size:14px;font-weight:700;color:#3157d5}
.mg-console #right .mg-finance-group label{gap:6px;font-weight:600}
.mg-console #right .mg-rand-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mg-console #right .mg-rand-fields[hidden]{display:none}
.mg-console #right .mg-rand-example{margin:0;font-size:12px;line-height:1.7;color:#64748b}
.mg-console #right .mg-rand-example.warn{color:#b45309}
.mg-console #right .finance-config-action{grid-column:1/-1;height:auto;justify-content:flex-end}
.mg-console #right .finance-config-tip{color:#64748b;font-size:12px}

/* 两种支付方式独立高度，公共配置不再制造大块占位。 */
.mg-console #right .pay-channels{align-items:start}
.mg-console #right .pay-ch-note{flex:none;min-height:0;display:block;padding:0;border:0;background:transparent;text-align:left;font-size:12px;overflow-wrap:anywhere}
.mg-console #right .pay-ch-body[hidden],.mg-console #right .pay-ch-note[hidden]{display:none}
.mg-console #right .pay-ch-sum{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.mg-console #right .pay-ch.off .pay-ch-note,.mg-console #right .pay-ch.off .pay-ch-body,.mg-console #right .pay-ch.off .pay-ch-mode{opacity:1}
.mg-console #right .pay-foot{align-items:flex-start}
.mg-console #right .pay-foot-opts{gap:14px}
.mg-console #right .pay-foot>span{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.mg-console #right .pay-color{height:38px}

/* 模板名称、价格、可见与编辑权限分层；低频操作继续使用原有更多菜单。 */
.mg-console #templates table{min-width:1100px}
.mg-console #right .mg-tpl-name{min-width:180px}
.mg-console #right .mg-tpl-name>b{display:block;font-size:15px}
.mg-console #right .mg-tpl-payment{display:grid;gap:3px;min-width:140px;margin-bottom:10px}
.mg-console #right .mg-tpl-payment:last-child{margin-bottom:0}
.mg-console #right .mg-tpl-payment strong{color:#3157d5;font-size:16px;font-variant-numeric:tabular-nums}
.mg-console #right .mg-tpl-payment .badge{width:fit-content}
/* 模板列表「可见范围」「编辑权限」：各一列一个标签，标签可点，直接打开对应授权弹窗 */
.mg-console #right .mg-tpl-permcell{white-space:nowrap}
.mg-console #right .mg-tpl-permcell .badge{line-height:1.4}
.mg-console #right .mg-tpl-perm{border:0;margin:0;font-family:inherit;line-height:1.4;cursor:pointer;transition:filter .15s,box-shadow .15s}
.mg-console #right .mg-tpl-perm:hover{filter:brightness(.96);box-shadow:inset 0 0 0 1px currentColor}
.mg-console #right .mg-tpl-perm.off:hover{color:#3157d5;background:#f1f5ff;filter:none}
.mg-console #templates #adminTplList>tr>td:first-child{white-space:nowrap}
.mg-console .mg-tpl-menu button{font-size:13px;min-height:32px}

/* 代理工作台：角色作用域内收敛入口、空白和财务排版，管理员保持原样。 */
.mg-user-console #right #stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.mg-user-console #right #stats .stat{display:flex;gap:14px;padding:20px 18px;min-height:88px;align-items:center;border-radius:13px;position:relative;transition:border-color .18s,box-shadow .18s}
.mg-user-console #right #stats .stat:hover{border-color:#c9d6f5;box-shadow:0 10px 24px -12px rgba(49,94,251,.35)}
.mg-user-console #right #stats .stat::after{display:none}
.mg-user-console #right #stats .stat .ic{width:54px;height:54px;border-radius:15px;background:linear-gradient(135deg,#e8eeff,#dbe6ff);color:#315efb}
.mg-user-console #right #stats .stat .ic2{background:linear-gradient(135deg,#e4f6ee,#d5f0e2);color:#0a9e63}
.mg-user-console #right #stats .stat .ic3{background:linear-gradient(135deg,#fff2e4,#ffe7cf);color:#d97a0a}
.mg-user-console #right #stats .stat .ic4{background:linear-gradient(135deg,#e5f5ff,#d4ecff);color:#0f8ed9}
.mg-user-console #right #stats .stat .ic5{background:linear-gradient(135deg,#efe9ff,#e3d9ff);color:#7c5cf0}
.mg-user-console #right #stats .stat .ic svg{width:26px;height:26px}
.mg-user-console #right #stats .stat .tx{flex:1;min-width:0}
.mg-user-console #right #stats .stat .tx span{margin-bottom:4px;font-size:13px;line-height:1.5;color:#7b8799}
.mg-user-console #right #stats .stat .tx b{display:block;font-size:28px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.mg-user-console #right #stats .stat .tx small{display:block;margin-top:6px;font-size:12px;color:#94a3b8;line-height:1.5}
.mg-user-console #right #stats .stat .tx small i{font-style:normal;margin:0 2px;color:#475569;font-weight:700}
.mg-user-console #right #stats .stat .lk{display:none}
.mg-user-console #right #stats .stat .go{position:absolute;right:10px;top:10px;display:inline-flex;align-items:center;gap:2px;min-height:44px;padding:0 10px 0 12px;border:0;border-radius:10px;background:transparent;color:#315efb;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.mg-user-console #right #stats .stat .go svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
.mg-user-console #right #stats .stat:hover .go{background:#eef3ff}.mg-user-console #right #stats .stat:hover .go svg{transform:translateX(2px)}
.mg-user-console #right #stats .stat.mg-stat-paid{border-color:#bfe9d4;background:linear-gradient(135deg,#f3fcf7,#fff 60%)}
.mg-user-console #right #stats .stat.mg-stat-paid .tx b{color:#0a7d50}
.mg-user-console #right #stats .stat.mg-stat-paid .tx span{color:#0a7d50;font-weight:700}
.mg-user-console #right #stats .stat.mg-stat-unpaid .tx b{color:#94a3b8}
.mg-user-console #right #stats .stat.mg-stat-income .tx b{color:#3157d5}
.mg-metric-scope{display:none}
.mg-user-console #right:has(#overview.active) .mg-metric-scope{display:block;position:relative;min-width:0;color:#526177;font-size:12px}
.mg-user-console #right .mg-metric-scope>summary{padding:7px 10px;border-radius:8px;cursor:pointer;white-space:nowrap}
.mg-user-console #right .mg-metric-scope>summary:hover,.mg-user-console #right .mg-metric-scope[open]>summary{background:#f3f6ff;color:#315efb}
.mg-user-console #right .mg-metric-scope>summary:focus-visible{outline:2px solid #315efb;outline-offset:2px}
.mg-user-console #right .mg-metric-scope>ul{position:absolute;right:0;top:calc(100% + 8px);z-index:50;width:360px;max-width:calc(100vw - 48px);margin:0;padding:14px 16px;border:1px solid #dce3f0;border-radius:10px;background:#fff;box-shadow:0 12px 30px rgba(31,47,77,.12);list-style:none;box-sizing:border-box}
.mg-user-console #right .mg-metric-scope li{font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.mg-user-console #right .mg-metric-scope li+li{margin-top:8px}
.mg-user-console #right .mg-metric-scope li b{color:#334155}
@media(max-width:1100px){.mg-user-console #right .mg-metric-scope{flex-basis:100%;width:100%}.mg-user-console #right .mg-metric-scope>ul{position:static;width:100%;max-width:100%;margin-top:8px;box-shadow:none}}
@media(min-width:1801px) and (max-width:2000px){.mg-user-console #right #stats .stat{gap:8px;padding:16px 12px}}
@media(max-width:1500px){.mg-user-console #right #stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.mg-user-console #right #stats{grid-template-columns:1fr 1fr}.mg-user-console #right #stats .stat .go{position:static;align-self:stretch;justify-content:center;margin-top:2px;background:#f5f8ff}.mg-user-console #right #stats .stat.mg-stat-paid .go{background:#e9f8f0;color:#0a7d50}.mg-user-console #right #stats .stat .tx b{font-size:21px}.mg-user-console #right #stats .stat{flex-direction:column;align-items:flex-start}}
.mg-user-console #right #overview .mg-overview-top{grid-template-columns:minmax(280px,320px) minmax(380px,1fr) minmax(360px,430px);align-items:stretch;gap:10px}
.mg-user-console #right #overview .mg-overview-top>.panel{padding:0;overflow:hidden}
.mg-user-console #right #overview .mg-overview-top>.panel>.panel-head{padding:16px 16px 0;align-items:center;gap:8px}
.mg-user-console #right #overview .mg-overview-top .panel-head h2{font-size:17px}
.mg-user-console #right #overview .mg-preview-panel .mg-pv-body{padding:4px 16px 14px;gap:8px}
.mg-user-console #right #overview .mg-pv-phone .phone{width:100%;max-width:310px;box-shadow:0 14px 32px rgba(24,36,60,.2)}
.mg-user-console #right #overview .mg-pv-phone .phone-screen{height:620px;aspect-ratio:auto}
@media(max-width:900px){.mg-user-console #right #overview .mg-pv-phone .phone{max-width:268px}.mg-user-console #right #overview .mg-pv-phone .phone-screen{height:auto;aspect-ratio:375/750}}
.mg-user-console #right #overview .mg-pv-cap{font-size:12px;color:#64748b}
.mg-user-console #right #overview .mg-tplsel-body{padding:4px 18px 18px}
.mg-user-console #right #overview .mg-tplsel-main{gap:12px}
.mg-user-console #right #overview .mg-field-title{font-size:12px;font-weight:500;color:#526177}
.mg-user-console #right #overview .mg-field-title select{height:40px;min-height:40px;margin:6px 0 0;font-size:14px;padding:0 10px}
.mg-user-console #right #overview .mg-tplsel-info{padding:11px 12px;border:1px solid #e5eaf3;border-radius:9px;background:#f8fafc;display:flex;gap:8px 12px;flex-wrap:wrap;align-items:baseline}
.mg-user-console #right #overview .mg-tplsel-info>span{min-width:0;flex:1;font-size:14px;font-weight:700;overflow:visible;white-space:normal;overflow-wrap:anywhere}
.mg-user-console #right #overview .mg-tplsel-info>b{max-width:100%;font-size:12px;font-weight:500;white-space:normal;overflow-wrap:anywhere}
.mg-user-console #right #overview .mg-tplsel-manage{padding:11px 12px;border:1px solid #e5eaf3;border-radius:10px;background:#fff}
.mg-user-console #right .mg-manage-head>span{font-size:13px;line-height:1.6;font-weight:400}
.mg-user-console #right .mg-manage-head>button{height:32px;min-height:32px;font-size:13px;background:#fff}
.mg-user-console #right .mg-price-tag{font-size:12px}
.mg-user-console #right #overview .mg-tplsel-remark{padding:8px 12px;border:1px solid #e2e9ff;border-radius:8px;background:#f5f8ff;color:#526177;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.mg-user-console #right #overview .mg-tplsel-remark b{display:inline-block;padding:1px 6px;margin:0 6px 0 0;border:0;border-radius:4px;background:#e9efff;color:#3157d5;font-size:12px;font-weight:600}
.mg-user-console #right #overview .mg-tplsel-link{display:flex;align-items:flex-start;gap:8px}
.mg-user-console #right #overview .mg-tplsel-link>label{flex:1;min-width:0;display:block;margin:0;font-size:0;color:#64748b}
.mg-user-console #right #overview #tplSelLinkUrl{display:block;width:100%;height:auto;field-sizing:content;min-height:38px;margin:0;padding:8px 10px;border:1px solid #e1e7f0;border-radius:8px;background:#fff;color:#334155;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;resize:none;overflow:hidden;box-sizing:border-box}
.mg-user-console #right #overview .mg-tplsel-link>button{flex:none;height:38px;min-height:38px;margin:0;padding:0 14px;border-color:#cdd8f8;font-size:13px;box-sizing:border-box}
.mg-user-console #right #overview .mg-tplsel-gen{height:52px;min-height:52px;border-radius:11px;background:#315efb;font-size:15px;box-shadow:0 9px 20px rgba(49,94,251,.24)}
.mg-user-console #right #overview .mg-tplsel-gen:disabled{background:#e2e8f0;color:#64748b;opacity:1}
/* 推广操作是代理端最主要的工作入口，用卡片而不是一行紧凑小按钮：每张卡「彩色标签 + 说明文字」，
   认得出、点得中，也不用再藏一层「更多」。这里必须跟代理端其余紧凑化规则同样带 #right 提权，
   否则会被本节其他规则压回 32px 小按钮（上游 .mg-config-actions 与 #overview 的栅格都比这里弱）。 */
.mg-user-console #right #overview .mg-manage-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.mg-user-console #right #overview .mg-manage-actions>button{display:flex;align-items:center;justify-content:flex-start;gap:7px;height:auto;min-height:52px;width:auto;min-width:0;padding:8px 9px;border:1px solid #dbe3f0;border-radius:10px;background:#fff;color:#2f3c50;font-size:13px;line-height:1.35;white-space:normal;text-align:left;box-sizing:border-box;box-shadow:none}
.mg-user-console #right #overview .mg-manage-actions>button>span{width:30px;height:30px;border-radius:8px}
/* 前六个入口整齐 3×2；暂停与删除是风险操作，各占半行（6 列栅格里跨 3 列）并排最后一行 */
@media(min-width:901px){.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:repeat(6,minmax(0,1fr))}.mg-user-console #right #overview .mg-manage-actions>button{grid-column:span 2}.mg-user-console #right #overview .mg-manage-actions>button.pause,.mg-user-console #right #overview .mg-manage-actions>button.danger{grid-column:span 3}}
@media(max-width:900px){.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:1fr}}
.mg-user-console #right #overview .mg-manage-actions>button.pause,.mg-user-console #right #overview .mg-manage-actions>button.danger{min-height:48px;justify-content:center}
.mg-user-console #right #overview .mg-manage-actions>button.pause{border-color:#f3dfb8;background:#fffcf5;color:#a15c07}
.mg-user-console #right #overview .mg-manage-actions>button.pause.on{border-color:#b7e4c7;background:#f5fcf7;color:#1c7c43}
.mg-user-console #right #overview .mg-manage-actions>button.danger{border-color:#f1d5db;background:#fffafb;color:#b8324d}
.mg-user-console #right #overview .mg-manage-actions button:hover:not(:disabled){border-color:#9fb3f2;background:#f7f9ff;transform:translateY(-1px);box-shadow:0 8px 18px -13px rgba(49,94,251,.7)}
.mg-user-console #right #overview .mg-manage-actions>button.pause:hover:not(:disabled){border-color:#ebc77d;background:#fff8ea}
.mg-user-console #right #overview .mg-manage-actions>button.danger:hover:not(:disabled){border-color:#e9acb8;background:#fff5f7}
.mg-user-console #right #overview .mg-manage-actions button:disabled{opacity:.48;background:#f8fafc;transform:none;box-shadow:none}
.mg-user-console .mg-user-menu button{font-size:14px;min-height:36px;white-space:nowrap}
.mg-user-console .mg-user-menu button.danger{background:#fff;color:#c42b45}
/* 用户工作台沿用原三栏比例与适中字号，长金额完整显示，不靠省略号适配。 */
.mg-user-console #right #overview .mg-overview-top>.side-income>.panel-head{padding:16px 16px 0}
.mg-user-console #right #overview .side-income .panel-head h2{font-size:17px}
.mg-user-console #right #overview .side-income .panel-head p{font-size:12px;color:#64748b}
.mg-user-console #right #overview .side-income .mg-income-rows{display:block;padding:4px 24px 22px}
.mg-user-console #right #overview .mg-irow{padding:19px 1px;flex-wrap:wrap;gap:6px 10px}
.mg-user-console #right #overview .mg-irow .lb{font-size:16px;min-width:0;flex:1 1 110px}
.mg-user-console #right #overview .mg-irow b{max-width:100%;min-width:0;margin-left:auto;font-size:27px;line-height:1.25;text-align:right;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
.mg-user-console #right #overview .mg-irate{padding:20px 20px 18px;margin-top:16px;background:linear-gradient(180deg,#f5f8ff,#fff 70%)}
.mg-user-console #right #overview .mg-irate-head{flex-wrap:wrap}
.mg-user-console #right #overview .mg-irate-head .lb{font-size:15px}
.mg-user-console #right #overview .mg-irate .mg-irate-head b{font-size:38px;margin-left:auto}
.mg-user-console #right #overview .mg-irate .mg-irate-head b i{font-size:16px}
.mg-user-console #right #overview .mg-irate-bar{height:8px;margin-top:12px}
.mg-user-console #right #overview .mg-irate-legend{font-size:12px}
.mg-user-console #right #overview .mg-irate-legend span:last-child{color:#64748b}
.mg-user-console #right #overview .mg-irate-rules{gap:6px}
.mg-user-console #right #overview .mg-irate-rules li{font-size:13px;line-height:1.6;color:#526177}
.mg-user-console #right .mg-income-scope{font-size:12px;line-height:1.7;color:#64748b}
.mg-user-console #right #overview .mg-irate-sum{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px;padding-top:12px}
.mg-user-console #right #overview .mg-irate-sum span{font-size:12px;color:#64748b;text-align:center}
.mg-user-console #right #overview .mg-irate-sum b{font-size:18px;text-align:center}
@media(max-width:900px){.mg-user-console #right #overview .side-income #incomeRows{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){.mg-user-console #right #overview .mg-irow b{font-size:24px}.mg-user-console #right #overview .mg-irate{padding:14px}.mg-user-console #right #overview .mg-irate .mg-irate-head b{font-size:30px}.mg-user-console #right #overview .mg-irate-sum{grid-template-columns:minmax(0,1fr)}.mg-user-console #right #overview .mg-irate-sum>div{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;padding:0;border:0}.mg-user-console #right #overview .mg-irate-sum span{text-align:left}.mg-user-console #right #overview .mg-irate-sum b{max-width:100%;min-width:0;margin-left:auto;font-size:16px;text-align:right}}
/* 超窄屏下方时间按钮与排行名称允许重排，避免收益卡正常但整页仍横向滚动。 */
@media(max-width:360px){.mg-user-console #right .mg-trend-tools{min-width:0;max-width:100%;width:100%}.mg-user-console #right .mg-trend-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-width:0;width:100%}.mg-user-console #right .panel-head .mg-trend-switch button{margin:0;padding:0 4px;min-width:0;border-radius:6px}.mg-user-console #right .it-name{flex:1;width:0}}
.mg-user-console #right .mg-trend-body{min-height:0;padding:0 16px 16px}
.mg-user-console #right .mg-trend-body[data-state=empty],.mg-user-console #right .mg-trend-body[data-state=error],.mg-user-console #right .mg-trend-body[data-state=loading]{min-height:170px;display:flex;align-items:center;justify-content:center}
.mg-user-console #right .mg-trend-body .mg-empty{min-height:0;margin:0;padding:16px;background:transparent;border:0;box-shadow:none}
.mg-user-console #right .mg-trend-body .mg-empty-icon{display:none}
.mg-user-console #right .mg-trend-body .mg-empty p{font-size:12px;color:#64748b}
.mg-user-console #right .mg-insight{margin-top:0}
.mg-user-console #right .it-grid{align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}
.mg-user-console #right .mg-insight-empty{height:170px;min-height:0;display:flex;align-items:center;justify-content:center}
.mg-user-console #right .it-empty{padding:20px 10px;font-size:14px;color:#64748b}
.mg-user-console #right .it-row{font-size:14px}.mg-user-console #right .it-name{min-width:0;overflow-wrap:anywhere}
.mg-user-console #right .mg-ip-details>summary,.mg-user-console #right .mg-rec-more>summary,.mg-user-console #right .mg-user-access-panel summary{cursor:pointer;font-size:14px;font-weight:700;color:#334155;line-height:1.7}
.mg-user-console #right .mg-ip-details>summary>span,.mg-user-console #right .mg-rec-more>summary>span,.mg-user-console #right .mg-user-access-panel summary>span{display:inline;margin-left:12px;font-size:12px;font-weight:400;color:#64748b}
.mg-user-console #right .mg-ip-note{margin:12px 0;font-size:12px;color:#64748b}
.mg-user-console #right .mg-user-error{text-align:center;padding:14px;font-size:14px;color:#475569}
.mg-user-console #right .mg-user-error p{font-size:12px;margin:6px 0 10px;overflow-wrap:anywhere}
.mg-user-console #right .mg-user-error button{height:32px;min-height:32px;padding:0 14px;line-height:1.5;font-size:13px;box-sizing:border-box;box-shadow:none}
.mg-user-console #right .mg-rec-filters{grid-template-columns:minmax(260px,1.3fr) minmax(160px,.8fr) minmax(180px,1fr) auto;align-items:end;padding:12px;margin-bottom:8px}
.mg-user-console #right .mg-rec-filters label{min-width:0;margin:0;gap:6px}
.mg-user-console #right .mg-rec-filters input,.mg-user-console #right .mg-rec-filters select{width:100%;min-width:0;max-width:100%;margin:0}
.mg-user-console #right .mg-rec-dates{display:flex;gap:6px;align-items:center}
.mg-user-console #right .mg-rec-dates input{flex:1;width:0;min-width:0;padding:7px 6px}
.mg-user-console #right .mg-rec-dates input:first-child{grid-column:auto}
.mg-user-console #right .mg-rec-btns{grid-column:auto;align-self:end;margin:0;height:38px;flex-wrap:nowrap;width:auto}
.mg-user-console #right .mg-rec-btns>button{flex:none}
.mg-user-console #right .mg-rec-more{padding:8px 12px;margin-bottom:8px}
.mg-user-console #right .mg-rec-advanced{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;margin:8px 0 0;padding:12px}
.mg-user-console #right .mg-rec-advanced select{width:100%;min-width:0;margin:6px 0 0}
.mg-user-console #right .mg-rec-hints{padding:0 12px 12px}.mg-user-console #right .mg-rec-hints p{color:#64748b}
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) table{min-width:1400px}
/* 订单与支付记录的状态、到账和创建时间与表头同轴；访问记录保持原布局。 */
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) table :is(th,td):nth-child(5),
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) table :is(th,td):nth-child(6),
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) table :is(th,td):nth-child(7){text-align:center}
@media(max-width:640px){.mg-user-console #right #recordSubtabs{min-width:0;max-width:100%;flex-wrap:wrap}}
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) #recordList>tr>td:nth-child(2){min-width:140px}
.mg-user-console #right #recordTableWrap:not(.mg-visit-table) #recordList>tr>td:nth-child(4),.mg-user-console #right #recordTableWrap:not(.mg-visit-table) #recordList>tr>td:nth-child(5){min-width:76px;white-space:nowrap}
/* 访问记录：五列按内容分配，避免沿用十列订单表的宽度；窄屏只在表格内部滚动。 */
.mg-console #right #recordTableWrap.mg-visit-table table{width:100%;min-width:960px;table-layout:fixed}
.mg-console #right #recordTableWrap.mg-visit-table th{padding:11px 12px;font-size:13px}
.mg-console #right #recordTableWrap.mg-visit-table th.mg-visit-ctime{width:14%}
.mg-console #right #recordTableWrap.mg-visit-table th.mg-visit-target{width:26%}
.mg-console #right #recordTableWrap.mg-visit-table th.mg-visit-vid{width:20%}
.mg-console #right #recordTableWrap.mg-visit-table th.mg-visit-ip{width:18%}
.mg-console #right #recordTableWrap.mg-visit-table th.mg-visit-ua{width:22%}
.mg-console #right #recordTableWrap.mg-visit-table tbody>tr>td{width:auto;min-width:0;max-width:none;padding:10px 12px;line-height:1.45;white-space:normal}
.mg-console #right #recordTableWrap.mg-visit-table td.empty{padding:28px 12px}
.mg-console #right #recordTableWrap.mg-visit-table .mg-user-time{font-size:14px;line-height:1.45}
.mg-console #right #recordTableWrap.mg-visit-table .mg-user-time small{font-size:12px;line-height:1.45}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-link{gap:3px}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-link b{display:block;font-size:14px;line-height:1.45}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-link small{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;line-height:1.45}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-token{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-link-id{flex:none;color:#64748b;white-space:nowrap}
.mg-console #right #recordTableWrap.mg-visit-table td.mg-visit-vid,.mg-console #right #recordTableWrap.mg-visit-table td.mg-visit-ip{font-size:13px;font-variant-numeric:tabular-nums;color:#475569}
.mg-console #right #recordTableWrap.mg-visit-table .mg-visit-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-console #right #recordTableWrap.mg-visit-table td.mg-visit-ip{overflow-wrap:anywhere}
.mg-console #right #recordTableWrap.mg-visit-table td.mg-visit-ua{font-size:13px;overflow-wrap:anywhere;color:#475569}
/* 单号两行共享三列，保留完整内容；复制反馈固定宽度，避免文字切换挤动单号。 */
.mg-console #right .mg-order-number>b,.mg-console #orderDetailMask .mg-order-number>b{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:14px;line-height:1.5;font-weight:500;white-space:normal;overflow-wrap:anywhere;word-break:normal;overflow:visible;text-overflow:clip;user-select:text}
.mg-console #right .mg-order-number>small,.mg-console #orderDetailMask .mg-order-number>small{font-size:12px;line-height:1.5;color:#64748b;white-space:nowrap}
.mg-console #right .mg-order-number>button.op-btn,.mg-console #orderDetailMask .mg-order-number>button.op-btn{display:inline-flex;align-items:center;justify-content:center;width:64px;min-width:64px;height:32px;min-height:32px;padding:0 8px;margin:0;border:1px solid #d5dfee;border-radius:7px;background:#fff;color:#3157d5;font-size:13px;line-height:1.5;white-space:nowrap;box-shadow:none;box-sizing:border-box}
.mg-console #right .mg-order-number>button.op-btn.is-copied,.mg-console #orderDetailMask .mg-order-number>button.op-btn.is-copied{background:#eaf8f1;border-color:#bfe5d0;color:#16754b}
.mg-console #orderDetailMask .mg-order-number>button.op-btn:hover:not(:disabled){background:#f1f5ff;transform:none}
@media(max-width:640px){
  .mg-console #right .mg-order-identity{max-width:calc(100vw - 136px)}
  .mg-console #right #adminOrders .mg-support-order-table th:first-child{width:calc(100vw - 108px)}
  .mg-console .mg-order-number{grid-template-columns:minmax(0,1fr) 64px;gap:2px 8px}
  .mg-console .mg-order-number>small{grid-column:1;grid-row:1}
  .mg-console .mg-order-number>b{grid-column:1;grid-row:2}
  .mg-console .mg-order-number>button{grid-column:2;grid-row:1/span 2}
}
.mg-user-console #right .mg-user-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.mg-user-console #right .mg-user-time{display:block;white-space:nowrap;font-size:14px;font-variant-numeric:tabular-nums}
.mg-user-console #right .mg-user-time small{display:block;font-size:12px;line-height:1.6;color:#64748b}
.mg-user-console #right #recordTableWrap:not(.mg-access-managing) .mg-access-check input,.mg-user-console #right #recordTableWrap:not(.mg-access-managing) .mg-access-row-check{display:none}
.mg-user-console #right #recordList .badge.warn,.mg-user-console #right #recordList .mg-access-state:not(.valid):not(.revoked) .badge{background:#f1f5f9;color:#64748b}
.mg-user-console #right #recordList .mg-access-state.valid .badge{background:#eaf8f1;color:#16754b}
.mg-user-console #right .mg-user-access-panel .mg-access-tools{margin:12px 0 0;background:#f8fafc;border:0;padding:12px}
.mg-user-console #right .mg-user-access-panel .mg-access-tools button{height:38px;min-height:38px;padding:0 14px;white-space:nowrap;box-sizing:border-box}
.mg-user-console #right .mg-user-access-panel .mg-access-tools button.danger{background:#fff;border-color:#efbac4;color:#c42b45}
.mg-user-console #right .mg-wallet-overview{grid-template-columns:minmax(0,1fr) minmax(0,3fr);gap:12px;align-items:stretch}
.mg-user-console #right .mg-wallet-balance{padding:16px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:linear-gradient(135deg,#173a8f 0%,#315efb 68%,#4a72ff 100%);box-shadow:0 12px 28px -14px rgba(27,67,170,.55);color:#fff;min-height:0}
.mg-user-console #right .mg-wallet-balance::before,.mg-user-console #right .mg-wallet-balance::after{display:block;pointer-events:none}
.mg-user-console #right .mg-wallet-balance-top{font-size:14px;color:rgba(255,255,255,.9)}
.mg-user-console #right .mg-wallet-balance-top i{font-size:12px;background:rgba(255,255,255,.14);color:#fff}
.mg-user-console #right .mg-wallet-balance strong{font-size:26px;color:#fff;margin:6px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.mg-user-console #right .mg-wallet-balance p{font-size:12px;color:rgba(255,255,255,.8);line-height:1.7}
.mg-user-console #right .mg-wallet-balance button{position:static;display:inline-flex;align-items:center;justify-content:center;margin:10px 0 0;height:38px;min-height:38px;padding:0 16px;background:#fff;border-color:rgba(255,255,255,.45);border-radius:8px;color:#2452d8;font-size:14px;box-shadow:0 6px 14px rgba(20,48,120,.18)}
.mg-user-console #right .mg-wallet-overview .finance-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:12px}
.mg-user-console #right .mg-wallet-overview .finance-stats .stat{padding:16px;justify-content:flex-start;min-height:0}
.mg-user-console #right .mg-wallet-overview .finance-stats .stat::before,.mg-user-console #right .mg-wallet-overview .finance-stats .stat::after{display:none}
.mg-user-console #right .mg-wallet-overview .finance-stats .stat span{font-size:14px;color:#526177}
.mg-user-console #right .mg-wallet-overview .finance-stats .stat b{font-size:26px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.mg-user-console #right .mg-wallet-overview .finance-stats .stat small{font-size:12px;color:#64748b;line-height:1.7}
.mg-user-console #right .mg-wallet-scope{margin:0 0 14px;font-size:12px;color:#64748b;line-height:1.7}
/* 财务两栏各自滚动、各自翻页；记录多时不把另一栏挤到下方，少记录也不拉出整栏空白。 */
.mg-user-console #right .mg-finance-records{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.mg-console #right .mg-finance-records>.panel{min-width:0;height:auto}
.mg-console #right .mg-finance-records .table-wrap{max-height:clamp(280px,48vh,560px);overflow:auto;overscroll-behavior:contain}
.mg-console #right .mg-finance-records .table-wrap th{position:sticky;top:0;z-index:1;background:#f8fafc}
.mg-console #right .mg-finance-records .table-wrap:focus-visible{outline:2px solid #315efb;outline-offset:2px}
.mg-console #right .mg-finance-records .mg-pager{flex-wrap:wrap}
.mg-user-console #right .mg-withdraw-records table{min-width:760px}
/* 提现记录的金额、状态和申请时间与各自表头共用中心线。 */
.mg-user-console #right .mg-withdraw-records table :is(th,td):nth-child(2),
.mg-user-console #right .mg-withdraw-records table :is(th,td):nth-child(4),
.mg-user-console #right .mg-withdraw-records table :is(th,td):nth-child(5){text-align:center}
.mg-user-console #right .mg-revenue-panel table{min-width:820px}
@media(max-width:980px){.mg-user-console #right .mg-finance-records{grid-template-columns:minmax(0,1fr)}}
.mg-user-console #right .mg-user-number{display:flex;align-items:center;gap:10px;min-width:220px;max-width:380px}
.mg-user-console #right .mg-user-number b{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere;white-space:normal;user-select:text}
.mg-user-console #right .mg-user-number button{flex:none}
.mg-user-console #right .mg-revenue-settle .mg-revenue-net{color:#16754b}.mg-user-console #right .mg-revenue-refund .mg-revenue-net{color:#c42b45}
.mg-user-console #right .mg-table-empty{padding:16px 10px}.mg-user-console #right .mg-table-empty span{font-size:12px;color:#64748b}
.mg-user-console #right .mg-cp-imgs button{width:56px;height:56px;flex:none}
.mg-user-console #right #myTemplates table{min-width:950px}
.mg-user-console #right #myTemplates .mg-tpl-ops .op-row{margin-left:auto}
.mg-user-console #right #overview .mg-tplsel-remark[hidden],.mg-user-console #right .mg-ip-details:not([open])>:not(summary){display:none}
@media(max-width:640px){.mg-user-console #right .mg-trend-summary{grid-template-columns:minmax(0,1fr);gap:8px}.mg-user-console #right .mg-trend-summary>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px;min-height:0;padding:10px 12px}.mg-user-console #right .mg-trend-summary b{margin:0;font-size:24px;white-space:nowrap}.mg-user-console #right .mg-trend-summary small{grid-column:1/-1;margin:0;font-size:12px;line-height:1.6}}
@media(max-width:1380px){.mg-user-console #right #overview .mg-overview-top{grid-template-columns:280px minmax(0,1fr)}.mg-user-console #right #overview .side-income{grid-column:1/-1}.mg-user-console #right #overview .side-income .mg-income-rows{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.mg-user-console #right #overview .side-income .mg-irate{grid-column:1/-1}.mg-user-console #right #stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-user-console #right .mg-rec-filters{grid-template-columns:minmax(260px,1.4fr) minmax(0,1fr)}.mg-user-console #right .mg-rec-btns{grid-column:auto;flex-wrap:wrap;height:auto}}
@media(max-width:900px){.mg-user-console #right #overview .mg-overview-top{grid-template-columns:minmax(0,1fr)}.mg-user-console #right #stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-user-console #right .mg-wallet-overview{grid-template-columns:minmax(0,1fr)}.mg-user-console #right .it-grid{grid-template-columns:minmax(0,1fr)}.mg-user-console #right .mg-rec-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.mg-user-console #right .mg-rec-dates{grid-column:auto}.mg-user-console #right .mg-rec-filters>label:first-child,.mg-user-console #right .mg-rec-btns{grid-column:1/-1}}
@media(max-width:640px){.mg-user-console #right #stats .stat{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px}.mg-user-console #right #stats .stat .go{position:static;align-self:stretch;justify-content:center;margin-top:2px;background:#f5f8ff}.mg-user-console #right #stats .stat.mg-stat-paid .go{background:#e9f8f0;color:#0a7d50}.mg-user-console #right #stats .stat .tx b{font-size:21px}.mg-user-console #right #stats .stat{flex-direction:column;align-items:flex-start}.mg-user-console #right #overview .side-income .mg-income-rows{grid-template-columns:minmax(0,1fr)}.mg-user-console #right .mg-rec-filters,.mg-user-console #right .mg-rec-advanced{grid-template-columns:minmax(0,1fr)}.mg-user-console #right .mg-rec-btns{grid-column:1;gap:6px}.mg-user-console #right .mg-rec-btns>button{padding:0 12px}.mg-user-console #right .mg-wallet-overview .finance-stats{grid-template-columns:minmax(0,1fr)}.mg-user-console #right .mg-ip-details>summary>span,.mg-user-console #right .mg-user-access-panel summary>span,.mg-user-console #right .mg-rec-more>summary>span{display:block;margin-left:0}.mg-user-console #right .mg-trend-body .mg-empty{padding:12px}.mg-user-console #right .mg-user-access-panel .mg-access-tools>div{min-width:0}}

@media(max-width:1100px){.mg-console #right .mg-finance-config{grid-template-columns:1fr}.mg-console #right .mg-finance-group{padding:0 0 16px;border-right:0;border-bottom:1px solid #e7ecf4}.mg-console #right .mg-finance-group:nth-child(3){border-bottom:0;padding-bottom:0}}
@media(max-width:640px){.mg-console #right .panel{padding:14px}.mg-console #right .mg-cp-sets{grid-template-columns:1fr}.mg-console #right .mg-entry-batch{margin-left:0;width:100%}.mg-console #right .mg-entry-batch>span{flex-basis:100%}.mg-console #right .mg-pager>span{flex-basis:100%;order:-1;text-align:center}.mg-console #right .mg-entry-filters input{flex-basis:100%;width:100%;min-width:0}.mg-console #right .pay-foot>span{justify-content:flex-start}.mg-console #right .pay-foot>span button{flex:none}.mg-console #right .mg-admin-users-table th:first-child,.mg-console #right .mg-admin-users-table td:first-child,.mg-console #right .mg-admin-users-table th:last-child,.mg-console #right .mg-admin-users-table td:last-child{position:static;box-shadow:none}.mg-console #orderDetailMask .editor-foot .foot-actions{width:100%;justify-content:flex-end}}

/* ===== 模板编辑器改版（20261031-tpltabs1）：左侧手机预览 + 右侧 5 个页签，每页一屏；组件一行一个手风琴；代理勾选收进「管理代理」小弹窗 =====
   全部挂在 .mg-tpl2（编辑器弹窗）/ #tplGrantMask 下，不影响其它弹窗；弹窗在 #app 外，ylb.css 的 #app 规则不生效，Bootstrap 的 label/h4/[hidden] 在这里统一压回 */
#tplEditorMask [hidden],#tplGrantMask [hidden]{display:none!important}
/* tpltabs4：弹窗放大一档——最宽 1440、高度铺到屏幕 94%（最高 1080）；左侧预览随屏宽 380–440；正文 14px、标签 13px、提示 12.5px、输入框 40 高 */
.editor-dialog.tpl-editor.mg-tpl2{width:min(1440px,100%);height:min(94vh,1080px);max-height:94vh}
.mg-tpl2 .share-head{flex:none;display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:16px 24px}
.mg-tpl2 .share-head h2{flex:none;margin:0;font-size:18px}
.mg-tpl2 .mg-tpl-name{min-width:0;max-width:360px;padding:4px 12px;border-radius:999px;background:#f1f5ff;color:#315efb;font-size:13px;font-weight:700;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .share-head .icon-close{flex:none;width:34px;height:34px;margin-left:auto;background:#f3f5f9;color:#64748b;font-size:20px}
.mg-tpl2 .share-head .icon-close:hover{background:#e4e9f2;color:#172033}
.tpl-editor.mg-tpl2 .editor-body{flex:1;min-height:0;display:grid;grid-template-columns:clamp(380px,30vw,440px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:0;overflow:hidden}

/* 左侧预览 */
.mg-tpl2 .mg-preview-side.mg-tpv{display:flex;flex-direction:column;align-items:center;min-height:0;padding:16px 22px;overflow-y:auto;border-right:1px solid #edf0f6;background:linear-gradient(180deg,#f6f8ff,#f8f9fc)}
.mg-tpl2 .mg-tpv-top{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:10px}
.mg-tpl2 .mg-tpv-top>span:first-child{flex:1;min-width:0;font-size:14px;font-weight:700;color:#526075;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-tpv-acts{display:inline-flex;gap:4px;flex:none}
.mg-tpl2 .mg-tpv-acts button{height:30px;min-height:30px;padding:0 10px;border:1px solid #dce5ff;border-radius:8px;background:#fff;color:#315efb;font-size:13px;font-weight:700;line-height:1;cursor:pointer;white-space:nowrap}
.mg-tpl2 .mg-tpv-acts button:hover{background:#f1f5ff;border-color:#bfd0ff}
.mg-tpl2 .mg-tpv-top>b{flex:none;color:#e11d48;font-size:19px;font-weight:800;white-space:nowrap}
.mg-tpl2 .mg-tpv .phone{flex:none;width:360px;max-width:100%;box-sizing:border-box;margin:0;padding:9px;border-radius:32px;background:#182033;box-shadow:0 18px 40px rgba(21,28,48,.2)}
.mg-tpl2 .mg-tpv .phone-screen{height:min(720px,calc(min(94vh,1080px) - 222px));min-height:300px;border-radius:24px}
.mg-tpl2 .mg-tpl-pvtip{margin:12px 0 0;font-size:13px;line-height:1.6;color:#8a94a6;text-align:center}
.mg-tpl2 .mg-tpl-pvtip b{color:#315efb}

/* 右侧：页签 + 内容 + 底栏 */
.mg-tpl2 .mg-tpl-st{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#fff}
.mg-tpl2 .mg-tabs{flex:none;display:flex;align-items:center;gap:6px;padding:10px 24px 0;border-bottom:1px solid #edf0f6;background:#fff;overflow-x:auto;scrollbar-width:none}
.mg-tpl2 .mg-tabs::-webkit-scrollbar{display:none}
.mg-tpl2 .mg-tabs button{position:relative;flex:none;display:flex;align-items:center;gap:8px;height:auto;min-height:0;padding:12px 18px 14px;margin:0;border:0;border-radius:0;background:transparent;color:#64748b;font-size:15px;font-weight:700;line-height:22px;white-space:nowrap;cursor:pointer;box-shadow:none}
.mg-tpl2 .mg-tabs button:hover{color:#315efb}
.mg-tpl2 .mg-tabs .n{display:flex;align-items:center;justify-content:center;flex:none;width:22px;height:22px;border-radius:50%;background:#eef1f7;color:#64748b;font-size:13px;line-height:1}
.mg-tpl2 .mg-tabs .n.ok{width:20px;height:20px;background:#dcfce7;color:#16a34a;font-size:12.5px}
.mg-tpl2 .mg-tabs .warn{padding:0 8px;border-radius:999px;background:#fff7ed;color:#ea580c;font-size:12.5px;font-style:normal;font-weight:700;line-height:20px}
.mg-tpl2 .mg-tabs button.on{color:#315efb}
.mg-tpl2 .mg-tabs button.on .n{width:22px;height:22px;background:#315efb;color:#fff;font-size:13px}
.mg-tpl2 .mg-tabs button.on::after{content:'';position:absolute;left:12px;right:12px;bottom:0;height:3px;border-radius:3px;background:#315efb}
.mg-tpl2 .mg-pane{flex:1;min-height:0;overflow-y:auto;padding:20px 24px;background:#fbfcff;overscroll-behavior:contain}
.mg-tpl2 .mg-tpl-foot{flex:none;position:relative;display:flex;align-items:center;gap:10px;padding:14px 24px;border-top:1px solid #edf0f6;background:#fff}
.mg-tpl2 .mg-tpl-foot .sp{flex:1}
.mg-tpl2 .mg-tpl-foot .hint{min-width:0;font-size:13px;color:#8a94a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-tpl-foot .hint:empty{display:none}
.mg-tpl2 .mg-dirty{display:flex;align-items:center;gap:6px;flex:none;font-size:14px;color:#ea580c;white-space:nowrap}
.mg-tpl2 .mg-dirty::before{content:'';width:7px;height:7px;border-radius:50%;background:#f97316}
.mg-tpl2 .mg-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;height:40px;min-height:40px;padding:0 20px;margin:0;border:1px solid #dbe2ee;border-radius:10px;background:#fff;color:#334155;font-size:14px;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none;transition:background .15s,border-color .15s,color .15s}
.mg-tpl2 .mg-btn:hover:not(:disabled){border-color:#b9c8f8;color:#315efb}
.mg-tpl2 .mg-btn.pri{border-color:#315efb;background:#315efb;color:#fff}
.mg-tpl2 .mg-btn.pri:hover:not(:disabled){border-color:#2a50e0;background:#2a50e0;color:#fff}
.mg-tpl2 .mg-btn.lk{border-color:#dce5ff;color:#315efb}
.mg-tpl2 .mg-btn.lk:hover:not(:disabled){background:#f1f5ff}
.mg-tpl2 .mg-btn.sm{height:32px;min-height:32px;padding:0 12px;border-radius:8px;font-size:13px}
.mg-tpl2 .mg-btn:disabled{opacity:.45;cursor:not-allowed}
.mg-tpl2 .mg-help{flex:none;width:34px;height:34px;min-height:34px;padding:0;border:1px solid #dbe2ee;border-radius:50%;background:#fff;color:#64748b;font-size:15px;font-weight:700;line-height:1;cursor:pointer}
.mg-tpl2 .mg-help:hover{border-color:#315efb;color:#315efb}
.mg-tpl2 .mg-help-pop{position:absolute;left:20px;bottom:calc(100% - 4px);z-index:20;width:420px;max-width:calc(100% - 40px);box-sizing:border-box;padding:14px 16px;border:1px solid #e3e8f2;border-radius:12px;background:#fff;box-shadow:0 16px 40px -12px rgba(15,23,42,.28)}
.mg-tpl2 .mg-help-pop>b{display:block;font-size:14px;color:#1f2937}
.mg-tpl2 .mg-help-pop ul{margin:6px 0 0;padding-left:18px;font-size:13px;line-height:1.75;color:#475569}

/* 表单基础：输入框 40 高、10 圆角、14px；标题 13px 灰（:where 降低优先级，组件内各自的尺寸规则照常生效） */
.mg-tpl2 :where(.mg-pane input:not([type=checkbox],[type=radio],[type=color],[type=range],[type=file],[type=hidden]),.mg-pane select){height:40px;min-height:40px;border-radius:10px;font-size:14px}
.mg-tpl2 :where(.mg-pane input:not([type=checkbox],[type=radio],[type=color],[type=range],[type=file],[type=hidden])){padding:0 12px}
.mg-tpl2 :where(.mg-pane select){padding-top:0;padding-bottom:0}
.mg-tpl2 :where(.mg-pane textarea){border-radius:10px;font-size:14px}
.mg-tpl2 .mg-g2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 14px}
.mg-tpl2 .mg-g2.one{grid-template-columns:minmax(0,1fr)}
.mg-tpl2 .mg-f{display:block;min-width:0;margin:0 0 16px;font-size:13px;font-weight:600;color:#64748b}
.mg-tpl2 label.mg-f>input,.mg-tpl2 label.mg-f>select{margin-top:6px}
.mg-tpl2 .mg-f-lb{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:#64748b}
.mg-tpl2 .mg-f-tip{margin:5px 0 0;font-size:12.5px;font-weight:400;line-height:1.6;color:#8a94a6}
.mg-tpl2 .mg-f-tip:empty{display:none}
.mg-tpl2 .mg-muted{display:block;margin:8px 0 0;font-size:12.5px;line-height:1.6;color:#8a94a6}
.mg-tpl2 .mg-seg{display:flex;gap:4px;padding:4px;border-radius:11px;background:#eef1f7}
.mg-tpl2 .mg-seg button{flex:1;min-width:0;height:34px;min-height:34px;padding:0 10px;margin:0;border:0;border-radius:8px;background:transparent;color:#64748b;font-size:13.5px;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none;transition:background .15s,color .15s}
.mg-tpl2 .mg-seg button:hover{color:#315efb}
.mg-tpl2 .mg-seg button.on{background:#fff;color:#315efb;box-shadow:0 1px 4px rgba(15,23,42,.08)}
.mg-tpl2 .mg-blk{margin-bottom:14px;padding:16px;border:1px solid #e3e8f2;border-radius:12px;background:#fff}
.mg-tpl2 .mg-blk>h4{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;margin:0 0 12px;font-size:15px;font-weight:700;line-height:1.5;color:#1f2937}
.mg-tpl2 .mg-blk>h4>span:not(.comp-pay-prev){min-width:0;font-size:13px;font-weight:400;color:#8a94a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-blk>h4 .comp-pay-prev{max-width:72%}
.mg-tpl2 .mg-blk .mg-seg{margin-bottom:12px}
.mg-tpl2 .mg-who{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:10px 12px;border-radius:10px;background:#f7f9fc}
.mg-tpl2 .mg-who .tags{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;flex:1 1 auto}
.mg-tpl2 .mg-who .tag{padding:4px 12px;border-radius:999px;background:#fff;border:1px solid #dbe4ff;color:#315efb;font-size:13px;font-weight:600;line-height:18px;max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-who .tag.more{border-color:#e3e8f2;color:#64748b}
.mg-tpl2 .mg-who .tag.warn{background:#fff7ed;border-color:#fed7aa;color:#ea580c}
.mg-tpl2 .mg-who .act{display:flex;align-items:center;gap:10px;margin-left:auto;flex:none}
.mg-tpl2 .mg-who small{font-size:13px;color:#64748b;white-space:nowrap}
.mg-tpl2 .mg-who small b{color:#1f2937;font-weight:700}
/* 可见范围说明：编辑器里只是一行灰色小字；指定代理却一个没选时变提醒色 */
.mg-tpl2 .mg-scope-tip,.mg-tpl2 .mg-scope-tip.is-all,.mg-tpl2 .mg-scope-tip.is-users,.mg-tpl2 .mg-scope-tip.is-hidden{margin:8px 2px 0;padding:0;border:0;border-radius:0;background:none;color:#8a94a6;font-size:13px;line-height:1.6}
.mg-tpl2 .mg-scope-tip.is-warn{color:#ea580c}
.mg-tpl2 .mg-pane-hint{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;font-size:13px;line-height:1.6;color:#8a94a6}

/* 「页面内容」：一行一个组件，点一行展开（同一时间只展开一个） */
.mg-tpl2 .mg-crow{display:flex;align-items:center;gap:12px;height:60px;box-sizing:border-box;padding:0 14px;margin-bottom:10px;border:1px solid #e3e8f2;border-radius:12px;background:#fff;cursor:pointer;user-select:none;transition:border-color .15s,background .15s}
.mg-tpl2 .mg-crow:hover{border-color:#c7d6ff}
.mg-tpl2 .mg-crow .dr{flex:none;width:20px;height:28px;margin:0;color:#b6bfcd;font-size:18px;letter-spacing:-2px}
.mg-tpl2 .mg-crow .dr:hover{background:#f1f5ff;color:#315efb}
.mg-tpl2 .mg-crow .no{display:flex;align-items:center;justify-content:center;flex:none;width:26px;height:26px;border-radius:7px;background:#eef2ff;color:#315efb;font-size:13px;font-weight:800}
.mg-tpl2 .mg-crow .tp{flex:none;min-width:60px;font-size:15px;font-weight:700;color:#1f2937;white-space:nowrap}
.mg-tpl2 .mg-crow .comp-pkg-badge{flex:none;padding:2px 9px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:12.5px;font-style:normal;font-weight:700;white-space:nowrap}
.mg-tpl2 .mg-crow .th{display:flex;align-items:center;justify-content:center;flex:none;width:56px;height:38px;border-radius:7px;background:linear-gradient(135deg,#dbeafe,#e9d5ff) center/cover no-repeat;color:#fff;font-size:13px;overflow:hidden}
.mg-tpl2 .mg-crow .th.vd{background-color:#1e293b;background-image:linear-gradient(135deg,#1e293b,#475569)}
.mg-tpl2 .mg-crow .th[style*="background-image"]{background-size:cover;background-position:center}
.mg-tpl2 .mg-crow .sum{flex:1;min-width:0;font-size:14px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-crow .sum .em{font-style:normal;color:#a0aabb}
.mg-tpl2 .mg-crow .ops{display:flex;gap:6px;flex:none}
.mg-tpl2 .mg-crow .ops button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:32px;padding:0;margin:0;border:0;border-radius:8px;background:#f6f8fb;color:#94a3b8;font-size:14px;line-height:1;cursor:pointer;box-shadow:none;transition:background .15s,color .15s}
.mg-tpl2 .mg-crow .ops button:hover{background:#eef2ff;color:#315efb}
.mg-tpl2 .mg-crow .ops button.del:hover{background:#fff1f2;color:#e11d48}
.mg-tpl2 .mg-crow .ops button.ar{color:#315efb}
.mg-tpl2 .mg-crow .ops .mv{display:none}
.mg-tpl2 .mg-crow .ops .mv.off,.mg-tpl2 .mg-crow .ops .mv.off:hover{opacity:.35;background:#f6f8fb;color:#94a3b8;cursor:default}
.mg-tpl2 .mg-pane-hint i{font-style:normal}
.mg-tpl2 .mg-pane-hint .mg-hint-touch{display:none}
.mg-tpl2 .mg-crow .go{flex:none;height:32px;min-height:32px;padding:0 8px;margin:0;border:0;border-radius:8px;background:transparent;color:#315efb;font-size:13px;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none}
.mg-tpl2 .mg-crow .go:hover{background:#eef2ff}
.mg-tpl2 .mg-crow.pay{border-color:#fecdd3;background:#fff7f8}
.mg-tpl2 .mg-crow.pay:hover{border-color:#fda4af}
.mg-tpl2 .mg-crow.pay .no{background:#ffe4e6;color:#e11d48}
.mg-tpl2 .mg-crow.pay .sum b{color:#e11d48}
.mg-tpl2 .mg-citem{border-radius:12px}
.mg-tpl2 .mg-citem.open{margin-bottom:10px;border:1.5px solid #315efb;background:#fff;box-shadow:0 6px 18px rgba(49,94,251,.08)}
.mg-tpl2 .mg-citem.open>.mg-crow{height:58px;margin:0;border:0;background:transparent}
.mg-tpl2 .mg-citem.dragging{opacity:.4}
.mg-tpl2 .mg-citem.drop-before{box-shadow:0 -3px 0 0 #315efb}
.mg-tpl2 .mg-citem.drop-after{box-shadow:0 3px 0 0 #315efb}
.mg-tpl2 .mg-citem.is-new,.mg-tpl2 .mg-paygrp.mg-flash{animation:mgTplFlash 1.6s ease}
@keyframes mgTplFlash{0%,35%{box-shadow:0 0 0 4px rgba(49,94,251,.22)}100%{box-shadow:0 0 0 0 rgba(49,94,251,0)}}
.mg-tpl2 .mg-clist>.mg-empty{margin-bottom:8px;padding:28px 16px}
/* 两行之间的「＋ 插入到这里」：取代行间距，平时淡色小按钮，悬停出现虚线，点开展示组件类型；拖动时也能作为落点 */
.mg-tpl2 .mg-clist>.mg-citem>.mg-crow,.mg-tpl2 .mg-clist>.mg-citem.open{margin-bottom:0}
.mg-tpl2 .mg-clist>.comp-insert{min-height:28px;padding:3px 0}
.mg-tpl2 .mg-clist>.comp-insert::before{left:16px;right:16px}
.mg-tpl2 .mg-clist>.comp-insert:last-child{margin-bottom:4px}
.mg-tpl2 .comp-insert-btn{height:24px;min-height:24px;margin:0;padding:0 14px;font-size:12.5px;line-height:22px;opacity:.5;box-shadow:none}
.mg-tpl2 .comp-insert-menu{gap:8px;margin-top:8px;padding:12px}
.mg-tpl2 .comp-insert.open{padding:8px 0}
.mg-tpl2 .comp-insert-menu button{min-height:36px;margin:0;padding:0 14px;border-radius:10px;font-size:13.5px;box-shadow:none}
.mg-tpl2 .comp-insert-menu button i{font-size:15px}
.mg-tpl2 .comp-insert.drop-on{min-height:34px}

/* 展开区 / 价格分组 / 按钮样式 复用 .mg-comp-item 的字段样式，但去掉卡片外观 */
.mg-tpl2 .mg-comp-item.mg-cbody,.mg-tpl2 .mg-comp-item.mg-paygrp,
.mg-tpl2 .mg-comp-item.mg-cbody:hover,.mg-tpl2 .mg-comp-item.mg-paygrp:hover{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.mg-tpl2 .mg-comp-item.mg-cbody,.mg-tpl2 .mg-comp-item.mg-cbody:hover{padding:6px 16px 16px}
.mg-tpl2 .mg-comp-item.mg-paygrp.mg-flash{border-radius:12px}
.mg-tpl2 .mg-comp-item .comp-fields>label:not(.mg-block){color:#64748b;font-weight:600}
.mg-tpl2 .mg-comp-item .comp-fields .mg-block{margin:0;font-size:13px;font-weight:600;color:#64748b}
.mg-tpl2 .mg-comp-item .comp-fields input,.mg-tpl2 .mg-comp-item .comp-fields select{min-height:40px}
/* 上一条 min-height:40px 会把 .comp-fields 里的滑块开关撑成 38×40 的大圆（圆点挤在左上角），开关这里锁回 38×22；「默认选中」框与左边「角标」输入框同高 40px */
.mg-tpl2 .mg-comp-item .comp-fields .mg-switch input[type=checkbox]{width:38px;height:22px;min-height:0;max-height:22px;margin:0;padding:0;border:0;border-radius:999px;box-shadow:none;-webkit-box-shadow:none}
.mg-tpl2 .mg-comp-item .comp-pkg-body .comp-pkg-def-box{min-height:40px;gap:10px;transition:border-color .15s,background .15s,box-shadow .15s}
.mg-tpl2 .mg-comp-item .comp-pkg-body .comp-pkg-def-box:hover{border-color:#fdba74;background:#fffaf5}
.mg-tpl2 .mg-comp-item .comp-pkg-body .comp-pkg-def-box:has(input:checked){border-color:#fdba74;background:#fff7ed;box-shadow:0 0 0 3px rgba(249,115,22,.08)}
.mg-tpl2 .mg-comp-item .comp-pkg-body .comp-pkg-def-box:has(input:focus-visible){box-shadow:0 0 0 3px rgba(249,115,22,.22)}
/* 手机上两列太窄（说明被截成「打开弹窗…」），角标 / 默认选中上下排 */
@media(max-width:480px){.mg-tpl2 .mg-comp-item .comp-pkg-body .comp-fields.is-2col{grid-template-columns:minmax(0,1fr)}}
.mg-tpl2 .mg-comp-item .comp-fields.is-img{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:12px}
.mg-tpl2 .mg-comp-item .comp-affix{min-height:40px;border-radius:10px}
.mg-tpl2 .mg-comp-item .comp-affix input{min-height:38px}
.mg-tpl2 .mg-comp-item input[data-key=price]{font-weight:800;color:#e11d48}
.mg-tpl2 .mg-comp-item .comp-checks{margin-top:10px}
.mg-tpl2 .mg-comp-item .comp-tips{margin-top:8px}
.mg-tpl2 .mg-paygrp-h{display:flex;align-items:baseline;gap:8px;margin:0 0 10px}
.mg-tpl2 .mg-paygrp-h b{font-size:15px;font-weight:800;color:#1f2937}
.mg-tpl2 .mg-paygrp-h span{font-size:13px;color:#8a94a6}
.mg-tpl2 .mg-paygrp+.mg-paygrp-h{margin-top:18px;padding-top:14px;border-top:1px dashed #e3e8f2}
.mg-tpl2 .mg-paygrp .mg-btnth{margin:10px 0 0;color:#ea580c}
#tplPayPanes>.mg-empty{gap:10px;padding:28px 16px}

/* 添加栏 */
.mg-tpl2 .mg-addbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:8px;padding:14px 16px;border:1.5px dashed #c9d5f5;border-radius:12px;background:#f8faff}
.mg-tpl2 .mg-addbar>b{margin-right:4px;font-size:14px;color:#315efb}
.mg-tpl2 .mg-addmore{display:contents}
.mg-tpl2 .mg-chip{height:36px;min-height:36px;padding:0 14px;margin:0;border:1px solid #dce5ff;border-radius:999px;background:#fff;color:#334155;font-size:14px;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none;transition:background .15s,border-color .15s,color .15s}
.mg-tpl2 .mg-chip:hover{border-color:#93b0ff;background:#f1f5ff;color:#315efb}
.mg-tpl2 .mg-addbar>small{margin-left:auto;font-size:13px;color:#8a94a6}

/* 折叠行：标题 + 一行摘要 + 展开 ⌄（主题配色 / 按钮样式 / 支付提醒 / 背景音乐 / 促销 / 随机尾数 / 图标 / 联系方式） */
.mg-tpl2 .mg-cfold{margin-bottom:10px;border:1px solid #e3e8f2;border-radius:12px;background:#fff}
.mg-tpl2 .mg-cfold>summary{display:flex;align-items:center;gap:12px;height:54px;padding:0 16px;list-style:none;cursor:pointer;user-select:none;font-size:14px;font-weight:700;color:#1f2937}
.mg-tpl2 .mg-cfold>summary::-webkit-details-marker{display:none}
.mg-tpl2 .mg-cfold>summary>b{flex:none;font-size:15px;font-weight:700}
.mg-tpl2 .mg-cfold>summary:hover{background:#f8faff;border-radius:12px}
.mg-tpl2 .mg-cfold[open]>summary{border-bottom:1px dashed #edf0f6;border-radius:12px 12px 0 0}
.mg-tpl2 .mg-cfold .mg-fold-sum{flex:1;min-width:0;display:block;font-size:13px;font-weight:400;color:#8a94a6;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-cfold .mg-fold-sum .chip{padding:1px 8px}
.mg-tpl2 .mg-cgo{flex:none;font-size:13px;font-style:normal;font-weight:700;color:#315efb;white-space:nowrap}
.mg-tpl2 .mg-cgo::before{content:'展开 ⌄'}
.mg-tpl2 .mg-cfold[open]>summary .mg-cgo::before{content:'收起 ⌃'}
.mg-tpl2 .mg-cfold-body{padding:16px}
.mg-tpl2 .mg-cfold .mg-theme-box,.mg-tpl2 .mg-cfold .mg-display-opts{padding:0;border:0;border-radius:0;background:none}

/* 管理员统一配置：与折叠行同款 */
.mg-tpl2 .mg-admin-jump{margin:0 0 10px;padding:0 16px;border:1px solid #e3e8f2;border-radius:12px;background:#fff}
.mg-tpl2 .mg-admin-jump[open]{padding-bottom:16px}
.mg-tpl2 .mg-admin-jump.on{border-color:#c9d8fb;background:#f8faff}
.mg-tpl2 .mg-admin-jump.bad{border-color:#f5c2c2;background:#fff6f6}
.mg-tpl2 .mg-admin-jump-head{display:flex;align-items:center;gap:12px;height:54px;margin:0 -16px;padding:0 16px;list-style:none;cursor:pointer}
.mg-tpl2 .mg-admin-jump[open] .mg-admin-jump-head{margin-bottom:14px;border-bottom:1px dashed #edf0f6}
.mg-tpl2 .mg-admin-jump-head b{flex:none;font-size:15px;font-weight:700;color:#1f2937}
.mg-tpl2 .mg-admin-jump-head b::before{display:none}
.mg-tpl2 .mg-admin-jump-head span{flex:1;min-width:0;font-size:13px;color:#8a94a6;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-tpl2 .mg-admin-jump-head::after{content:'展开 ⌄';flex:none;margin:0;padding:0;border:0;background:none;font-size:13px;font-weight:700;color:#315efb}
.mg-tpl2 .mg-admin-jump[open] .mg-admin-jump-head::after{content:'收起 ⌃'}
.mg-tpl2 .mg-admin-jump-grid label{gap:6px;font-size:13px}
.mg-tpl2 .mg-admin-jump-grid input{min-height:40px;font-size:14px}
.mg-tpl2 .mg-admin-jump p{font-size:12.5px}
.mg-tpl2 .mg-aj-pkg>input{min-height:40px;font-size:14px}
.mg-tpl2 .mg-aj-pkg-n b{font-size:14px}
.mg-tpl2 .mg-aj-pkg-n span{font-size:13px}
.mg-tpl2 .mg-aj-pkg-n em{font-size:12.5px}
/* 解锁按钮颜色：地址 / 文案一排，颜色独占一排横向一行（沿用开关 | 色块即取色器 + 色号 | 预设色点）；开关与取色器不吃上面的 36px 输入框高度 */
.mg-tpl2 .mg-admin-jump-grid{grid-template-columns:minmax(0,1fr) minmax(0,280px);gap:12px 14px}
.mg-tpl2 .mg-admin-jump-grid .mg-ac-field{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;min-width:0}
.mg-tpl2 .mg-ac-lb{font-size:13px;font-weight:700;color:#59677c}
.mg-tpl2 .mg-admin-color{flex-direction:row;flex-wrap:wrap;align-items:center;gap:10px 16px;min-height:40px;box-sizing:border-box;padding:7px 14px;border:1px solid var(--mg-line);border-radius:10px;background:#fff}
.mg-tpl2 .mg-admin-color .mg-ac-def{flex-direction:row;gap:8px;font-size:13px;font-weight:600;color:#1f2937}
.mg-tpl2 .mg-admin-color .mg-ac-def input,.mg-tpl2 .mg-aj-color .mg-ac-def input{width:34px;height:20px;min-height:0;padding:0;border:0;border-radius:999px;box-shadow:none}
.mg-tpl2 .mg-admin-color .mg-ac-def input::after,.mg-tpl2 .mg-aj-color .mg-ac-def input::after{top:3px;left:3px;width:14px;height:14px}
.mg-tpl2 .mg-admin-color .mg-ac-def input:checked::after,.mg-tpl2 .mg-aj-color .mg-ac-def input:checked::after{left:17px}
.mg-tpl2 .mg-admin-color .mg-ac-row{gap:8px;padding-left:14px;border-left:1px solid #edf0f6}
.mg-tpl2 .mg-admin-color .mg-ac-sw{position:relative;width:26px;height:26px;border-radius:8px;overflow:hidden;cursor:pointer}
.mg-tpl2 .mg-admin-color .mg-ac-sw input[type=color]{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;border:0;opacity:0;cursor:pointer}
.mg-tpl2 .mg-admin-color .mg-ac-hex{min-width:66px;font-size:13px;white-space:nowrap}
.mg-tpl2 .mg-admin-color .mg-ac-presets{gap:8px;padding-left:14px;border-left:1px solid #edf0f6}
.mg-tpl2 .mg-admin-color .mg-ac-presets i{width:20px;height:20px}
.mg-tpl2 .mg-admin-color .mg-ac-presets i.on{box-shadow:0 0 0 2px #fff,0 0 0 4px #315efb}
/* 沿用默认色时：色块与色号变淡、色块不可点；色点仍可点，点了自动关掉沿用 */
.mg-tpl2 .mg-admin-color.def .mg-ac-sw{opacity:.45;cursor:not-allowed}
.mg-tpl2 .mg-admin-color.def .mg-ac-sw input[type=color]{cursor:not-allowed}
.mg-tpl2 .mg-admin-color.def .mg-ac-hex{color:#8a94a6}
.mg-tpl2 .mg-admin-color.def .mg-ac-presets{opacity:.6;pointer-events:auto}
.mg-tpl2 .mg-admin-color.def .mg-ac-presets:hover{opacity:1}
.mg-tpl2 fieldset:disabled .mg-admin-color .mg-ac-presets{pointer-events:none}
.mg-tpl2 fieldset:disabled .mg-admin-color .mg-ac-def{cursor:default}
.mg-tpl2 .mg-admin-jump fieldset:disabled .mg-admin-jump-grid{opacity:.72}
@media(max-width:760px){.mg-tpl2 .mg-admin-jump-grid{grid-template-columns:1fr}.mg-tpl2 .mg-admin-color .mg-ac-presets{padding-left:0;border-left:0}}
.mg-tpl2 .mg-admin-jump>.mg-f-tip{margin:0 0 8px}

/* 开关行 + 小开关 */
.mg-tpl2 .mg-swrow{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0;padding:12px 0;font-size:14px;font-weight:400;color:#1f2937}
.mg-tpl2 .mg-swrow+.mg-swrow{border-top:1px dashed #edf0f6}
.mg-tpl2 .mg-swrow:first-child{padding-top:0}
.mg-tpl2 .mg-swrow:last-child{padding-bottom:0}
.mg-tpl2 .mg-swrow>div,.mg-tpl2 .mg-swrow>span{min-width:0}
.mg-tpl2 .mg-swrow b{display:block;font-size:14px;font-weight:700;color:#1f2937}
.mg-tpl2 .mg-swrow small{display:block;margin-top:2px;font-size:12.5px;font-weight:400;line-height:1.5;color:#8a94a6}
.mg-tpl2 label.mg-swrow{cursor:pointer}
.mg-tpl2 input.mg-sw{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:34px;height:20px;min-height:0;margin:0;padding:0;border:0;border-radius:999px;background:#d6dce7;cursor:pointer;box-shadow:none;transition:background .18s}
.mg-tpl2 input.mg-sw::after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.2);transition:left .18s}
.mg-tpl2 input.mg-sw:checked{background:#315efb}
.mg-tpl2 input.mg-sw:checked::after{left:17px}
.mg-tpl2 input.mg-sw:focus{box-shadow:0 0 0 3px rgba(49,94,251,.16)}

/* 「售后」：投诉 / 客服入口改成开关行，右侧下拉；默认客服二维码 72px 小方块 */
.mg-tpl2 .mg-svc-list .mg-svc-mode{flex-direction:row;align-items:center;padding:12px 0;border:0;border-radius:0;background:transparent;box-shadow:none}
.mg-tpl2 .mg-svc-list .mg-svc-mode+.mg-swrow{border-top:1px dashed #edf0f6}
.mg-tpl2 .mg-svc-list .mg-svc-mode:first-child{padding-top:0}
.mg-tpl2 .mg-svc-list .mg-svc-select{flex:0 0 250px;width:250px;height:40px;min-height:40px;margin:0;padding:0 34px 0 12px;border-radius:10px;background-position:right 12px center;font-size:14px}
.mg-tpl2 .mg-kfq{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;align-items:start}
.mg-tpl2 .mg-kfq .mg-kf-thumb{flex:none;width:88px;height:88px;border:1.5px dashed #c9d5f5;border-radius:10px;background:#fff}
.mg-tpl2 .mg-kfq .mg-kf-thumb:has(img){border-style:solid;border-color:#e3e8f2}
.mg-tpl2 .mg-kfq .mg-kf-empty{gap:4px;font-size:12.5px}
.mg-tpl2 .mg-kfq .mg-kf-empty b{width:28px;height:28px;font-size:18px}
.mg-tpl2 .mg-kfq .mg-kf-thumb>span:not(.mg-kf-empty){padding:0 4px;font-size:12px;line-height:1.4}
.mg-tpl2 .mg-kfq .mg-kf-pick:has(img)::after{padding:4px 0;font-size:12px}
.mg-tpl2 .mg-kfq-f{display:flex;flex-direction:column;gap:10px;min-width:0}
.mg-tpl2 .mg-kfq-f .mg-f-tip{margin:0}
.mg-tpl2 .mg-kf-inrow{display:flex;gap:8px}
.mg-tpl2 .mg-kf-inrow button{height:40px;min-height:40px;padding:0 18px;border-radius:10px;font-size:14px}
.mg-tpl2 #tplKfState.ok{color:#16a34a;font-weight:700}
.mg-tpl2 #tplKfState.warn{color:#ea580c;font-weight:700}
.mg-tpl2 .mg-cfold .mg-svc-icon{margin:0}
.mg-tpl2 .mg-cfold .mg-svc-icon+.mg-svc-icon{margin-top:8px}
.mg-tpl2 .mg-kf-crow .del{flex-basis:40px;width:40px;min-height:40px;height:40px}
.mg-tpl2 .mg-kf-crow .pick,.mg-tpl2 .mg-kf-crow .lb{font-size:14px}
.mg-tpl2 .mg-kf-cadd{min-height:40px;font-size:14px}
.mg-tpl2 .mg-svc-note{margin-top:4px}
.mg-tpl2 .mg-bgm-box .mg-muted{margin:0}

/* 字号兜底：内容区里沿用旧组件样式的 9–12px 文字统一抬一档——提示 12.5px、标签 / 次要按钮 13px、正文与输入 14px */
.mg-tpl2 .mg-pane :is(input:not([type=checkbox],[type=radio],[type=color],[type=range]),select,textarea){font-size:14px}
.mg-tpl2 .mg-pane :is(small,.mg-f-tip,.mg-muted,.mg-svc-note,.mg-kf-cnote,.mg-kf-cadd em,.mg-rte-foot>span,.mg-rte-foot>em,.comp-tips ul,.comp-tips-id,.mg-svc-icon-txt small,.mg-kf-empty){font-size:12.5px}
.mg-tpl2 .mg-pane :is(.comp-fields label,.mg-opt-sub>label,.mg-opt-inline,.mg-rte-lb,.comp-pkg-entry>span,label.mg-switch>span,.comp-checks .mg-switch,.comp-size>b,.comp-size>button,.mg-rte-seg>button,.mg-rte-sel>b,.mg-rte-cl b,.mg-rte-def,.comp-pay-prev,.comp-tips>summary,.mg-adv-css>summary,.mg-theme-item em,.mg-theme-item button,.mg-svc-icon button,.comp-affix>i,.comp-affix>em,.mg-fold-sum .chip,.mg-fold-sum>span,.mg-fold-sum>em){font-size:13px}
.mg-tpl2 .mg-pane :is(.mg-opt-tx>b,.mg-theme-item>span,.mg-svc-icon-txt b,.mg-theme-box>b,.mg-display-opts>b,.mg-kf-label){font-size:14px}
.mg-tpl2 .mg-pane .mg-svc-icon button{min-height:34px;padding:0 14px}
.mg-tpl2 .mg-pane .mg-theme-item button{height:30px;padding:0 12px}
.mg-tpl2 .mg-pane .mg-theme-item{padding:12px 16px}
.mg-tpl2 .mg-pane label.mg-theme-item>input[type=color]{width:48px;height:32px;min-height:32px}
.mg-tpl2 .mg-pane .mg-who small,.mg-tpl2 .mg-pane .mg-addbar>small{font-size:13px}

/* 「管理代理」小弹窗：勾选网格改工作台蓝 */
#tplGrantMask .mg-scope-users{margin-top:0}
#tplGrantMask .mg-grant-users{max-height:min(52vh,420px)}
#tplGrantMask .mg-grant-chip:hover{border-color:#bfd0ff;background:#f8faff}
#tplGrantMask .mg-grant-chip.on{border-color:#93b0ff;background:#f1f5ff;box-shadow:0 4px 12px -8px rgba(49,94,251,.6)}
#tplGrantMask .mg-grant-chip.on .ck{background:#315efb}
#tplGrantMask .mg-grant-chip.on .tx b{color:#2448c9}
#tplGrantMask .mg-grant-count b{color:#315efb}
#tplGrantMask .mg-grant-acts button:hover{border-color:#bfd0ff;background:#f1f5ff;color:#315efb}
#tplGrantMask .mg-grant-acts button.on{background:#315efb;color:#fff}

/* 右栏不到 ~600px 时（981–1180 双栏、平板单栏）：「有 N 处修改未保存」单独一行，按钮不被挤出 */
@media(max-width:1180px){
  .mg-tpl2 .mg-tpl-foot{flex-wrap:wrap;row-gap:8px}
  .mg-tpl2 .mg-tpl-foot .mg-dirty,.mg-tpl2 .mg-tpl-foot .hint{flex:1 1 100%;order:-1}
}
/* 手机 / 触屏拖不动：隐藏 ⠿，改用 ↑ ↓ */
@media(max-width:640px),(hover:none){
  .mg-tpl2 .mg-crow .dr{display:none}
  .mg-tpl2 .mg-crow .ops .mv{display:flex}
  .mg-tpl2 .mg-pane-hint .mg-hint-pc{display:none}
  .mg-tpl2 .mg-pane-hint .mg-hint-touch{display:inline}
  .mg-tpl2 .comp-insert-btn{opacity:.8}
}
@media(max-width:980px){
  .editor-dialog.tpl-editor.mg-tpl2{height:94vh}
  .tpl-editor.mg-tpl2 .editor-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .mg-tpl2 .mg-preview-side.mg-tpv{max-height:40vh;border-right:0;border-bottom:1px solid #edf0f6}
  .mg-tpl2 .mg-tpv .phone-screen{height:300px;min-height:0}
}
@media(max-width:640px){
  .mg-tpl2 .mg-g2,.mg-tpl2 .mg-comp-item .comp-fields.is-img{grid-template-columns:minmax(0,1fr)}
  .mg-tpl2 .mg-tabs{padding:8px 12px 0}
  .mg-tpl2 .mg-tabs button{padding:8px 10px 10px;font-size:13px}
  .mg-tpl2 .mg-pane{padding:12px}
  /* 手机：预览压矮给编辑区让位；底栏隐藏「取消」（右上角 × 同效），提示单独一行，三个按钮一排放下 */
  .mg-tpl2 .mg-preview-side.mg-tpv{max-height:30vh;padding:10px 12px}
  .mg-tpl2 .mg-tpv .phone-screen{height:200px}
  .mg-tpl2 .mg-tpl-pvtip{display:none}
  .mg-tpl2 .mg-tpl-foot{flex-wrap:wrap;gap:8px;padding:10px 12px}
  .mg-tpl2 .mg-tpl-foot .sp,.mg-tpl2 .mg-tpl-foot .mg-btn[onclick^="closeMask"]{display:none}
  .mg-tpl2 .mg-tpl-foot .mg-dirty,.mg-tpl2 .mg-tpl-foot .hint{flex:1 1 100%;order:-1}
  .mg-tpl2 .mg-tpl-foot .mg-btn{flex:1 1 auto;padding:0 10px}
  .mg-tpl2 .mg-crow{gap:8px;padding:0 10px}
  /* 手机：组件行 5 个小按钮沿用紧凑尺寸，给摘要留出宽度 */
  .mg-tpl2 .mg-crow{height:54px}
  .mg-tpl2 .mg-citem.open>.mg-crow{height:52px}
  .mg-tpl2 .mg-crow .tp{min-width:0;font-size:14px}
  .mg-tpl2 .mg-crow .ops{gap:4px}
  .mg-tpl2 .mg-crow .ops button{width:28px;height:28px;min-height:28px;font-size:13px}
  .mg-tpl2 .mg-crow .th,.mg-tpl2 .mg-crow .go{display:none}
  .mg-tpl2 .mg-svc-list .mg-svc-mode{flex-wrap:wrap}
  .mg-tpl2 .mg-svc-list .mg-svc-select{flex:1 1 100%;width:100%}
}

/* 入口换绑 / 解绑确认框：原入口、新入口各占一行，长地址折行不撑宽 */
.editor-dialog.mg-entry-ask{width:min(480px,100%)}
.mg-entry-ask-rows{display:grid;gap:8px}
.mg-entry-ask-rows>div{display:grid;gap:3px;padding:10px 12px;border:1px solid #e5e9f2;border-radius:10px;background:#f8fafc}
.mg-entry-ask-rows>div.is-new{border-color:#c7d7fe;background:#f3f6ff}
.mg-entry-ask-rows span{font-size:12px;color:#7b8799}
.mg-entry-ask-rows b{font-size:13px;font-weight:600;color:#1f2937;word-break:break-all}
.mg-entry-ask .editor-foot{margin-top:18px;justify-content:flex-end}

/* 专属服务费：结算规则里一行入口 + 管理弹窗 + 设置弹窗 + 用户明细「服务费」列，尺寸与后台表单 / 表格一致 */
.mg-rate-scope{font-style:normal;font-weight:400;color:#68758a}
.mg-user-rate-line{display:flex;align-items:center;gap:10px;min-width:0;height:44px;padding:0 6px 0 14px;border:1px solid #dfe6ff;border-radius:10px;background:#f5f8ff;box-sizing:border-box}
.mg-user-rate-line>b{flex:none;font-size:14px;color:#172033}
.mg-user-rate-line>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:13px}
.mg-user-rate-line em{font-style:normal;font-weight:800;color:#3157d5}
.mg-console #right .finance-config .mg-user-rate-line button,.mg-user-rate-line button{flex:none;width:auto;height:32px;min-height:32px;padding:0 14px;margin:0;border:1px solid #d5dfee;border-radius:7px;background:#fff;color:#3157d5;font-size:13px;font-weight:700;box-shadow:none}
.mg-console #right .finance-config .mg-user-rate-line button:hover,.mg-user-rate-line button:hover{background:#eef3ff;transform:none;filter:none}
.mg-rate-pill{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:#f1f3f7;color:#5d6a80;font-size:12px;font-weight:700;line-height:1.5;white-space:nowrap;vertical-align:middle}
.mg-rate-pill.low{background:#e8f8f1;color:#11865f}
.mg-rate-pill.high{background:#fff3e6;color:#c2610c}
.mg-rate-pill.self{background:#f0edff;color:#6d4fe0;cursor:help}
.mg-rate-pill.vip{background:#eaf0ff;color:#3157d5}
.mg-rate-big{font-size:16px;font-weight:800;color:#3157d5;font-variant-numeric:tabular-nums}
/* 管理弹窗 */
.editor-dialog.mg-user-rate-dialog{width:min(960px,100%)}
.editor-dialog.mg-user-rate-edit{width:min(540px,100%)}
#userRateMask .share-head p b{color:#3157d5}
#userRateMask .editor-body,#userRateEditMask .editor-body{padding:18px 20px 6px}
.mg-user-rate-bar{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.mg-user-rate-bar input{flex:0 1 280px;width:280px;height:38px;min-height:38px;padding:7px 10px;margin:0;font-size:14px}
.mg-user-rate-bar>span{color:#64748b;font-size:13px;white-space:nowrap}
.mg-user-rate-bar button{margin-left:auto;flex:none;height:38px;min-height:38px;padding:0 16px;border:1px solid #3157d5;border-radius:8px;background:#3157d5;color:#fff;font-size:14px;font-weight:700;white-space:nowrap;box-shadow:none;cursor:pointer}
.mg-user-rate-bar button:hover{background:#294bbb}
.mg-user-rate-table{max-height:420px;overflow:auto;border-color:#e7ecf4;border-radius:10px}
.mg-user-rate-table table{min-width:820px;font-size:14px}
.mg-user-rate-table th{position:sticky;top:0;z-index:1;font-size:13px;padding:12px 14px;line-height:1.5}
.mg-user-rate-table td{font-size:14px;padding:14px;line-height:1.6;white-space:nowrap}
.mg-user-rate-table td b{font-size:14px}
.mg-user-rate-table td .mg-cell-sub{display:block;margin-top:2px;font-size:12px;color:#64748b}
.mg-user-rate-table td.mg-rate-remark{white-space:normal;min-width:140px;max-width:220px;overflow-wrap:anywhere}
.mg-user-rate-table .op-row{display:flex;gap:6px;width:max-content}
.mg-user-rate-table .op-btn,.mg-user-fee .op-btn{display:inline-flex;align-items:center;justify-content:center;height:32px;min-height:32px;padding:0 12px;margin:0;border:1px solid #d5dfee;border-radius:7px;background:#fff;color:#3157d5;font-size:13px;line-height:1.5;box-shadow:none}
.mg-user-rate-table .op-btn.primary{background:#3157d5;border-color:#3157d5;color:#fff}
.mg-user-rate-table .op-btn:hover:not(.primary){background:#f1f5ff;transform:none}
.mg-user-rate-table .op-btn.primary:hover{background:#294bbb;filter:none;transform:none}
.mg-user-rate-note{margin:12px 0 0;font-size:12px;line-height:1.7;color:#8a94a6}
#userRateMask .editor-dialog>.editor-foot,#userRateEditMask .editor-dialog>.editor-foot{margin:0;padding:14px 20px 18px;gap:10px}
#userRateMask .editor-foot>span:first-child{font-size:12px;color:#8a94a6}
#userRateMask .foot-actions,#userRateEditMask .foot-actions{display:flex;gap:8px;margin-left:auto}
#userRateEditMask #userRateDelBtn[hidden]{display:none!important}
/* 设置弹窗 */
#userRateEditMask label.mg-block{display:block;margin:0 0 14px;font-size:14px;font-weight:600;color:#334155}
#userRateEditMask label.mg-block input{display:block;width:100%;height:42px;min-height:42px;margin-top:6px;padding:8px 12px;font-size:14px;font-weight:400}
#userRateEditMask label.mg-block input:disabled{background:#f5f7fb;color:#334155;cursor:not-allowed}
.mg-user-rate-pick{position:relative}
.mg-user-rate-pick ul{position:absolute;left:0;right:0;top:100%;z-index:3;max-height:240px;overflow:auto;margin:4px 0 0;padding:4px;list-style:none;background:#fff;border:1px solid #dbe2ee;border-radius:9px;box-shadow:0 8px 20px rgba(15,23,42,.1);font-weight:400}
.mg-user-rate-pick ul[hidden]{display:none}
.mg-user-rate-pick li{padding:9px 12px;border-radius:7px;cursor:pointer;font-size:14px;color:#172033}
.mg-user-rate-pick li:hover{background:#f1f5ff}
.mg-user-rate-pick li small{margin-left:8px;color:#68758a;font-size:12px}
.mg-user-rate-pick li.empty{cursor:default;color:#8a94a6}.mg-user-rate-pick li.empty:hover{background:transparent}
.mg-user-rate-calc{padding:14px 16px;border-radius:10px;background:#f7f9fc;border:1px dashed #d4dcea;font-size:14px;line-height:1.9;color:#334155}
.mg-user-rate-calc b{font-size:16px}.mg-user-rate-calc b.p{color:#3157d5}.mg-user-rate-calc b.g{color:#11865f}
.mg-user-rate-warn{min-height:18px;margin:8px 0 0;font-size:12px;line-height:1.6;color:#c2610c}
/* 用户明细「服务费」列 */
.mg-console #right .mg-admin-users-table td.mg-user-fee{white-space:nowrap}
.mg-user-fee{white-space:nowrap}
.mg-user-fee .mg-rate-pill{margin-right:8px}
.mg-console #right .table-wrap .mg-user-fee .op-btn.mg-rate-edit,.mg-user-fee .op-btn.mg-rate-edit{height:28px;min-height:28px;padding:0 10px;vertical-align:middle}
@media(max-width:760px){.mg-user-rate-bar{flex-wrap:wrap}.mg-user-rate-bar input{flex:1 1 100%;width:100%}.mg-user-rate-bar button{margin-left:0}}

/* ===== 20261103-ui29：经营总览 / 支付后设置改版（与 _qp_preview 1:1 预览 v29 同一套样式） ===== */
/* 顶部「支付后设置」状态点：绿 = 已配齐，红 = 还有按钮没设置 */
.mg-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#11b47e;box-shadow:0 0 0 3px rgba(17,180,126,.15)}
.mg-dot.off{background:#e11d48;box-shadow:0 0 0 3px rgba(225,29,72,.14)}
/* 三张设置卡：#dbe3f0 边框 / 浅蓝标签块，已设置 = 蓝（key），待设置 = 红（todo） */
.mg-tplsel-main{container-type:inline-size}
.mg-setcards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.mg-setcard{display:flex;flex-direction:column;gap:8px;min-width:0;padding:10px 10px 11px;border:1px solid #dbe3f0;border-radius:10px;background:#fff}
.mg-setcard-h{display:flex;align-items:center;gap:7px;min-width:0}
.mg-setcard-h>span{display:grid;place-items:center;width:30px;height:30px;flex:0 0 auto;border-radius:8px;background:#edf2ff;color:#315efb;font-size:11px;font-weight:800}
.mg-setcard-h>b{min-width:0;font-size:13px;font-weight:700;color:#2f3c50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-setcard-h>em{margin-left:auto;padding:2px 8px;border-radius:999px;background:#ecfdf5;color:#059669;font-size:11px;font-style:normal;font-weight:800;white-space:nowrap}
.mg-setcard-v{flex:1;display:grid;gap:3px;min-width:0;font-size:12px;line-height:1.55;color:#526177}
.mg-setcard-v>div{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mg-setcard-v code{padding:0;background:none;color:#172033;font:12px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.mg-setcard-v i{display:inline-block;padding:0 8px;border-radius:6px;color:#fff;font-style:normal;font-weight:700;line-height:20px}
.mg-console #right .mg-setcard>button{height:32px;min-height:32px;margin:0;padding:0 10px;border:1px solid #cdd8f8;border-radius:7px;background:#fff;color:#315efb;font-size:13px;font-weight:700;box-shadow:none;cursor:pointer}
.mg-console #right .mg-setcard>button:hover{background:#f5f8ff}
.mg-console #right .mg-setcard>button:disabled{opacity:.6;cursor:not-allowed}
.mg-setcard.key{border-color:#c9d6fb;background:#f7f9ff}
.mg-setcard.key .mg-setcard-h>span{background:#315efb;color:#fff}
.mg-console #right .mg-setcard.key>button{border-color:#315efb;background:#315efb;color:#fff}
.mg-console #right .mg-setcard.key>button:hover{background:#2a52e0}
.mg-setcard.todo{border-color:#f5c2cc;background:#fffafb}
.mg-setcard.todo .mg-setcard-h>span{background:#e11d48;color:#fff}
.mg-setcard.todo .mg-setcard-h>em{background:#fff1f2;color:#e11d48}
.mg-setcard.todo .mg-setcard-v{color:#b8324d}
.mg-console #right .mg-setcard.todo>button{border-color:#e11d48;background:#e11d48;color:#fff}
@container (max-width:520px){
  .mg-setcards{grid-template-columns:1fr}
  .mg-setcard{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 10px}
  .mg-setcard-h{grid-column:1/-1}
  .mg-setcard-v{padding-left:37px}
}
/* 余下 4 个卡片按钮一行排开；中间 1px 一列是「暂停 / 删除」前的分隔线 */
body.mg-console.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 1px minmax(0,1fr) minmax(0,1fr)}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{grid-column:auto}
@container (max-width:520px){body.mg-console.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:1fr 1fr}}
/* 卡片按钮：图标 + 标题 + 一行说明，暂停 / 删除也左对齐 */
body.mg-console.mg-user-console #right #overview .mg-manage-actions{gap:10px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{min-height:64px;padding:11px 13px;gap:10px;justify-content:flex-start}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>span{width:36px;height:36px;flex:0 0 auto;font-size:12px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b{display:grid;gap:2px;min-width:0;font-size:14px;font-weight:700}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b>small{overflow:hidden;font-size:12px;font-weight:500;color:#7a879a;white-space:nowrap;text-overflow:ellipsis}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.pause>b>small{color:#b7791f}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.danger>b>small{color:#d06a7f}
@container (max-width:520px){
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{min-height:56px;padding:10px 11px;gap:8px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>span{width:32px;height:32px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b>small{display:none}
}
/* 推广管理整块放大一档，与左侧手机预览齐平：设置卡按钮 40、链接行 44、分享按钮 56、底部卡片 76 */
body.mg-console.mg-user-console #right #overview .mg-tplsel-main{gap:14px}
body.mg-console .mg-setcards{gap:12px}
body.mg-console .mg-setcard{gap:10px;padding:14px;border-radius:12px}
body.mg-console .mg-setcard-h{gap:9px}
body.mg-console .mg-setcard-h>span{width:34px;height:34px;border-radius:9px;font-size:12px}
body.mg-console .mg-setcard-h>b{font-size:14px}
body.mg-console .mg-setcard-h>em{padding:3px 9px;font-size:12px}
body.mg-console .mg-setcard-v{gap:4px;font-size:13px}
body.mg-console .mg-setcard-v code{font-size:13px}
body.mg-console .mg-setcard-v i{line-height:22px}
body.mg-console.mg-console #right .mg-setcard>button{height:40px;min-height:40px;border-radius:9px;font-size:14px}
body.mg-console.mg-user-console #right #overview #tplSelLinkUrl{min-height:44px;padding:10px 12px;border-radius:10px;font-size:13px}
body.mg-console.mg-user-console #right #overview .mg-tplsel-link>button{height:44px;min-height:44px;padding:0 20px;border-radius:10px;font-size:14px}
body.mg-console.mg-user-console #right #overview .mg-tplsel-gen{height:56px;min-height:56px;border-radius:12px;font-size:16px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions{gap:12px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{min-height:92px;padding:14px 15px;gap:12px;border-radius:12px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>span{width:44px;height:44px;border-radius:11px;font-size:13px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b{gap:5px;font-size:16px}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b>small{font-size:13px}
/* 卡片边框加深 + 轻阴影，悬停描边变色，跟白底拉开层次 */
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{border-color:#cdd8ea;box-shadow:0 1px 3px rgba(15,23,42,.07);transition:border-color .15s,box-shadow .15s}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button:hover:not(:disabled){border-color:#8fa8f5;box-shadow:0 4px 14px rgba(49,94,251,.13)}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.pause{border-color:#efd29a}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.pause.on{border-color:#a3dcb8}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.danger{border-color:#efc3cd}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.pause:hover:not(:disabled){border-color:#e3b55c;box-shadow:0 4px 14px rgba(194,120,3,.13)}
body.mg-console.mg-user-console #right #overview .mg-manage-actions>button.danger:hover:not(:disabled){border-color:#e39aab;box-shadow:0 4px 14px rgba(210,61,89,.13)}
/* 中等宽度：卡片空间不够，改两行两列，图标保留但标题完整；分隔线变整行「谨慎操作」（见文件末尾） */
@container (max-width:1100px){
  body.mg-console.mg-user-console #right #overview .mg-manage-actions{grid-template-columns:1fr 1fr}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{min-height:80px}
}
@container (max-width:520px){
  body.mg-console .mg-setcard-v{padding-left:43px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{min-height:72px;padding:12px;gap:10px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>span{width:36px;height:36px;font-size:13px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>b{font-size:14px}
}
/* 状态条：待设置 = 浅红底 + 红色感叹号圆；暂停 / 停用 = 琥珀；未生成 = 浅蓝（配齐时整条收起，状态并进项目卡） */
body.mg-console.mg-user-console #right #overview .mg-tplsel-manage{padding:13px 14px;border-color:#a7e3c6;border-radius:11px;background:#effbf5}
body.mg-console.mg-user-console #right #overview .mg-tplsel-manage:has(>.mg-manage-head.todo){border-color:#f8c4cf;background:#fff4f6}
body.mg-console.mg-user-console #right #overview .mg-tplsel-manage:has(>.mg-manage-head.warn){border-color:#f3dfb8;background:#fffaf0}
body.mg-console.mg-user-console #right #overview .mg-tplsel-manage:has(>.mg-manage-head.draft),body.mg-console.mg-user-console #right #overview .mg-tplsel-manage:has(>.mg-manage-empty){border-color:#dbe3f0;background:#f7f9ff}
body.mg-console.mg-user-console #right #overview .mg-manage-head{grid-template-columns:minmax(0,1fr) auto}
body.mg-console.mg-user-console #right #overview .mg-manage-head>span{padding-left:36px;color:#0f6b4a;font-size:14px;font-weight:700;line-height:24px}
body.mg-console.mg-user-console #right #overview .mg-manage-head>span::before{content:'✓';left:0;top:0;display:grid;place-items:center;width:24px;height:24px;color:#fff;font-size:14px;font-weight:800;line-height:1;box-shadow:0 0 0 4px rgba(17,180,126,.16)}
body.mg-console.mg-user-console #right #overview .mg-manage-head.todo>span{color:#b4183d}
body.mg-console.mg-user-console #right #overview .mg-manage-head.todo>span::before{content:'!';box-shadow:0 0 0 4px rgba(225,29,72,.14)}
body.mg-console.mg-user-console #right #overview .mg-manage-head.warn>span{color:#a15c07}
body.mg-console.mg-user-console #right #overview .mg-manage-head.warn>span::before{content:'!';box-shadow:0 0 0 4px rgba(232,149,43,.18)}
body.mg-console.mg-user-console #right #overview .mg-manage-head.draft>span{color:#2f3c50}
body.mg-console.mg-user-console #right #overview .mg-manage-head.draft>span::before{content:'i';box-shadow:0 0 0 4px rgba(49,94,251,.14)}
body.mg-console.mg-user-console #right #overview .mg-manage-head.todo>button{height:36px;min-height:36px;padding:0 16px;border-color:#e11d48;border-radius:9px;background:#e11d48;color:#fff;font-size:14px}
body.mg-console.mg-user-console #right #overview .mg-manage-head>button{height:36px;min-height:36px;padding:0 16px;border-radius:9px;font-size:14px}
/* 窄卡（手机）：说明占满一行，按钮换到下面，免得文字被挤成五六行 */
@container (max-width:420px){
  body.mg-console.mg-user-console #right #overview .mg-manage-head{grid-template-columns:1fr}
  body.mg-console.mg-user-console #right #overview .mg-manage-head>button{justify-self:start;margin-left:36px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button{justify-content:center;padding:12px 8px;min-height:64px}
  body.mg-console.mg-user-console #right #overview .mg-manage-actions>button>span{display:none}
}
/* 未设置时分享按钮变红，点了直接弹设置 */
.mg-user-console #right #overview .mg-tplsel-gen.mg-gen-todo{background:#e11d48;box-shadow:0 9px 20px rgba(225,29,72,.22)}
/* 支付后设置弹窗：880 → 1080 宽，左边表单、右边「访客视角」手机 */
#payCfgMask .editor-dialog{width:min(1080px,100%)!important}
.editor-body.mg-pcv-two{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
.editor-body.mg-pcv-two>.editor-foot{grid-column:1/-1}
.mg-pcv-two>#payCfgForm{min-width:0}
.mg-pcv{display:none}
.mg-pcv-two .mg-pcv{display:block;position:sticky;top:0}
/* 两步切换做成步骤条，当前步实心蓝底 */
.mg-pcv-seg{display:flex;align-items:center;gap:6px;margin-bottom:12px}
.mg-pcv-seg>span{flex:none;color:#8a99b0;font-size:22px;font-weight:800;line-height:1}
.mg-console .mg-pcv-seg button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;min-height:42px;margin:0;padding:0 8px;border:1px solid #dbe3f0;border-radius:10px;background:#fff;color:#334155;font-size:14px;font-weight:700;box-shadow:none;cursor:pointer;white-space:nowrap}
.mg-console .mg-pcv-seg button>i{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:50%;background:#edf2ff;color:#315efb;font-size:12px;font-style:normal;font-weight:800}
.mg-console .mg-pcv-seg button:hover{border-color:#b9c7e6;background:#f8faff}
.mg-console .mg-pcv-seg button.on{border-color:#315efb;background:#315efb;color:#fff;box-shadow:0 6px 14px rgba(49,94,251,.24)}
.mg-console .mg-pcv-seg button.on>i{background:#fff;color:#315efb}
/* 手机框 340 宽，高度随窗口收放 */
.mg-pcv .phone{width:340px;margin:0 auto;padding:8px;border-radius:34px;background:#182033;box-shadow:0 16px 36px rgba(21,28,48,.2)}
.mg-pcv .phone-screen{height:clamp(440px,calc(100vh - 402px),640px);border-radius:27px;overflow:hidden;background:#fff}
.mg-pcv iframe{display:block;width:100%;height:100%;border:0;background:#eef2f8}
.mg-pcv .mg-pv-cap{margin-top:8px}
/* 右侧手机已经能看到解锁按钮，主卡片里那颗「解锁后」小按钮不重复显示；没改动时底部「未保存」行收起 */
.mg-pcv-two .mg-paycfg-item>.mg-paycfg-foot .mg-paycfg-preview{display:none}
.mg-pcv-two .mg-paycfg-item>.mg-paycfg-foot{justify-content:flex-end}
.mg-pcv-two .mg-paycfg-item:not(.dirty)>.mg-paycfg-foot{display:none}
@media(max-width:860px){.editor-body.mg-pcv-two{grid-template-columns:1fr}.mg-pcv-two .mg-pcv{position:static}.mg-pcv .phone{width:min(340px,100%)}.mg-pcv .phone-screen{height:560px}}
/* 进群地址后面加「测试打开」，与输入框同高 */
.mg-urlrow{display:flex;align-items:stretch;gap:8px;margin-bottom:8px}
.mg-urlrow>input{flex:1;min-width:0;margin:0}
.mg-console .mg-urlrow>button{flex:none;height:auto;min-height:42px;margin:0;padding:0 14px;border:1px solid #cdd8f8;border-radius:10px;background:#fff;color:#315efb;font-size:13px;font-weight:700;box-shadow:none;cursor:pointer}
.mg-console .mg-urlrow>button:hover{background:#f5f8ff}
.mg-urlrow>input.mg-url-err{border-color:#e11d48;box-shadow:0 0 0 3px rgba(225,29,72,.12)}
/* 常用颜色：圆点 + 名称的小胶囊，选中描蓝边 */
.mg-swatches{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:14px}
.mg-swatches>span{margin-right:2px;font-size:14px;font-weight:700;color:#2f3c50}
.mg-console .mg-swatches button{display:inline-flex;align-items:center;gap:7px;height:36px;margin:0;padding:0 13px 0 8px;border:1px solid #e1e7f0;border-radius:999px;background:#fff;color:#526177;font-size:13px;font-weight:600;box-shadow:none;cursor:pointer}
.mg-console .mg-swatches button>i{width:20px;height:20px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.mg-console .mg-swatches button:hover{border-color:#b9c7e6;background:#f8faff}
.mg-console .mg-swatches button.on{border-color:#315efb;background:#f3f6ff;color:#315efb;box-shadow:0 0 0 2px rgba(49,94,251,.14)}
/* 顶部：「返回功能中心」改成标题左边的返回箭头；统计口径挪到标题旁的小胶囊 */
body.mg-console .mg-back{display:grid;place-items:center;flex:none;width:42px;height:42px;margin-right:-3px;border:1px solid #dce3f0;border-radius:10px;background:#fff;color:#536176;font-size:26px;line-height:1;text-decoration:none}
body.mg-console .mg-back:hover{border-color:#b9c8f8;background:#f5f8ff;color:#315efb;text-decoration:none}
body.mg-console .mg-title-row{display:flex;align-items:center;gap:10px}
body.mg-console #right .mg-title-row .mg-metric-scope{flex-basis:auto;width:auto}
body.mg-console #right .mg-title-row .mg-metric-scope>summary{padding:2px 9px;border:1px solid #e3e8f1;border-radius:999px;font-size:12px;line-height:18px}
body.mg-console #right .mg-title-row .mg-metric-scope>ul{position:absolute;left:0;right:auto;width:360px;max-width:calc(100vw - 48px);margin:0;box-shadow:0 12px 30px rgba(31,47,77,.12)}
/* 「更多设置」下拉：绑定入口 / 继续页文字 / 模板库 */
.mg-moreset-wrap{position:relative;display:inline-flex}
.mg-moreset{position:relative}
.mg-moreset>summary{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 16px 0 18px;border:1px solid #dce3f0;border-radius:10px;background:#fff;color:#536176;font-size:15px;font-weight:700;list-style:none;cursor:pointer;white-space:nowrap;user-select:none}
.mg-moreset>summary::-webkit-details-marker{display:none}
.mg-moreset>summary::after{content:'';width:6px;height:6px;margin-top:-3px;border:solid currentColor;border-width:0 1.8px 1.8px 0;transform:rotate(45deg);transition:transform .15s}
.mg-moreset[open]>summary::after{margin-top:3px;transform:rotate(-135deg)}
.mg-moreset>summary:hover,.mg-moreset[open]>summary{border-color:#b9c8f8;background:#f5f8ff;color:#315efb}
.mg-moreset-menu{position:absolute;left:0;top:calc(100% + 8px);z-index:60;width:268px;padding:6px;border:1px solid #dce3f0;border-radius:12px;background:#fff;box-shadow:0 14px 34px rgba(31,47,77,.16)}
body.mg-console .mg-top-actions .mg-moreset-menu button{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;justify-content:start;gap:1px 10px;width:100%;min-height:0;margin:0;padding:9px 10px;border:0;border-radius:9px;background:transparent;color:#2f3c50;box-shadow:none;text-align:left;transform:none}
body.mg-console .mg-top-actions .mg-moreset-menu button:hover{background:#f5f8ff;color:#315efb}
.mg-moreset-menu button>span{grid-row:1/3;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#edf2ff;color:#315efb;font-size:11px;font-weight:800}
.mg-moreset-menu button>b{font-size:13.5px;font-weight:700}
.mg-moreset-menu button>small{overflow:hidden;color:#7a879a;font-size:12px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}
/* 顶部按钮放大：36 → 42 高，13 → 15 字 */
body.mg-console.mg-user-console .mg-top-actions{gap:10px}
body.mg-console.mg-user-console .mg-top-actions .mg-top-user>button{min-height:42px;padding:0 20px;border-radius:10px;font-size:15px}
@media(max-width:640px){
  body.mg-console .mg-top-actions{flex-wrap:nowrap}
  body.mg-console .mg-moreset-wrap{flex:none}
  body.mg-console .mg-moreset-t2{display:none}
  body.mg-console.mg-user-console .mg-top-actions{gap:6px}
  body.mg-console.mg-user-console .mg-top-actions .mg-top-user>button{min-height:40px;padding:0 10px;font-size:14px;white-space:nowrap}
  body.mg-console .mg-moreset>summary{min-height:40px;padding:0 9px 0 11px;font-size:14px}
  body.mg-console .mg-back{width:38px;height:38px;font-size:24px}
  body.mg-console .mg-topbar-text{gap:10px}
  body.mg-console .mg-topbar-text>.mg-page-icon,body.mg-console .mg-topbar-text>.mg-back{flex:none}
  body.mg-console .mg-page-icon{width:40px;height:40px;border-radius:12px;font-size:18px}
  body.mg-console .mg-title-row{flex-wrap:wrap;gap:2px 8px}
  body.mg-console .mg-title-row h1{white-space:nowrap}
  /* 口径说明弹层按标题区整宽展开，避免超出屏幕 */
  body.mg-console #right .mg-title-row .mg-metric-scope{position:static}
  body.mg-console #right .mg-title-row .mg-metric-scope>ul{left:0;right:0;width:auto;max-width:none}
}
/* 宽度不足 1600：两栏（手机 | 推广管理），收益概览挪到下面整行，左边三项收益、右边佣金比例 */
@media(min-width:901px) and (max-width:1600px){
  body.mg-console.mg-user-console #right #overview .mg-overview-top{grid-template-columns:minmax(300px,340px) minmax(0,1fr)}
  body.mg-console.mg-user-console #right #overview .side-income{grid-column:1/-1}
  body.mg-console.mg-user-console #right #overview .side-income .mg-income-rows{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);column-gap:32px;align-items:start;padding:4px 24px 22px}
  body.mg-console.mg-user-console #right #overview .side-income .mg-irow{grid-column:1;padding:19px 1px;border-bottom:1px solid #eef1f8}
  body.mg-console.mg-user-console #right #overview .side-income .mg-irow:nth-child(3){border-bottom:0}
  body.mg-console.mg-user-console #right #overview .side-income .mg-irate{grid-column:2;grid-row:1/span 3;margin-top:10px;padding:20px 20px 18px;border:1px solid #dfe7fb;border-radius:14px}
}
/* 左边手机跟着页面滚动，始终停在可见位置（面板本身仍和中栏等高） */
body.mg-console.mg-user-console #right #overview .mg-overview-top>.mg-preview-panel{overflow:visible}
body.mg-console.mg-user-console #right #overview .mg-preview-panel .mg-pv-body{position:sticky;top:12px}
/* 项目卡：模板名、价格、状态一行，备注一行 */
.mg-proj{display:grid;gap:10px;padding:13px 14px;border:1px solid #e2e8f2;border-radius:12px;background:#f8fafc}
.mg-proj-h{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;min-width:0}
.mg-proj-h>b{min-width:0;color:#172033;font-size:15px;font-weight:800}
.mg-proj-h>span{color:#64748b;font-size:13px;white-space:nowrap}
.mg-proj-h>span>em{margin-left:2px;color:#315efb;font-style:normal;font-weight:800}
.mg-proj-h>i{margin-left:auto;display:inline-flex;align-items:center;gap:7px;padding:4px 12px 4px 5px;border-radius:999px;background:#dcf7ea;color:#0f6b4a;font-size:13px;font-style:normal;font-weight:700;white-space:nowrap}
.mg-proj-h>i::before{content:'✓';display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#11b47e;color:#fff;font-size:12px;font-weight:800;line-height:1}
.mg-proj>p{margin:0;padding-top:10px;border-top:1px dashed #dfe5ee;color:#334155;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.mg-proj>p>b{display:inline-block;margin-right:8px;padding:1px 8px;border-radius:6px;background:#315efb;color:#fff;font-size:12px;font-weight:700;line-height:20px}
/* 弹窗提示压成一行，其余放进「?」悬停说明 */
.mg-paycfg-notice.mg-notice1{display:flex;align-items:center;gap:8px}
.mg-paycfg-notice.mg-notice1 b{display:inline;margin:0}
.mg-q{position:relative;display:inline-grid;place-items:center;flex:none;width:18px;height:18px;border-radius:50%;background:rgba(180,83,9,.14);color:#92400e;font-size:12px;font-style:normal;font-weight:800;line-height:1;cursor:help;outline:0}
.mg-q>span{display:none;position:absolute;left:50%;top:calc(100% + 8px);z-index:5;width:330px;max-width:70vw;padding:10px 12px;border-radius:9px;background:#1f2937;color:#fff;font-size:12px;font-weight:500;line-height:1.75;text-align:left;box-shadow:0 12px 26px rgba(15,23,42,.25);transform:translateX(-50%)}
.mg-q:hover>span,.mg-q:focus>span{display:block}
/* 暂停 / 删除前的分隔线；面板窄（两列）时变成整行横线并写上「谨慎操作」 */
.mg-sep{align-self:stretch;margin:8px 0;background:#e2e8f0;font-style:normal}
.mg-sep>em{display:none}
@container (max-width:1100px){
  .mg-sep{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin:0;background:none;color:#a3adbd;font-size:12px;font-weight:600}
  .mg-sep::before,.mg-sep::after{content:'';flex:1;height:1px;background:#e5e9f0}
  .mg-sep>em{display:block;font-style:normal}
}
/* 手机：数据卡横向滑动小卡（「查看」按钮铺满整卡、透明，整张可点）；页签一行，放不下横向滑动 */
@media(max-width:640px){
  body.mg-console.mg-user-console #right #stats{position:relative;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 6px;scrollbar-width:none}
  body.mg-console.mg-user-console #right #stats::-webkit-scrollbar,body.mg-console.mg-user-console #right #userTabs::-webkit-scrollbar{display:none}
  body.mg-console.mg-user-console #right #stats .stat{flex:0 0 43%;display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;min-height:0;padding:12px 12px 11px;scroll-snap-align:start;cursor:pointer}
  body.mg-console.mg-user-console #right #stats .stat .ic{width:32px;height:32px;border-radius:10px}
  body.mg-console.mg-user-console #right #stats .stat .ic svg{width:17px;height:17px}
  body.mg-console.mg-user-console #right #stats .stat .tx{width:100%}
  body.mg-console.mg-user-console #right #stats .stat .tx span{overflow:hidden;margin-bottom:2px;font-size:12px;white-space:nowrap;text-overflow:ellipsis}
  body.mg-console.mg-user-console #right #stats .stat .tx b{font-size:20px}
  body.mg-console.mg-user-console #right #stats .stat .tx small{overflow:hidden;margin-top:2px;font-size:11px;white-space:nowrap;text-overflow:ellipsis}
  body.mg-console.mg-user-console #right #stats .stat .go{position:absolute;top:0;left:0;right:auto;bottom:auto;z-index:2;width:100%;height:100%;min-height:0;padding:0;border-radius:inherit;opacity:0;font-size:0}
  body.mg-console.mg-user-console #right #stats .stat::after{display:block;content:'';position:absolute;right:13px;top:22px;width:7px;height:7px;border:solid #9aa8bf;border-width:2px 2px 0 0;border-radius:0;background:none;opacity:1;transform:rotate(45deg)}
  body.mg-console.mg-user-console #right #userTabs{position:relative;flex-wrap:nowrap;width:100%;overflow-x:auto;scrollbar-width:none}
  body.mg-console.mg-user-console #right #userTabs button{flex:1 0 auto;padding:0 14px;font-size:14px;white-space:nowrap}
}

/* ===== 收益提现 方案B（20261104-payee1）：收款账户 + 自动提现卡、提现弹窗三视图（提现 / 选择账户 / 添加编辑） =====
   弹窗在 #app 外，全局 label/input（13px 粗体、min-height:42px、margin-top:6px）会作用进来；#finance 在 #app 里还要压 ylb.css 的 #app input（margin-bottom、内阴影），这里逐项写回 */
.mg-console #finance [hidden],.mg-console #withdrawMask [hidden]{display:none!important}
.mg-console #finance .mg-payee-row{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px;margin:0 0 14px}
.mg-console #finance .mg-pc{min-width:0;padding:20px 24px;background:#fff;border:1px solid #edf0f5;border-radius:18px;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.mg-console #finance .mg-pc-h{display:flex;align-items:center;gap:10px;min-height:30px;margin-bottom:14px}
.mg-console #finance .mg-pc-h b{font-size:16px;font-weight:800;color:#172033;white-space:nowrap}
.mg-console #finance .mg-pc-h p{min-width:0;margin:0;color:#94a3b8;font-size:12.5px;line-height:1.5}
.mg-console #finance .mg-pc-h .r{display:flex;align-items:center;flex-shrink:0;margin-left:auto}
.mg-console #finance .mg-pc-btn{height:36px;min-height:0;padding:0 16px;border:1px solid #cdd8f8;border-radius:10px;background:#fff;color:#315efb;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s}
.mg-console #finance .mg-pc-btn:hover{background:#f4f7ff}
.mg-pico{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:12px;background:#64748b;color:#fff;font-size:18px;font-weight:800;font-style:normal;line-height:1;flex-shrink:0}
.mg-pico.sm{width:32px;height:32px;border-radius:9px;font-size:13px}
.mg-pico.alipay{background:#1677ff}.mg-pico.wxpay{background:#07c160}.mg-pico.bank{background:#e29a1b}
.mg-pbadge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:800;line-height:1.5;white-space:nowrap}
.mg-pbadge.def{background:#315efb;color:#fff}.mg-pbadge.ok{background:#e3f6ee;color:#11865f}.mg-pbadge.new{background:#fff4e5;color:#c2410c}.mg-pbadge.bad{background:#fdecef;color:#d52c52}
.mg-console #finance .mg-payee{display:flex;align-items:center;gap:14px;min-width:0}
.mg-console #finance .mg-payee .t{flex:1;min-width:0}
.mg-console #finance .mg-payee .t1{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:16px;font-weight:700;color:#233456;line-height:1.5;overflow-wrap:anywhere}
.mg-console #finance .mg-payee .t2{margin-top:5px;color:#94a3b8;font-size:12.5px;line-height:1.6}
.mg-console #finance .mg-payee-empty{display:flex;flex-wrap:wrap;align-items:center;gap:12px 14px;padding:14px 16px;border:1.5px dashed #c9d5f7;border-radius:14px;background:#f8faff;color:#526177;font-size:14px;line-height:1.6}
.mg-console #finance .mg-pc-add{height:38px;min-height:0;margin-left:auto;padding:0 16px;border:0;border-radius:10px;background:#315efb;color:#fff;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.mg-console #finance .mg-pc-add:hover{background:#2a50dc}
.mg-console #finance .mg-sw{position:relative;width:48px;height:26px;min-height:0;padding:0;border:0;border-radius:999px;background:#cbd5e1;cursor:pointer;flex-shrink:0;transition:background .15s}
.mg-console #finance .mg-sw::after{content:'';position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.2);transition:left .15s}
.mg-console #finance .mg-sw.on{background:#11865f}
.mg-console #finance .mg-sw.on::after{left:25px}
.mg-console #finance .mg-sw:disabled{opacity:.6;cursor:progress}
.mg-console #finance .mg-auto{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:#526177;font-size:14px;line-height:1.5}
.mg-console #finance .mg-auto.off{opacity:.45;pointer-events:none}
.mg-console #finance .mg-auto input{width:86px;height:38px;min-height:0;margin:0;padding:0 10px;border:1px solid #dce3ef;border-radius:9px;background:#fff;color:#25324a;font-size:14px;box-shadow:none;-webkit-box-shadow:none}
.mg-console #finance .mg-auto input:focus{border-color:#7695fc;outline:0;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-console #finance .mg-auto input:disabled{background:#fff;color:#25324a}
.mg-console #finance .mg-dd{position:relative;display:inline-flex}
.mg-console #finance .mg-dd-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-width:118px;height:38px;min-height:0;padding:0 12px;border:1px solid #dce3ef;border-radius:9px;background:#fff;color:#25324a;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .15s,box-shadow .15s}
.mg-console #finance .mg-dd-btn:hover{border-color:#a9bcf9}
.mg-console #finance .mg-dd-btn:disabled{opacity:1;cursor:default}
.mg-console #finance .mg-dd.open .mg-dd-btn{border-color:#7695fc;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-console #finance .mg-dd-ar{width:7px;height:7px;margin-top:-4px;border-right:1.6px solid #8a96a8;border-bottom:1.6px solid #8a96a8;transform:rotate(45deg);transition:transform .15s,margin .15s}
.mg-console #finance .mg-dd.open .mg-dd-ar{margin-top:3px;border-color:#315efb;transform:rotate(-135deg)}
.mg-console #finance .mg-dd-menu{position:absolute;left:0;top:calc(100% + 6px);z-index:30;display:none;min-width:100%;width:max-content;padding:6px;border:1px solid #e6ebf3;border-radius:12px;background:#fff;box-shadow:0 14px 34px -10px rgba(15,23,42,.22)}
.mg-console #finance .mg-dd.open .mg-dd-menu{display:block}
.mg-console #finance .mg-dd-menu button{display:flex;align-items:center;gap:12px;width:100%;height:38px;min-height:0;padding:0 10px;border:0;border-radius:8px;background:none;color:#334155;font-size:14px;font-weight:500;text-align:left;cursor:pointer;white-space:nowrap}
.mg-console #finance .mg-dd-menu button:hover{background:#f4f7ff}
.mg-console #finance .mg-dd-menu button small{margin-left:auto;color:#a0a9b7;font-size:12px}
.mg-console #finance .mg-dd-menu button.on{background:#eef3ff;color:#315efb;font-weight:700}
.mg-console #finance .mg-dd-menu button.on::after{content:'✓';margin-left:8px;font-size:13px}
.mg-console #finance .mg-dd-menu button.on small{color:#7d97f0}
.mg-console #finance .mg-auto-note{margin-top:12px;padding:9px 12px;border-radius:10px;background:#f8fafc;color:#94a3b8;font-size:12.5px;line-height:1.6}
.mg-console #finance .mg-auto-note.on{background:#f4fcf8;color:#11865f}
/* 提现记录「方式」列、管理员审核表：自动提现标记 + 脱敏账号 */
.mg-wd-src{display:inline-flex;align-items:center;margin-left:6px;padding:1px 7px;border-radius:999px;background:#eef3ff;color:#315efb;font-size:11.5px;font-weight:700;line-height:1.5;white-space:nowrap;vertical-align:1px}
.mg-console #withdrawAuditList .mg-wd-src{margin:4px 0 0}
.mg-wd-accno{display:block;margin-top:2px;color:#94a3b8;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
/* 弹窗 */
.mg-console #withdrawMask .mg-wd-dlg{width:min(460px,100%);max-height:calc(100vh - 40px);overflow:auto;overscroll-behavior:contain;border-radius:18px;background:#fff;color:#25324a;text-align:left;box-shadow:0 40px 100px -20px rgba(15,23,42,.5)}
.mg-console #withdrawMask .mg-wd-head{display:flex;align-items:flex-start;gap:10px;padding:18px 20px 12px}
.mg-console #withdrawMask .mg-wd-head>div{flex:1;min-width:0}
.mg-console #withdrawMask .mg-wd-head h2{position:relative;margin:0;padding-left:12px;color:#172033;font-size:16px;font-weight:800;line-height:1.5}
.mg-console #withdrawMask .mg-wd-head h2::before{content:'';position:absolute;left:0;top:4px;bottom:4px;width:3px;border-radius:3px;background:#315efb}
.mg-console #withdrawMask .mg-wd-head p{margin:3px 0 0;color:#7b8798;font-size:12px;line-height:1.5}
.mg-console #withdrawMask .mg-wd-x,.mg-console #withdrawMask .mg-wd-back{display:grid;place-items:center;width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:50%;background:#f1f4f9;color:#475569;font-size:18px;line-height:1;cursor:pointer;flex-shrink:0;transition:background .15s,color .15s}
.mg-console #withdrawMask .mg-wd-x:hover,.mg-console #withdrawMask .mg-wd-back:hover{background:#e6ebf3;color:#172033}
.mg-console #withdrawMask .mg-wd-body{padding:4px 20px 20px}
.mg-console #withdrawMask .mg-wd-amt{display:flex;align-items:center;gap:6px;padding:4px 14px;border:1px solid #dce3ef;border-radius:12px;background:#fbfcfe;transition:border-color .15s,box-shadow .15s}
.mg-console #withdrawMask .mg-wd-amt:focus-within{border-color:#7695fc;background:#fff;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-console #withdrawMask .mg-wd-amt em{color:#25324a;font-size:26px;font-style:normal;font-weight:900}
.mg-console #withdrawMask .mg-wd-amt input{flex:1;width:auto;min-width:0;height:54px;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#25324a;font-size:32px;font-weight:900;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}
.mg-console #withdrawMask .mg-wd-amt input::placeholder{color:#c3cbd8}
.mg-console #withdrawMask .mg-wd-amt input::-webkit-inner-spin-button,.mg-console #withdrawMask .mg-wd-amt input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}
.mg-console #withdrawMask .mg-wd-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.mg-console #withdrawMask .mg-wd-chip{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;height:38px;min-height:0;padding:0 8px;border:1px solid #e2e8f2;border-radius:10px;background:#f8faff;color:#334155;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.mg-console #withdrawMask .mg-wd-chip small{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#8a96a8;font-size:11.5px;font-weight:600}
.mg-console #withdrawMask .mg-wd-chip:hover:not(:disabled){border-color:#a9bcf9;background:#fff;color:#315efb}
.mg-console #withdrawMask .mg-wd-chip.on{border-color:#315efb;background:#eef3ff;color:#315efb;box-shadow:0 0 0 3px rgba(49,94,251,.08)}
.mg-console #withdrawMask .mg-wd-chip.on small{color:#5b7cf3}
.mg-console #withdrawMask .mg-wd-chip:disabled{opacity:.45;cursor:not-allowed}
.mg-console #withdrawMask .mg-wd-meta{display:flex;justify-content:space-between;gap:10px;margin-top:8px;color:#8a96a8;font-size:12px;line-height:1.5}
.mg-console #withdrawMask .mg-wd-meta #withdrawAmountHint{text-align:right}
.mg-console #withdrawMask .mg-wd-meta .ok{color:#11865f}.mg-console #withdrawMask .mg-wd-meta .err{color:#d52c52}
.mg-console #withdrawMask .mg-wd-to{display:flex;align-items:center;gap:10px;width:100%;min-height:0;margin-top:16px;padding:12px;border:1px solid #e2e8f2;border-radius:12px;background:#f8faff;color:#233456;text-align:left;cursor:pointer;transition:border-color .15s}
.mg-console #withdrawMask .mg-wd-to:hover{border-color:#a9bcf9}
.mg-console #withdrawMask .mg-wd-to .tx{display:flex;flex:1;flex-direction:column;min-width:0}
.mg-console #withdrawMask .mg-wd-to .lbl{color:#94a0b2;font-size:11.5px;line-height:1.4}
.mg-console #withdrawMask .mg-wd-to .main{margin-top:2px;overflow:hidden;color:#233456;font-size:14px;font-weight:700;line-height:1.5;white-space:nowrap;text-overflow:ellipsis}
.mg-console #withdrawMask .mg-wd-to .arrow{flex-shrink:0;color:#315efb;font-size:13px;font-weight:700;white-space:nowrap}
.mg-console #withdrawMask .mg-wd-tosub{margin-top:7px;color:#11865f;font-size:12px;line-height:1.6}
.mg-console #withdrawMask .mg-wd-tosub.bad{color:#d52c52}
.mg-console #withdrawMask .mg-wd-tosub:empty{display:none}
.mg-console #withdrawMask .mg-wd-more{margin-top:12px;overflow:hidden;border:1px solid #e2e8f2;border-radius:12px;background:#fff}
.mg-console #withdrawMask .mg-wd-more-h{display:flex;align-items:center;gap:8px;width:100%;height:44px;min-height:0;padding:0 12px;border:0;border-radius:0;background:none;color:#233456;text-align:left;cursor:pointer}
.mg-console #withdrawMask .mg-wd-more-h:hover{background:#f8faff}
.mg-console #withdrawMask .mg-wd-more-h i{display:grid;place-items:center;width:24px;height:24px;flex-shrink:0;border-radius:8px;background:#eef3ff;color:#315efb;font-size:12px;font-style:normal}
.mg-console #withdrawMask .mg-wd-more-h b{flex-shrink:0;font-size:13.5px}
.mg-console #withdrawMask .mg-wd-more-h .opt{flex-shrink:0;padding:1px 7px;border-radius:999px;background:#f1f4f9;color:#8a96a8;font-size:11px;font-weight:700}
.mg-console #withdrawMask .mg-wd-more-h em{min-width:0;margin-left:auto;overflow:hidden;color:#a0a9b7;font-size:12px;font-style:normal;white-space:nowrap;text-overflow:ellipsis}
.mg-console #withdrawMask .mg-wd-more-h em.has{color:#526177}
.mg-console #withdrawMask .mg-wd-more-h .arr{flex-shrink:0;color:#94a0b2;font-size:16px;line-height:1;transition:transform .15s}
.mg-console #withdrawMask .mg-wd-more.open .arr{transform:rotate(90deg)}
.mg-console #withdrawMask .mg-wd-more-b{position:relative;padding:0 12px 12px}
.mg-console #withdrawMask .mg-wd-more-b textarea{display:block;width:100%;min-height:66px;margin:0;padding:9px 11px 22px;border:1px solid #dce3ef;border-radius:10px;background:#fbfcfe;box-shadow:none;font-size:13px;line-height:1.6;resize:none}
.mg-console #withdrawMask .mg-wd-more-b textarea:focus{border-color:#7695fc;background:#fff;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-console #withdrawMask .mg-wd-more-b .cnt{position:absolute;right:22px;bottom:18px;color:#a0a9b7;font-size:11px;pointer-events:none}
.mg-console #withdrawMask .mg-wd-go{display:flex;align-items:center;justify-content:center;width:100%;height:46px;min-height:0;margin-top:16px;padding:0 16px;border:0;border-radius:12px;background:linear-gradient(135deg,#8b5cf6,#6366f1 55%,#3b82f6);color:#fff;font-size:15px;font-weight:800;cursor:pointer;box-shadow:0 10px 22px -12px rgba(79,70,229,.7);transition:filter .15s,transform .15s}
.mg-console #withdrawMask .mg-wd-go:hover:not(:disabled){filter:brightness(1.05);transform:translateY(-1px)}
.mg-console #withdrawMask .mg-wd-go:disabled{background:#b8c1d1;box-shadow:none;cursor:not-allowed;transform:none}
.mg-console #withdrawMask #payeeSaveBtn{margin-top:4px}
.mg-console #withdrawMask #payeeSaveBtn:not(:disabled){background:#315efb;box-shadow:0 10px 22px -12px rgba(49,94,251,.7)}
.mg-console #withdrawMask .mg-wd-foot{margin-top:9px;color:#a0a9b7;font-size:12px;text-align:center}
.mg-console #withdrawMask .mg-wd-acc{display:flex;align-items:center;gap:10px;margin-bottom:9px;padding:11px 12px;border:1.5px solid #e2e8f2;border-radius:12px;background:#fff;transition:border-color .15s,background .15s}
.mg-console #withdrawMask .mg-wd-acc.pick{cursor:pointer}
.mg-console #withdrawMask .mg-wd-acc.pick:hover{border-color:#a9bcf9}
.mg-console #withdrawMask .mg-wd-acc.on{border-color:#315efb;background:#f6f8ff}
.mg-console #withdrawMask .mg-wd-acc:focus-visible{outline:2px solid #7892dc;outline-offset:2px}
.mg-console #withdrawMask .mg-wd-acc .radio{width:16px;height:16px;box-sizing:border-box;flex-shrink:0;border:1.5px solid #c3cbd8;border-radius:50%}
.mg-console #withdrawMask .mg-wd-acc.on .radio{border:5px solid #315efb}
.mg-console #withdrawMask .mg-wd-acc .t{flex:1;min-width:0}
.mg-console #withdrawMask .mg-wd-acc .t1{display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:#233456;font-size:13.5px;font-weight:700;line-height:1.5}
.mg-console #withdrawMask .mg-wd-acc .t2{margin-top:2px;color:#94a0b2;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.mg-console #withdrawMask .mg-wd-acc .ops{display:flex;flex-shrink:0;gap:2px}
.mg-console #withdrawMask .mg-wd-acc .ops button{height:28px;min-height:0;padding:0 8px;border:0;border-radius:7px;background:none;color:#7b8798;font-size:12px;cursor:pointer;white-space:nowrap}
.mg-console #withdrawMask .mg-wd-acc .ops button:hover{background:#eef3ff;color:#315efb}
.mg-console #withdrawMask .mg-wd-acc .ops button[data-act=del]:hover{background:#fdecef;color:#d52c52}
.mg-console #withdrawMask .mg-wd-acc .ops button:disabled{opacity:.5;cursor:progress}
.mg-console #withdrawMask .mg-wd-none{padding:18px;color:#94a0b2;font-size:13px;text-align:center}
.mg-console #withdrawMask .mg-wd-add{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:44px;min-height:0;padding:0;border:1.5px dashed #c9d5f7;border-radius:12px;background:#fff;color:#315efb;font-size:13px;font-weight:700;cursor:pointer}
.mg-console #withdrawMask .mg-wd-add:hover{border-color:#9fb4fa;background:#f8faff}
.mg-console #withdrawMask .mg-wd-first{margin-bottom:12px;padding:10px 12px;border:1px solid #cdeedd;border-radius:10px;background:#f4fcf8;color:#11865f;font-size:12.5px;line-height:1.6}
.mg-console #withdrawMask .mg-wd-form{display:grid;gap:12px}
.mg-console #withdrawMask .mg-wd-field{display:block;margin:0;color:#617087;font-size:12.5px;font-weight:600}
.mg-console #withdrawMask .mg-wd-field>span{display:block}
.mg-console #withdrawMask .mg-wd-field input{display:block;width:100%;height:40px;min-height:0;margin:5px 0 0;padding:0 11px;border:1px solid #dce3ef;border-radius:9px;background:#fff;box-shadow:none;color:#25324a;font-size:14px;font-weight:400}
.mg-console #withdrawMask .mg-wd-field input:focus{border-color:#7695fc;outline:0;box-shadow:0 0 0 3px rgba(49,94,251,.09)}
.mg-console #withdrawMask .mg-wd-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:5px}
.mg-console #withdrawMask .mg-wd-types button{height:40px;min-height:0;padding:0;border:1.5px solid #e2e8f2;border-radius:9px;background:#fff;color:#475569;font-size:13px;font-weight:700;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.mg-console #withdrawMask .mg-wd-types button:hover{border-color:#a9bcf9}
.mg-console #withdrawMask .mg-wd-types button.on{border-color:#315efb;background:#f6f8ff;color:#315efb}
.mg-console #withdrawMask .mg-wd-up{display:flex;align-items:center;gap:12px;padding:12px;border:2px dashed #9fb4fa;border-radius:12px;background:#fff;cursor:pointer;transition:background .15s,border-color .15s}
.mg-console #withdrawMask .mg-wd-up:hover{background:#f8faff}
.mg-console #withdrawMask .mg-wd-up:focus-visible{outline:2px solid #7892dc;outline-offset:2px}
.mg-console #withdrawMask .mg-wd-up .pv{display:grid;place-items:center;width:56px;height:56px;flex-shrink:0;border-radius:10px;background:#edf2ff center/cover no-repeat;color:#315efb;font-size:24px}
.mg-console #withdrawMask .mg-wd-up .tx{flex:1;min-width:0}
.mg-console #withdrawMask .mg-wd-up .tx b{display:block;color:#233456;font-size:13.5px}
.mg-console #withdrawMask .mg-wd-up .tx p{margin:3px 0 0;color:#94a0b2;font-size:11.5px;font-weight:400;line-height:1.5}
.mg-console #withdrawMask .mg-wd-up.has-file{border-style:solid;border-color:#86d8ba;background:#f4fcf8}
.mg-console #withdrawMask .mg-wd-up.has-file .tx b{color:#11865f}
.mg-console #withdrawMask .mg-wd-up-x{flex-shrink:0;height:28px;min-height:0;padding:0 10px;border:1px solid #f3c2cc;border-radius:8px;background:#fff;color:#d52c52;font-size:12px;font-weight:700;cursor:pointer}
@media(max-width:980px){.mg-console #finance .mg-payee-row{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){
  .mg-console #finance .mg-pc{padding:16px}
  .mg-console #finance .mg-pc-h{flex-wrap:wrap;row-gap:4px}
  .mg-console #finance .mg-pc-h .r{order:1}
  .mg-console #finance .mg-pc-h p{order:2;flex:1 0 100%}
  .mg-console #finance .mg-pico:not(.sm){width:40px;height:40px;font-size:16px}
  .mg-console #finance .mg-payee .t1{font-size:15px}
  .mg-console #finance .mg-pc-add{width:100%;margin-left:0}
  .mg-console #withdrawMask .mg-wd-dlg{width:100%;max-height:92vh;border-radius:18px 18px 0 0}
  .mg-console #withdrawMask .mg-wd-head{padding:16px 16px 10px}
  .mg-console #withdrawMask .mg-wd-body{padding:4px 16px calc(18px + env(safe-area-inset-bottom))}
  .mg-console #withdrawMask .mg-wd-acc{flex-wrap:wrap}
  .mg-console #withdrawMask .mg-wd-acc .ops{flex-basis:100%;justify-content:flex-end;margin-top:-4px}
}
