/* ============================================================
   手机店 · 电脑工作台
   桌面优先的商家后台样式：左侧导航 + 内容区 + 右侧详情抽屉
   ============================================================ */

:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #16181d;
  --sub: #5f6673;
  --muted: #98a0ac;
  --line: #e9ecf2;
  --brand: #ff2c55;
  --brand-2: #ff5274;
  --soft: rgba(255, 44, 85, 0.08);
  --ok: #127a3d;
  --ok-bg: #e7f7ed;
  --warn: #a86400;
  --warn-bg: #fff4e3;
  --danger: #c0341f;
  --danger-bg: #fdecec;
  --info: #1a5fbf;
  --info-bg: #e8f1ff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(22, 24, 29, 0.06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
[hidden] { display: none !important; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.strike { text-decoration: line-through; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:hover { background: #f7f8fb; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 44, 85, 0.25);
}
.btn-primary:hover { background: linear-gradient(135deg, #f02149, #ff4166); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ad2e1b; }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--sub); }
.btn-ghost:hover { background: #f7f8fb; color: var(--ink); }

.btn-soft { background: var(--soft); color: var(--brand); }
.btn-soft:hover { background: rgba(255, 44, 85, 0.14); }

.btn-text { background: none; color: var(--muted); height: 32px; padding: 0 10px; }
.btn-text:hover { color: var(--ink); background: rgba(0, 0, 0, 0.03); }

.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------------- 登录 ---------------- */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
  gap: 40px;
  align-items: center;
  padding: 48px clamp(28px, 6vw, 90px);
  background:
    radial-gradient(900px 520px at 8% 10%, rgba(255, 44, 85, 0.10), transparent 62%),
    radial-gradient(720px 460px at 88% 82%, rgba(26, 95, 191, 0.08), transparent 60%),
    var(--bg);
}

.auth-side .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--sub);
  letter-spacing: 0.5px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 4px rgba(255, 44, 85, 0.12);
}

.auth-side h1 {
  margin-top: 26px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.auth-points { margin-top: 28px; display: grid; gap: 14px; max-width: 460px; }
.auth-points li {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--sub);
  font-size: 14px;
}
.auth-points b { color: var(--ink); font-weight: 600; }

.auth-note { margin-top: 26px; color: var(--muted); font-size: 13px; max-width: 440px; }

.auth-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(22, 24, 29, 0.12);
  padding: 34px 32px 30px;
}
.auth-card-head h2 { font-size: 24px; letter-spacing: -0.3px; }
.auth-card-head p { margin-top: 6px; color: var(--muted); font-size: 13px; }

.form { margin-top: 24px; display: grid; gap: 16px; }

.field { display: grid; gap: 7px; }
.field-label { font-size: 13px; color: var(--sub); }
.field-row { display: flex; gap: 10px; }
.field-row .input { flex: 1; }
.field-hint { font-size: 12px; color: var(--muted); }
.req { color: var(--brand); font-style: normal; }

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
textarea.input { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.input:focus { border-color: rgba(255, 44, 85, 0.5); background: #fff; box-shadow: 0 0 0 4px rgba(255, 44, 85, 0.10); }
.input-sm { height: 32px; font-size: 13px; border-radius: 8px; width: 210px; }

.auth-tip { min-height: 18px; font-size: 13px; color: var(--muted); }
.auth-tip-warn { color: var(--danger); }

.shop-pick { margin-top: 22px; }
.shop-pick-tip { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.shop-list { display: grid; gap: 10px; }
.shop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name go" "meta go";
  align-items: center;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.shop-item:hover { border-color: rgba(255, 44, 85, 0.4); background: #fff8fa; }
.shop-item b { grid-area: name; font-size: 15px; }
.shop-item span { grid-area: meta; color: var(--muted); font-size: 12px; }
.shop-item i { grid-area: go; color: var(--brand); font-style: normal; font-size: 13px; }

/* ---------------- 骨架 ---------------- */

.shell { display: flex; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  padding: 20px 14px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 18px;
  font-weight: 600;
  font-size: 15px;
}

.nav { display: grid; gap: 2px; margin-top: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--sub);
  font-size: 14px;
}
.nav-item i { width: 18px; text-align: center; font-style: normal; font-size: 15px; color: var(--muted); }
.nav-item:hover { background: #f6f7fa; color: var(--ink); }
.nav-on { background: var(--soft); color: var(--brand); font-weight: 600; }
.nav-on i { color: var(--brand); }

.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.side-shop-name { font-weight: 600; font-size: 14px; }
.side-shop-role { color: var(--muted); font-size: 12px; margin-top: 2px; margin-bottom: 8px; }

.main { flex: 1; min-width: 0; margin-left: 218px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 28px;
  background: rgba(244, 245, 249, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 236, 242, 0.8);
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar h2 { font-size: 19px; letter-spacing: -0.2px; }
.page-hint { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 8px; }

.view { padding: 22px 28px 70px; max-width: 1360px; }

/* ---------------- 工具条 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  font-size: 13px;
  cursor: pointer;
}
.chip:hover { color: var(--ink); }
.chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip-on { background: #17181c; border-color: #17181c; color: #fff; }
.chip-on i { color: rgba(255, 255, 255, 0.65); }

.list-meta { color: var(--muted); font-size: 13px; margin: 2px 2px 12px; }
.list-meta b { color: var(--ink); }

/* ---------------- 表格 ---------------- */

.tb-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tb { width: 100%; border-collapse: collapse; }
.tb th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 16px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tb td {
  padding: 13px 16px;
  border-bottom: 1px solid #f2f4f8;
  vertical-align: middle;
  font-size: 13.5px;
}
.tb tbody tr:last-child td { border-bottom: none; }
.tb-row { cursor: pointer; }
.tb-row:hover { background: #fafbfd; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }

.cell-main { color: var(--ink); font-weight: 500; }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.amt { font-variant-numeric: tabular-nums; }
.row-go { color: var(--muted); font-size: 18px; }
.row-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.prod-cell { display: flex; align-items: center; gap: 12px; }
.prod-img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: #f2f4f8; flex-shrink: 0; }
.prod-img-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }

/* ---------------- 标签 ---------------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
  background: #f2f4f8;
  color: var(--sub);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-mute { background: #f2f4f8; color: var(--muted); }
.badge-soft { background: var(--soft); color: var(--brand); }
.badge-brand { background: var(--soft); color: var(--brand); font-weight: 600; }

/* ---------------- 统计卡 ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.02);
}
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.4px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat-brand .stat-value { color: var(--brand); }
.stat-warn .stat-value { color: var(--warn); }
.stat-ok .stat-value { color: var(--ok); }

/* ---------------- 面板 ---------------- */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 12px;
}
.panel-head h3 { font-size: 15px; }
.panel-note { color: var(--muted); font-size: 12px; }
.panel-body { padding: 0 18px 16px; }
.panel-body .tb-wrap { box-shadow: none; border: 1px solid var(--line); }
.panel-body .tb th { background: #fbfcfe; }

/* 待办 */
.todo { display: grid; gap: 8px; }
.todo li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.todo li:hover { border-color: rgba(255, 44, 85, 0.35); background: #fff8fa; }
.todo b { font-size: 13.5px; }
.todo span { color: var(--muted); font-size: 12.5px; flex: 1; }
.todo i { color: var(--brand); font-style: normal; }
.done-all { padding: 26px 0; text-align: center; color: var(--muted); }

.mini-list { display: grid; gap: 2px; }
.mini-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f2f4f8;
  cursor: pointer;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list li:hover { background: #fafbfd; }
.mini-main { flex: 1; min-width: 0; }
.mini-main b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-main span { color: var(--muted); font-size: 12px; }
.mini-side { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------------- 柱状图 ---------------- */

.bars { display: grid; gap: 9px; padding: 4px 0; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 92px; align-items: center; gap: 10px; }
.bar-label { color: var(--sub); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; border-radius: 999px; background: #f1f3f8; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar-value { text-align: right; font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; }

.cols {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
  padding: 6px 2px 0;
  overflow-x: auto;
}
.col { flex: 1; min-width: 16px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.col-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, rgba(255, 44, 85, 0.9), rgba(255, 82, 116, 0.55));
  min-height: 3px;
}
.col-label { color: var(--muted); font-size: 11px; white-space: nowrap; transform: scale(0.94); }

/* ---------------- 键值表 ---------------- */

.kv { display: grid; grid-template-columns: 104px 1fr; gap: 9px 14px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { color: var(--ink); font-size: 13.5px; word-break: break-all; }
.kv-strong { font-weight: 600; color: var(--brand) !important; }

/* ---------------- 提示块 / 空状态 ---------------- */

.callout {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.65;
}
.callout-danger { background: var(--danger-bg); border-color: rgba(192, 52, 31, 0.2); color: var(--danger); }
.callout-info { background: var(--info-bg); border-color: rgba(26, 95, 191, 0.18); color: var(--info); }

.empty { padding: 46px 20px; text-align: center; }
.empty-icon { font-size: 30px; opacity: 0.6; }
.empty-t { margin-top: 8px; color: var(--sub); font-size: 14px; }
.empty-s { margin-top: 4px; color: var(--muted); font-size: 12.5px; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 46px 0; color: var(--muted); font-size: 13px; }
.spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 44, 85, 0.25);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 供应链货源 ---------------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px;
}
.offer {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.offer:hover { border-color: rgba(255, 44, 85, 0.35); transform: translateY(-2px); }
.offer-cover { position: relative; height: 132px; background: #f2f4f8; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.offer-cover img { width: 100%; height: 100%; object-fit: cover; }
.offer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 9px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}
.offer-body { padding: 13px 15px 15px; }
.offer-body h4 { font-size: 14.5px; font-weight: 600; }
.offer-body p { margin-top: 4px; color: var(--muted); font-size: 12.5px; min-height: 19px; }
.offer-meta { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.offer-price { color: var(--brand); font-size: 19px; font-weight: 600; }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; }

/* ---------------- 利润 ---------------- */

.profit-top { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.profit-label { color: var(--muted); font-size: 12.5px; }
.profit-num { font-size: 30px; font-weight: 600; letter-spacing: -0.6px; margin-top: 2px; color: var(--brand); }
.profit-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.profit-side { color: var(--sub); font-size: 12.5px; text-align: right; line-height: 1.9; }

/* ---------------- 角色列表 ---------------- */

.role-list { display: grid; gap: 8px; }
.role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
}

/* ---------------- 抽屉 ---------------- */

.mask {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 24, 0.35);
  opacity: 0;
  transition: opacity 0.16s ease;
  z-index: 40;
}
.mask-on { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 92vw);
  background: var(--card);
  box-shadow: -20px 0 60px rgba(22, 24, 29, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 50;
}
.drawer-on { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 16px; }
.drawer-x {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.drawer-x:hover { background: #f4f5f9; color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.drawer-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.drawer-no { font-size: 15px; font-weight: 600; font-family: ui-monospace, Menlo, Consolas, monospace; }
.drawer-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.drawer-amt { text-align: right; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.drawer-h { font-size: 13px; color: var(--muted); margin: 18px 0 8px; font-weight: 500; }
.drawer-p { color: var(--sub); font-size: 13.5px; line-height: 1.7; margin-bottom: 8px; white-space: pre-wrap; }
.drawer-tip { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.drawer-actions-list { display: grid; gap: 8px; }
.drawer-body .tb-wrap { box-shadow: none; border: 1px solid var(--line); }
.drawer-body .tb th { background: #fbfcfe; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; cursor: zoom-in; background: #f2f4f8; }

/* ---------------- 弹层 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.modal.modal-on { opacity: 1; }
.modal-card {
  width: min(440px, 100%);
  background: var(--card);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 80px rgba(22, 24, 29, 0.22);
  transform: translateY(6px);
  transition: transform 0.15s ease;
}
.modal.modal-on .modal-card { transform: translateY(0); }
.modal-card h3 { font-size: 17px; }
.modal-body { margin-top: 12px; max-height: 60vh; overflow-y: auto; }
.modal-text { color: var(--sub); font-size: 13.5px; line-height: 1.7; }
.modal-form { display: grid; gap: 13px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------------- 浮动提示 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.92);
  color: #fff;
  font-size: 13.5px;
  z-index: 80;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.18s ease;
}
.toast-warn { background: #a86400; }
.toast-ok { background: rgba(18, 122, 61, 0.95); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 窄屏：导航横排 ---------------- */

@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; padding: 30px 20px; gap: 24px; }
  .auth-side h1 { font-size: 26px; }
  .side {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .side-brand { padding: 0 8px 0 0; white-space: nowrap; }
  .nav { display: flex; gap: 4px; margin: 0; }
  .nav-item { height: 34px; padding: 0 10px; white-space: nowrap; }
  .nav-item i { display: none; }
  .side-foot { margin: 0 0 0 auto; border: none; padding: 0; white-space: nowrap; }
  .side-shop, .side-foot .btn { display: none; }
  .shell { flex-direction: column; }
  .main { margin-left: 0; }
  .topbar { height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .view { padding: 16px 16px 60px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 92px 1fr; }
}

/* ===== 推广码 ===== */
.code-chip {
  font-family: Menlo, Consolas, monospace;
  letter-spacing: 1px;
  font-size: 12px;
  padding: 2px 8px;
}

/* 表格下方的一句说明 */
.hint {
  margin: 12px 2px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-mute, #8a90a0);
}

/* ============================================================
   收款设置 / 工资 / 角色权限（第 57 轮新增）
   ============================================================ */

.toolbar-gap { flex: 1; }

.callout-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(18, 122, 61, 0.18); }

.link-btn {
  border: none;
  background: none;
  padding: 0 2px;
  color: var(--info);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hint-list {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(22, 24, 29, 0.03);
  color: var(--sub);
  font-size: 13px;
  line-height: 1.9;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* 开关 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.switch-title { font-weight: 600; }
.switch-sub { color: var(--sub); font-size: 13px; margin-top: 2px; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  cursor: pointer;
  font: inherit;
  transition: all 0.15s ease;
}

.switch i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.15s ease;
}

.switch-on { background: var(--ok-bg); border-color: rgba(18, 122, 61, 0.25); color: var(--ok); }
.switch-on i { background: var(--ok); }

/* 收款口径卡片 */
.pay-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.pay-mode {
  position: relative;
  text-align: left;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: all 0.15s ease;
}

.pay-mode b { display: block; font-size: 14px; }
.pay-mode span { display: block; margin-top: 6px; color: var(--sub); font-size: 12.5px; line-height: 1.7; }
.pay-mode:hover { border-color: rgba(255, 44, 85, 0.35); }
.pay-mode-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--soft); }

.pay-mode-check {
  position: absolute;
  top: 12px;
  right: 12px;
  font-style: normal;
  font-size: 11px;
  color: var(--brand);
}

/* 角色卡片 */
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.role-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.role-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.role-card-name { font-weight: 600; font-size: 15px; }
.role-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.role-card-perms { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

.perm-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.05);
  color: var(--sub);
  font-size: 12px;
}

/* 权限勾选 */
.perm-group { margin-top: 18px; }
.perm-group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.perm-group-head .muted { font-size: 12.5px; }
.perm-group-body { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.perm-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.perm-box input { margin: 0; accent-color: var(--brand); }
.perm-box-on { border-color: var(--brand); background: var(--soft); }
.perm-warn {
  font-style: normal;
  font-size: 11px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 6px;
  padding: 0 5px;
}

/* 抽屉里的紧凑统计（客户/工资详情用） */
.stats-tight { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stats-tight .stat { padding: 10px 12px; }
.stats-tight .stat-value { font-size: 18px; }

/* 收费策略 */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.plan-title { font-size: 15px; margin: 0 0 12px; }

.plan-quote {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(22, 24, 29, 0.03);
}

.plan-quote-total {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.plan-quote-sub {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sub);
}

.plan-quote .kv { margin: 0 0 6px; }
