/**
 * @copyright © 2026 易企网ERP订货系统. 保留所有权利.
 * 本文件为系统源码之一，仅供授权使用，禁止未经授权的复制、修改与分发。
 */
/* ==========================================================================
   商户后台 · 视觉升级（v1.2.5）
   --------------------------------------------------------------------------
   目标：从「能用」到「好看、大气、正式」。
   做法：不改 DOM 与 JS 契约，只在本文件里做视觉覆盖；
        必须加载在 admin.css 之后（index.html 里顺序已保证）。

   ★ 全部规则都以 body.merchant 前缀限定 ——
     平台端也引用 admin.css，不加限定会把平台端一起改掉。
   ========================================================================== */

body.merchant {
  --radius: 12px;
  --page-bg: #f3f6fb;
  --line: #e8edf5;
  --line-2: #dde5f0;
  --txt: #131c2e;
  --txt-2: #5b6b82;
  --txt-3: #93a2b5;
}

/* ------------------------------------------------------------------
   1. 框架：更宽的侧栏 + 更轻的顶栏
   ------------------------------------------------------------------ */
body.merchant .sidebar {
  width: 216px;
  background: linear-gradient(180deg, #2a0f0c 0%, #1a0705 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04);
}
body.merchant .sb-brand {
  height: 66px; padding: 0 16px; gap: 10px;
  background: rgba(0, 0, 0, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
body.merchant .sb-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #e5361f, #ff7a5c);
  box-shadow: 0 6px 16px rgba(229, 54, 31, .35);
}
body.merchant .sb-logo .ico { width: 18px; height: 18px; }
body.merchant .sb-name { font-size: 14.5px; letter-spacing: .3px; }
body.merchant .sb-brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body.merchant .sb-sub {
  font-size: 10.5px; color: #6d87a6; letter-spacing: .6px; text-transform: uppercase;
}
body.merchant .sb-menu { padding: 4px 10px; }
body.merchant .sb-item { margin-bottom: 1px; }
body.merchant .sb-item > a {
  height: 34px; padding: 0 12px; gap: 10px;
  border-left: 0; border-radius: 9px; font-size: 15px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; color: #a7bbd4;
}
body.merchant .sb-item > a .ico { color: #7d99ba; width: 17px; height: 17px; }
body.merchant .sb-item > a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
body.merchant .sb-item.on > a {
  background: linear-gradient(90deg, rgba(229, 54, 31, .95), rgba(229, 54, 31, .62));
  color: #fff; font-weight: 600; border-left: 0;
  box-shadow: 0 6px 16px rgba(229, 54, 31, .26);
}
body.merchant .sb-item.on > a .ico { color: #fff; }
body.merchant .sb-menu-label {
  padding: 14px 12px 6px; font-size: 10.5px; letter-spacing: 1px;
  color: #5b7592; text-transform: uppercase;
}
body.merchant .sb-foot {
  height: 44px; border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 11.5px; color: #5b7592;
}

body.merchant .topbar {
  height: 62px; padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e8edf5;
  box-shadow: 0 1px 2px rgba(16, 28, 44, .03);
}
body.merchant .tb-title { font-size: 16px; letter-spacing: .2px; }
body.merchant .tb-crumb::before { content: "›"; margin-right: 8px; color: #c3ccd9; }
body.merchant .tb-search { height: 36px; border-radius: 18px; background: #f3f6fb; }
body.merchant .tb-search input { width: 220px; font-size: 13px; }
body.merchant .tb-bell {
  width: 36px; height: 36px; border-radius: 10px;
  background: #f3f6fb; align-items: center; justify-content: center;
}

/* 二级菜单 */
body.merchant .subnav {
  width: 164px; background: #fbfcfe; padding: 16px 0;
  border-right: 1px solid #e9eef6;
}
body.merchant .subnav a {
  margin: 2px 10px; padding: 9px 12px; border-left: 0; border-radius: 8px; font-size: 13px;
}
body.merchant .subnav a.on {
  background: #fdeceb; color: #e5361f; border-left: 0; font-weight: 600;
  box-shadow: inset 0 0 0 1px #f8d6cf;
}
body.merchant .sub-group { padding: 0 14px; margin: 14px 0 6px; font-size: 10.5px; letter-spacing: 1px; }

/* 页签 */
body.merchant .tabs { min-height: 46px; padding: 0 24px; background: #fff; border-bottom: 1px solid #e9eef6; gap: 4px; }
body.merchant .tab { padding: 13px 12px; font-size: 13px; }
body.merchant .tab.on { font-weight: 600; }

body.merchant .page { padding: 20px 24px 32px; }

/* ------------------------------------------------------------------
   2. 卡片 / 表格 / 表单
   ------------------------------------------------------------------ */
body.merchant .card {
  border: 1px solid #e8edf5; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 28, 44, .04);
  overflow: hidden;
}
body.merchant .card-title {
  padding: 15px 18px; border-bottom: 1px solid #eef2f8; font-size: 15px;
}
body.merchant .card-title::before { height: 15px; border-radius: 2px; }
body.merchant .card-body { padding: 18px; }
body.merchant .toolbar { padding: 14px 18px; border-bottom: 1px solid #f0f4f9; }

body.merchant .tbl th {
  background: #f8fafd; color: #7b8aa0; font-size: 12px; letter-spacing: .3px;
  padding: 12px 14px; border-bottom: 1px solid #e8edf5;
}
body.merchant .tbl td { padding: 13px 14px; border-bottom: 1px solid #f1f5fa; }
body.merchant .tbl tbody tr:hover { background: #f8fbff; }

body.merchant .inp,
body.merchant .sel { border-radius: 8px; height: 36px; border-color: #dfe6f0; }
body.merchant .btn { border-radius: 8px; height: 34px; }
body.merchant .btn-sm { height: 27px; border-radius: 6px; }
body.merchant .btn-primary {
  background: linear-gradient(135deg, #e5361f, #e5361f);
  box-shadow: 0 2px 6px rgba(229, 54, 31, .22);
}
body.merchant .modal { border-radius: 14px; }
body.merchant .modal-head { padding: 16px 20px; }
body.merchant .modal-body { padding: 18px 20px; }
body.merchant .tag { border-radius: 6px; }

/* 统计卡（旧版总览用） */
body.merchant .stat-card,
body.merchant .stat { border-radius: 12px; }
body.merchant .stat-ico { width: 46px; height: 46px; border-radius: 13px; }

/* ------------------------------------------------------------------
   3. 新总览页
   ------------------------------------------------------------------ */
.ov-hero {
  position: relative; overflow: hidden; margin-bottom: 18px;
  padding: 24px 26px; border-radius: 16px; color: #fff;
  background:
    radial-gradient(600px 300px at 88% 12%, rgba(255, 255, 255, .18), transparent 70%),
    linear-gradient(120deg, #14305a 0%, #1c4b8a 58%, #e5361f 132%);
  box-shadow: 0 14px 34px rgba(20, 48, 90, .22);
}
.ov-hero h2 { font-size: 21px; font-weight: 600; letter-spacing: .3px; }
.ov-hero p { margin-top: 8px; font-size: 13px; color: #bcd0e9; }
.ov-hero-meta { display: flex; gap: 34px; margin-top: 22px; flex-wrap: wrap; }
.ov-hero-meta div b { display: block; font-size: 26px; letter-spacing: -.6px; }
.ov-hero-meta div span { font-size: 12px; color: #a9c3e0; }
.ov-hero-acts { position: absolute; right: 24px; top: 24px; display: flex; gap: 8px; }
.ov-hero-acts .btn {
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26);
  color: #fff; backdrop-filter: blur(4px);
}
.ov-hero-acts .btn:hover { background: rgba(255, 255, 255, .24); }

.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ov-kpi {
  background: #fff; border: 1px solid #e8edf5; border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: flex-start; gap: 13px; transition: box-shadow .16s, transform .16s;
}
.ov-kpi:hover { box-shadow: 0 12px 26px rgba(16, 28, 44, .08); transform: translateY(-1px); }
.ov-kpi .ki {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: flex;
  align-items: center; justify-content: center; background: #fdeceb; color: #e5361f;
}
.ov-kpi .ki .ico { width: 20px; height: 20px; }
.ov-kpi.g .ki { background: #e6f7ee; color: #1c9a55; }
.ov-kpi.o .ki { background: #fef4e4; color: #d98613; }
.ov-kpi.r .ki { background: #fdecec; color: #d63c40; }
.ov-kpi.p .ki { background: #f1ecfd; color: #7a5af5; }
.ov-kpi .k { font-size: 12.5px; color: #7b8aa0; }
.ov-kpi .v { font-size: 24px; font-weight: 600; color: #131c2e; letter-spacing: -.5px; margin-top: 3px; }
.ov-kpi .v em { font-style: normal; font-size: 13px; font-weight: 400; color: #93a2b5; margin-left: 3px; }
.ov-kpi .s { font-size: 11.5px; color: #93a2b5; margin-top: 4px; }

.ov-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1180px) { .ov-grid { grid-template-columns: 1fr; } }
.ov-chart { height: 180px; display: flex; align-items: flex-end; gap: 6px; padding-top: 8px; }
.ov-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 4px; }
.ov-bar i {
  display: block; border-radius: 4px 4px 0 0; min-height: 3px;
  background: linear-gradient(180deg, #ff7a5c, #e5361f);
}
.ov-bar:hover i { background: linear-gradient(180deg, #ff7a5c, #c52a16); }
.ov-bar-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: #93a2b5; }

.ov-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ov-quick a {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 8px; border: 1px solid #eef2f8; border-radius: 10px;
  color: #3d4c62; font-size: 12.5px; background: #fbfcfe; transition: all .15s;
}
.ov-quick a:hover { border-color: #bcd3ff; background: #f4f8ff; color: #e5361f; transform: translateY(-1px); }
.ov-quick .qi {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; background: #fdeceb; color: #e5361f;
}

.ov-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ov-todo-item {
  border: 1px solid #eef2f8; border-radius: 10px; padding: 12px; background: #fbfcfe; text-align: center;
  cursor: pointer; transition: all .15s;
}
.ov-todo-item:hover { border-color: #bcd3ff; background: #f4f8ff; }
.ov-todo-item b { display: block; font-size: 22px; color: #3d4c62; line-height: 1.2; }
.ov-todo-item span { display: block; font-size: 12px; color: #7b8aa0; margin-top: 5px; }
.ov-todo-item.on b { color: #d63c40; }

.ov-rank { display: flex; flex-direction: column; gap: 2px; }
.ov-rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.ov-rank-row .no {
  width: 20px; height: 20px; border-radius: 6px; flex: none; background: #eef2f8;
  color: #7b8aa0; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.ov-rank-row:nth-child(1) .no { background: #e5361f; color: #fff; }
.ov-rank-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-rank-row .amt { color: #5b6b82; font-variant-numeric: tabular-nums; }
