/* 统一设计层：必须放在各页面自身样式之后加载 */
:root{
  --brand:#2b5cff;
  --brand-2:#4d7dff;
  --brand-deep:#1c53e2;
  --ink:#0f172a;
  --ink-2:#475569;
  --muted:#64748b;
  --line:#e6eefb;
  --line-strong:#d8e5fa;
  --soft:#f5f8ff;
  --bg:#f4f7fd;
  --radius:14px;
  --radius-lg:18px;
  --shadow:0 12px 34px -24px rgba(31,86,214,.42);
}

body{color:var(--ink);-webkit-font-smoothing:antialiased}
a,button,input,select,textarea{font-family:inherit}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:40px;padding:0 16px;border:1px solid transparent;border-radius:10px;
  font-size:13.5px;font-weight:650;line-height:1;text-decoration:none;white-space:nowrap;
}
.btn.sm{min-height:30px;height:30px;padding:0 11px;font-size:12px;border-radius:8px}
.btn.primary,.btn-primary,.btn-main,.buy,.wh-btn,.cl-btn.primary{
  background:linear-gradient(180deg,#3f7bff,#1c53e2)!important;
  border-color:transparent!important;color:#fff!important;
  box-shadow:0 10px 22px -14px rgba(28,83,226,.85);
}
.btn.primary:hover,.btn-primary:hover,.btn-main:hover,.buy:hover,.wh-btn:hover,.cl-btn.primary:hover{filter:brightness(1.06)}
.btn.primary:disabled,.buy[disabled]{background:#e2e8f0!important;color:#94a3b8!important;box-shadow:none!important;cursor:not-allowed}
.btn.ghost,.btn-ghost{background:#f1f5fb!important;color:#475569!important;border-color:var(--line)!important}
.btn.ghost:hover,.btn-ghost:hover{background:#eaf1ff!important;color:#1a4fe0!important;border-color:#cfe0ff!important}
.btn.danger,.link.danger{color:#d92d20!important}

/* 输入与表格 */
.inp,.field input,.field select,.field textarea,.mcard input,.cl-input,.fee-inp,.sort-inp{
  border-color:#e2eaf6!important;background:#fff!important;
}
.inp:focus,.field input:focus,.field select:focus,.field textarea:focus,.mcard input:focus,.cl-input:focus,.fee-inp:focus{
  border-color:#8fb0ff!important;box-shadow:0 0 0 3px rgba(43,92,255,.12)!important;outline:none!important;
}
.table th{color:#64748b!important;font-weight:600!important;background:#f8fbff!important;border-bottom-color:var(--line)!important}
.table td{border-bottom-color:#eef3fb!important}
.table tbody tr:hover{background:#f9fbff}
.table td.num,.money{font-variant-numeric:tabular-nums}

/* 卡片、标签与空状态 */
.card,.mmain,.mside,.mcard,.modal-card,.inline-card,.banner,.pcard,.wallet-stat{
  border-color:var(--line)!important;
}
.card,.mmain,.mcard,.modal-card,.inline-card,.banner,.pcard{box-shadow:var(--shadow)!important}
.tag,.badge,.pill,.pbadge{font-weight:600}
.tag.grey{background:#f1f5f9;color:#64748b}
.empty{color:#94a3b8!important;line-height:1.8}
.empty .btn{margin:10px auto 0}

/* 顶部品牌与主色，收掉各处黑色/绿色/紫色强调 */
.shop-page .top .logo .mark,.shop-page .store-logo,.hero-avatar,.d-sicon{
  background:linear-gradient(135deg,#4d8bff,#1a4fe0)!important;color:#fff!important;
}
.pe-tab.on{background:#eef4ff!important;border-color:#bcd3ff!important;color:#1a4fe0!important}
.stock-tab.on{color:#1a4fe0!important;border-bottom-color:#2b5cff!important}
.tabs button.on::after,.subnav button.on::after{background:#2b5cff!important}
.prod-gear{color:#1a4fe0!important;border-color:#dbe7fb!important}
.prod-gear:hover{background:#eef4ff!important;border-color:#bcd3ff!important}
.prod-menu button:hover{background:#f2f7ff!important;color:#1a4fe0!important}
.chip.on,.pbadge{background:#eef4ff!important;color:#1a4fe0!important}
.pbadge.green{background:#e9f8f0!important;color:#0a8f55!important}
.pbadge.gray{background:#f1f5f9!important;color:#64748b!important}

/* 商品编辑弹窗：短标签页不再留大片空白 */
.modal-card.prod-mode{height:auto!important;max-height:88vh!important}
.modal-card.prod-mode .prod-edit{height:auto!important;max-height:88vh!important}
.modal-card.prod-mode .pe-body{max-height:calc(88vh - 168px)!important}
.pe-pricebox{background:#f8fbff!important;border-color:#e6eefb!important}
.rt-bar button.on{background:#1a4fe0!important;border-color:#1a4fe0!important}
input[type=checkbox]{accent-color:#2b5cff!important}

/* 买家商品弹窗：统一蓝，不再用紫色 */
.cl-sku.on{border-color:#7ea6ff!important;background:#eef4ff!important;color:#1a4fe0!important}
.cl-sku.on small{color:#2b5cff!important}
.cl-pay.sel{border-color:#7ea6ff!important;background:#eef4ff!important;color:#1a4fe0!important}
.cl-pay.sel::after{background:#2b5cff!important}
.cl-sechead::before{background:#2b5cff!important}
.cl-help i{color:#2b5cff!important}
.cl-footer .cl-btn.primary{background:linear-gradient(135deg,#3f7bff,#1c53e2)!important}
.cl-ph{font-size:14px!important;font-weight:500!important;color:#94a3b8!important;letter-spacing:.08em!important}

/* 商家仪表盘：桌面三列指标 + 双列卡片，避免一条长列表和重复留白 */
@media(min-width:1000px){
  .dash-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dash-dark{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
  .dash-top,.dash-stats,.d-card.d-wide,.dash-flow{grid-column:1/-1}
  .dash-dark .d-card{margin-top:0!important}
  .dash-flow{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
  .dash-col{display:flex;flex-direction:column;gap:12px;min-width:0}
  .dash-flow .d-card{margin:0!important;width:100%}
  .dash-dark .d-card .d-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:999px){
  .dash-dark{display:block!important}
  .dash-flow{display:block!important}
}
@media(max-width:560px){
  .dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* 后台左侧二级导航按内容高度收口，避免少量菜单撑出一整块空白 */
@media(min-width:901px){
  .subside{height:auto!important;min-height:0!important;max-height:calc(100vh - 96px);overflow-y:auto}
}

/* 移动端统一圆角和间距 */
@media(max-width:640px){
  .btn{border-radius:9px}
  .card,.mmain,.mside{border-radius:12px!important}
  .modal-card{border-radius:16px!important}
}
