/* 子商户后台 - 深色侧栏风格（参考用户提供的 UI） */
body[data-login-role="merchant"] .mp-app{display:flex;min-height:100vh;background:#f5f7fb}
.mp-sidebar{width:212px;flex-shrink:0;background:#101c2f;color:#c3cede;display:flex;flex-direction:column}
.mp-brand{height:62px;display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.mp-logo{width:30px;height:30px;border-radius:8px;background:#2563eb;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px}
.mp-brand-name{color:#fff;font-weight:700;font-size:15px;line-height:1.1}
.mp-brand-sub{font-size:10px;color:#8496ad;margin-top:2px}
.mp-nav-group{padding:18px 14px 4px;font-size:10px;letter-spacing:1px;color:#64748b}
.mp-nav{padding:4px 10px;display:flex;flex-direction:column;gap:2px}
.mp-nav-item{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;color:#a9b8cc;padding:10px 12px;border-radius:8px;font-size:13px;cursor:pointer;text-align:left}
.mp-nav-item:hover{background:rgba(255,255,255,.06);color:#fff}
.mp-nav-item.active{background:#1d4ed8;color:#fff;font-weight:600}
.mp-nav-item svg{width:16px;height:16px;flex-shrink:0}
.mp-side-foot{margin-top:auto;padding:14px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#7f90a6;line-height:1.7}
.mp-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#22c55e;margin-right:6px}
.mp-main{flex:1;min-width:0;display:flex;flex-direction:column}
.mp-topbar{height:54px;background:#fff;border-bottom:1px solid #e6ebf2;display:flex;align-items:center;justify-content:space-between;padding:0 20px;flex-shrink:0}
.mp-menu-btn{border:0;background:transparent;color:#475569;font-size:18px;cursor:pointer;padding:4px 8px;border-radius:6px}
.mp-menu-btn:hover{background:#f1f5f9}
.mp-topbar-right{display:flex;align-items:center;gap:12px}
.mp-user-badge{background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 10px;font-size:12px;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mp-logout{border:1px solid #e2e8f0;background:#fff;color:#64748b;border-radius:6px;padding:6px 10px;font-size:12px;cursor:pointer}
.mp-logout:hover{border-color:#2563eb;color:#2563eb}
.mp-content{padding:20px 24px 48px;flex:1}
.mp-page-head h1{font-size:18px;margin:0 0 4px;color:#0f172a}
.mp-page-desc{font-size:12px;color:#64748b;margin-bottom:16px}
.mp-panel{background:#fff;border:1px solid #e6ebf2;border-radius:10px;padding:18px;margin-bottom:16px}
.mp-panel-title{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between}
.mp-filter{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.mp-field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#475569;min-width:160px}
.mp-field input,.mp-field select{border:1px solid #dbe3ee;border-radius:8px;padding:9px 10px;font-size:13px;background:#fff;color:#0f172a}
.mp-field input:focus,.mp-field select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mp-btn{border:1px solid #dbe3ee;background:#fff;color:#334155;border-radius:8px;padding:9px 14px;font-size:13px;cursor:pointer;white-space:nowrap}
.mp-btn:hover{border-color:#94a3b8}
.mp-btn-primary{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.mp-btn-primary:hover{background:#1d4ed8;border-color:#1d4ed8}
.mp-btn-danger{color:#dc2626;border-color:#fecaca}
.mp-btn-sm{padding:5px 10px;font-size:12px}
.mp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.mp-stat{border-radius:10px;padding:16px 18px;color:#fff;position:relative;overflow:hidden;min-height:96px}
.mp-stat.c-blue{background:linear-gradient(135deg,#0ea5e9,#0284c7)}
.mp-stat.c-green{background:linear-gradient(135deg,#10b981,#059669)}
.mp-stat.c-indigo{background:linear-gradient(135deg,#4f46e5,#4338ca)}
.mp-stat.c-orange{background:linear-gradient(135deg,#f59e0b,#ea580c)}
.mp-stat.c-red{background:linear-gradient(135deg,#f43f5e,#dc2626)}
.mp-stat .label{font-size:12px;opacity:.92}
.mp-stat .value{font-size:27px;font-weight:700;margin-top:8px;line-height:1}
.mp-stat .foot{font-size:11px;opacity:.85;margin-top:8px}
.mp-stat .icon{position:absolute;right:14px;top:14px;font-size:26px;opacity:.35}
.mp-stats-summary{border-bottom:1px solid #eef2f7;padding-bottom:18px;margin-top:0;margin-bottom:18px}
@media(max-width:900px){.mp-stats-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.mp-stats-summary{grid-template-columns:1fr}}
.mp-legend{display:flex;gap:18px;align-items:center;font-size:12px;color:#64748b}
.mp-legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}
.mp-chart-box{width:100%;overflow:hidden}
.mp-table{width:100%;border-collapse:collapse;font-size:13px}
.mp-table th{background:#f8fafc;color:#64748b;font-weight:600;text-align:left;padding:10px 12px;border-bottom:1px solid #e6ebf2;white-space:nowrap}
.mp-table td{padding:11px 12px;border-bottom:1px solid #f1f5f9;color:#334155;vertical-align:middle}
.mp-table tr:last-child td{border-bottom:0}
.mp-table-wrap{overflow:auto}
.mp-badge{display:inline-block;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:600}
.mp-badge.pending{background:#fff7ed;color:#c2410c}
.mp-badge.paid{background:#ecfdf5;color:#047857}
.mp-badge.failed{background:#fef2f2;color:#b91c1c}
.mp-badge.review{background:#eff6ff;color:#1d4ed8}
.mp-badge.approved{background:#ecfdf5;color:#047857}
.mp-badge.rejected{background:#fef2f2;color:#b91c1c}
.mp-badge.disabled{background:#f1f5f9;color:#64748b}
.mp-muted{color:#94a3b8}
.mp-mono{font-family:ui-monospace,Consolas,monospace;font-size:12px}
.mp-strong{font-weight:600;color:#0f172a}
.mp-grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.mp-secret{font-family:ui-monospace,Consolas,monospace;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px;padding:12px;word-break:break-all;font-size:12px;line-height:1.8}
.mp-resource{display:flex;align-items:center;justify-content:space-between;padding:12px 8px;border-bottom:1px solid #f1f5f9;gap:12px}
.mp-resource:last-child{border-bottom:0}
.mp-resource .res-left{display:flex;align-items:center;gap:12px;min-width:0}
.mp-res-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#eff6ff;color:#2563eb;font-weight:700;font-size:13px;flex-shrink:0}
.mp-res-icon.green{background:#ecfdf5;color:#059669}
.mp-res-icon.orange{background:#fff7ed;color:#ea580c}
.mp-res-title{font-size:13px;font-weight:600;color:#0f172a}
.mp-res-sub{font-size:11px;color:#94a3b8;margin-top:2px}
.mp-link{color:#2563eb;font-size:12px;text-decoration:none;white-space:nowrap}
.mp-link:hover{text-decoration:underline}
.mp-note{background:#f8fafc;border:1px solid #e6ebf2;border-radius:8px;padding:12px 14px;font-size:12px;color:#64748b;line-height:1.7}
.mp-code{background:#0f172a;color:#e2e8f0;border-radius:8px;padding:14px;font-family:ui-monospace,Consolas,monospace;font-size:12px;line-height:1.7;overflow:auto;white-space:pre-wrap;word-break:break-all}
.mp-modal-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:80;padding:20px}
.mp-modal{background:#fff;border-radius:12px;width:min(540px,96vw);max-height:88vh;overflow:auto;padding:22px;box-shadow:0 20px 60px rgba(15,23,42,.2)}
.mp-modal h3{font-size:16px;margin:0 0 14px;color:#0f172a}
.mp-modal-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.mp-toast-root{position:fixed;top:16px;right:16px;z-index:99;display:flex;flex-direction:column;gap:8px}
.mp-toast{background:#0f172a;color:#fff;padding:10px 14px;border-radius:8px;font-size:13px;box-shadow:0 8px 24px rgba(15,23,42,.18);max-width:340px}
.mp-toast.success{background:#059669}
.mp-toast.error{background:#dc2626}
.mp-sidebar.collapsed{width:70px}
.mp-sidebar.collapsed .mp-brand-name,.mp-sidebar.collapsed .mp-brand-sub,.mp-sidebar.collapsed .mp-nav-item span,.mp-sidebar.collapsed .mp-nav-group,.mp-sidebar.collapsed .mp-side-foot{display:none}
.mp-sidebar.collapsed .mp-nav-item{justify-content:center;padding:11px 0}
.mp-subtle{font-size:11px;color:#94a3b8;font-weight:400}
.mp-instructions{margin:6px 0 0;padding-left:20px;line-height:1.9}
.mp-instructions code{background:#eef2f7;border-radius:4px;padding:1px 4px;font-family:ui-monospace,Consolas,monospace}
.mp-field textarea{width:100%;min-height:130px;border:1px solid #dbe3ee;border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.7;background:#fff;color:#0f172a;font-family:ui-monospace,Consolas,monospace;resize:vertical}
.mp-field textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mp-select,.mp-input{border:1px solid #dbe3ee;border-radius:8px;padding:9px 10px;font-size:13px;background:#fff;color:#0f172a;min-width:150px}
.mp-select:focus,.mp-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mp-site-filter{align-items:center}
.mp-site-quick{display:inline-flex;align-items:center;gap:5px;border:1px solid #a7f3d0;background:#ecfdf5;color:#047857;border-radius:20px;padding:7px 13px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.mp-site-quick.active{background:#059669;border-color:#059669;color:#fff}
.mp-field-row{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #f1f5f9}
.mp-field-row:last-child{border-bottom:0}
.mp-field-row .row-label{font-size:12px;color:#475569}
.mp-field-row .row-value{font-size:13px;color:#0f172a;word-break:break-all}
.mp-field-row .row-help{font-size:11px;color:#94a3b8;margin-top:4px}
.mp-config-panel-title{font-size:13px;font-weight:600;color:#0f172a;margin-bottom:8px;padding-left:8px;border-left:3px solid #2563eb}
@media(max-width:1000px){
  .mp-sidebar{width:70px}
  .mp-brand-name,.mp-brand-sub,.mp-nav-item span,.mp-nav-group,.mp-side-foot{display:none}
  .mp-nav-item{justify-content:center;padding:11px 0}
  .mp-stats{grid-template-columns:repeat(2,1fr)}
  .mp-grid2{grid-template-columns:1fr}
}
