/* ===========================================================
   商务部达人工作台 - 样式
   =========================================================== */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --line: #e8e8ed;
  --line-2: #f0f0f3;
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --brand: #0071e3;
  --brand-soft: #f0f7ff;
  --brand-line: #cfe5fb;
  --ok: #248a3d;
  --ok-soft: #effaf1;
  --warn: #b25000;
  --warn-soft: #fff8ef;
  --danger: #d0342c;
  --danger-soft: #fdf1f0;
  --purple: #5e5ce6;
  --purple-soft: #f2f2fd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .03);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .10), 0 2px 8px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: linear-gradient(180deg, #1a1c22 0%, #141519 100%);
  border-right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.1px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f5f5f7;
}
.brand .logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #0071e3, #4da2ff);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 22px;
  box-shadow: 0 2px 8px rgba(0, 113, 227, .35);
}
.brand p {
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
}

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-group { margin-bottom: 14px; }
.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, .35);
  letter-spacing: .08em;
  padding: 6px 10px 4px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .62);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 1px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 113, 227, .35);
}
.nav-item .ico { width: 15px; text-align: center; font-size: 13px; opacity: .9; }
.nav-item .badge {
  margin-left: auto;
  background: rgba(255, 69, 58, .24);
  color: #ff8a80;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9px;
  min-width: 17px;
  text-align: center;
}

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 10px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .75);
}
.user-chip:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.user-chip .u-name { color: #f5f5f7; }
.user-chip .u-role { color: rgba(255, 255, 255, .4); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 26px;
}
.sidebar .avatar { background: rgba(0, 113, 227, .3); color: #7cbdff; }
.user-chip .u-name { font-size: 12px; font-weight: 600; }
.user-chip .u-role { font-size: 10px; color: var(--text-3); }

/* ---------- 主区 ---------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 52px;
  flex: 0 0 52px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
}
.topbar .page-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.topbar .page-sub { font-size: 11px; color: var(--text-3); margin-left: -6px; }
.topbar .spacer { flex: 1; }

.search-box {
  position: relative;
  width: 280px;
}
.search-box input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 8px;
  padding: 0 10px 0 30px;
  outline: none;
  font-size: 12.5px;
}
.search-box input:focus { border-color: var(--brand-line); background: #fff; box-shadow: 0 0 0 3px rgba(29,78,216,.08); }
.search-box .s-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 12px; pointer-events: none;
}

.content { flex: 1; overflow-y: auto; padding: 18px; }
.view { display: none; }
.view.active { display: block; }

/* ---------- 通用组件 ---------- */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover { background: #f9fafb; color: var(--text); }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover { background: #1a45c4; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f2f4f7; }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn.danger { color: var(--danger); border-color: #fecdca; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.1px; }
.card-head .sub { font-size: 11px; color: var(--text-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-2-1, .g-1-2, .g3 { grid-template-columns: 1fr; }
}

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .k-label {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
}
.kpi .k-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin: 8px 0 4px;
  line-height: 1.1;
}
.kpi .k-value small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.kpi .k-foot { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.up { color: var(--ok); font-weight: 600; }
.down { color: var(--danger); font-weight: 600; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.tb thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fbfcfd;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.tb tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.tb tbody tr:hover { background: #fafbfc; }
table.tb tbody tr.clickable { cursor: pointer; }
table.tb tbody tr:last-child td { border-bottom: none; }
table.tb td.right, table.tb th.right { text-align: right; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  border: 1px solid transparent;
}
/* 标签色只保留 4 种语义：中性灰 / 品牌蓝 / 成功绿 / 警示红；orange、purple 一律归入中性灰 */
.tag.gray, .tag.orange, .tag.purple { background: #f5f5f7; color: var(--text-2); border-color: var(--line); }
.tag.blue { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.tag.green { background: var(--ok-soft); color: var(--ok); border-color: #cdebd4; }
.tag.red { background: var(--danger-soft); color: var(--danger); border-color: #f6d5d2; }
.tag.dot::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  display: block;
}

/* 头像块 */
.creator-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.c-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #eef2ff, #dbe4ff);
  color: #3b5bdb;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 30px;
  overflow: hidden;
}
.creator-cell .c-main { min-width: 0; }
.creator-cell .c-name {
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.creator-cell .c-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

/* ============ 达人库表格收缩（2026-10-21：防止某一页长内容把整表撑乱行） ============ */
/* 长字符串一律省略号截断，完整内容悬停可见 / 点进详情可见 */
.cell-cut {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
/* 数字列不许折行，行高才齐 */
.cr-tb td.right, .cr-tb th.right { white-space: nowrap; }
.cr-tb tbody td { padding: 8px 10px; vertical-align: middle; }
.cr-tb thead th { padding: 8px 10px; }
/* 标签列 chips 收紧 */
.cr-tb td .tag { margin: 1px 0; }
/* 归属/状态列整体不折行（子行除外），避免忽高忽低 */
.cr-tb td[data-label="合作状态"], .cr-tb td[data-label="寄样"], .cr-tb td[data-label="粉丝"] { white-space: nowrap; }

/* 筛选栏 */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
}
.field {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 9px;
  font-size: 12px;
  color: var(--text-2);
  outline: none;
}
.field:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(29,78,216,.07); }
select.field { padding-right: 22px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%238d97a6' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* 进度条 */
.bar { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: #f79009; }

/* 空状态 */
.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}
.empty .e-ico { font-size: 26px; opacity: .5; display: block; margin-bottom: 8px; }

/* ---------- 抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(16,24,40,.32);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
  z-index: 50;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 620px;
  max-width: 92vw;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.32,.72,0,1);
  z-index: 51;
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 18px 26px; }
.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  gap: 8px;
  background: #fbfcfd;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.tab {
  padding: 10px 11px;
  font-size: 12.5px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.section-title {
  font-size: 11px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 20px 0 9px;
}

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
.kv .k { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.kv .v { font-size: 12.5px; color: var(--text); word-break: break-all; }
.kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--brand-line);
}
.tl-item.done::before { background: var(--brand); border-color: var(--brand); }
.tl-item.overdue::before { background: var(--danger); border-color: var(--danger); }
.tl-time { font-size: 11px; color: var(--text-3); }
.tl-title { font-size: 12.5px; margin: 1px 0 2px; }
.tl-body { font-size: 12px; color: var(--text-2); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(16,24,40,.38);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  z-index: 60;
  overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 560px;
  max-width: 100%;
  overflow: hidden;
}
.modal.wide { width: 780px; }
.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; max-height: 62vh; overflow-y: auto; }
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
  background: #fbfcfd;
}

.form-row { margin-bottom: 13px; }
.form-row label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.form-row label .req { color: var(--danger); margin-left: 2px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=date],
.form-row input[type=number], .form-row select, .form-row textarea {
  width: 100%;
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  outline: none;
  background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px rgba(29,78,216,.08);
}
.form-row .hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* 提示条 */
.alert {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  border: 1px solid;
}
.alert .a-ico { flex: 0 0 auto; font-size: 13px; line-height: 1.4; }
.alert.info { background: var(--brand-soft); border-color: var(--brand-line); color: #1e3a8a; }
.alert.warn { background: var(--warn-soft); border-color: #fedf89; color: #93370d; }
.alert.danger { background: var(--danger-soft); border-color: #fecdca; color: #912018; }
.alert.ok { background: var(--ok-soft); border-color: #abefc6; color: #05603a; }

/* 规则块 */
.rule-steps { counter-reset: rs; }
.rule-step {
  position: relative;
  padding: 0 0 16px 34px;
  counter-increment: rs;
}
.rule-step::before {
  content: counter(rs);
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--brand-line);
}
.rule-step::after {
  content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px;
  width: 1px; background: var(--line);
}
.rule-step:last-child::after { display: none; }
.rule-step .rs-t { font-size: 12.5px; font-weight: 650; margin-bottom: 3px; }
.rule-step .rs-b { font-size: 12px; color: var(--text-2); line-height: 1.6; }

code.inline {
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #b42318;
}

/* 教程 */
.doc h4 { font-size: 13px; margin: 18px 0 7px; }
.doc h4:first-child { margin-top: 0; }
.doc p, .doc li { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.doc ul, .doc ol { padding-left: 20px; margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0 4px; }
.doc table th {
  text-align: left; font-weight: 600; font-size: 11px; color: var(--text-3);
  border-bottom: 1px solid var(--line); padding: 6px 8px; background: #fbfcfd;
}
.doc table td { border-bottom: 1px solid var(--line-2); padding: 6px 8px; color: var(--text-2); }

/* Toast */
#toast-wrap {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #101828;
  color: #fff;
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease;
  max-width: 520px;
}
.toast.ok { background: #054f31; }
.toast.err { background: #912018; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 迷你图 */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark i {
  flex: 1;
  background: var(--brand-soft);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}
.spark i.hi { background: var(--brand); }

/* 归属推演 */
.sim-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}
.sim-row .field { width: 100%; }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d3d8e0; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c0cb; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录 ---------- */
.login-mask {
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(0, 113, 227, .22), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(77, 162, 255, .12), transparent 55%),
    linear-gradient(160deg, #101216 0%, #17191f 55%, #101216 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.login-mask.hide { display: none; }
.login-card {
  width: 400px; background: #fff; border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 16px; padding: 30px 30px 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.login-logo {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 42px;
  background: linear-gradient(135deg, #0071e3, #4da2ff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 113, 227, .4);
}
.login-brand h2 { margin: 0; font-size: 16px; font-weight: 680; letter-spacing: -.2px; }
.login-brand p { margin: 3px 0 0; font-size: 11.5px; color: var(--text-3); }
.login-hint {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--text-3); line-height: 1.95;
}
.login-hint code {
  background: #f2f4f7; padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #b42318;
}
.login-err {
  background: var(--danger-soft); border: 1px solid #fecdca;
  color: #912018; font-size: 12px; padding: 8px 10px;
  border-radius: 7px; margin-bottom: 12px;
}

/* 账号管理 */
.role-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 550; border: 1px solid transparent; }
.role-admin { background: var(--purple-soft); color: var(--purple); border-color: #d9d6fe; }
.role-viewer { background: #eef4ff; color: #3538cd; border-color: #d1e0ff; }
.role-dept { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.role-leader { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.role-biz { background: #f2f4f7; color: var(--text-2); border-color: #e4e7ec; }

/* ---------- 寄样单生成器 ---------- */
.modal.xwide { width: 1180px; }
.gen-label {
  font-size: 11px; font-weight: 650; color: var(--text-3);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px;
}
.gen-paste textarea {
  width: 100%; height: 104px; padding: 9px 11px; resize: vertical;
  border: 1px solid var(--line); border-radius: 8px; outline: none;
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.65;
}
.gen-paste textarea:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(29,78,216,.08); }
.gen-msg { font-size: 11.5px; margin-top: 6px; min-height: 17px; }

.gen-table { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.gen-table table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.gen-table thead th {
  position: sticky; top: 0; z-index: 2; background: #fbfcfd; text-align: left;
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
  padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.gen-table tbody td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.gen-table tbody tr:last-child td { border-bottom: none; }
.gen-in {
  width: 100%; min-width: 54px; height: 26px; padding: 2px 6px;
  border: 1px solid transparent; border-radius: 5px; background: transparent;
  font-size: 11.5px; outline: none;
}
.gen-in:hover { border-color: var(--line); background: #fff; }
.gen-in:focus { border-color: var(--brand-line); background: #fff; box-shadow: 0 0 0 2px rgba(29,78,216,.08); }
.gen-in.bad { background: #fef3c7; border-color: #fde68a; }
.gen-in.bad2 { background: #fee2e2; border-color: #fecaca; }
.gen-prod { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.gen-prod select { flex: 1; min-width: 0; height: 25px; font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; background: #fff; }
.gen-prod input { width: 46px; height: 25px; font-size: 11px; text-align: center; border: 1px solid var(--line); border-radius: 5px; }
.gen-prod .mini { flex: 0 0 auto; width: 20px; height: 25px; padding: 0; line-height: 1; font-size: 12px; color: var(--text-3); border: 1px solid transparent; background: transparent; }
.gen-prod .mini:hover { color: var(--danger); border-color: var(--line); }
.gen-additem {
  font-size: 10.5px; color: var(--brand); background: transparent; border: none;
  padding: 1px 2px; cursor: pointer;
}
.gen-match { font-size: 10.5px; white-space: nowrap; }
.gen-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0 2px; border-top: 1px solid var(--line-2); margin-top: 12px;
}
.gen-bar .field { height: 30px; }
.gen-seq-hint { font-size: 11px; color: var(--text-3); }
.gen-preview {
  margin-top: 10px; max-height: 190px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; font-size: 11px;
}
.gen-preview table { border-collapse: collapse; white-space: nowrap; }
.gen-preview th, .gen-preview td { border: 1px solid var(--line-2); padding: 3px 6px; }
.gen-preview thead th { background: #fbfcfd; position: sticky; top: 0; font-size: 10px; color: var(--text-3); }

/* 打印 */
@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  .content { padding: 0; }
}

/* ============ 组织架构树 ============ */
.org-dept {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  margin-bottom: 10px;
  background: #fff;
}
.org-dept:last-child { margin-bottom: 0; }
.org-dept-head { display: flex; align-items: center; gap: 10px; }
.org-badge {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.org-teams { margin-top: 10px; padding-left: 40px; display: flex; flex-direction: column; gap: 7px; }
.org-team { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfcfd; }
.org-team-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.org-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.org-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: #eef2f8; color: var(--text-2); white-space: nowrap;
}
.org-chip.off { opacity: .45; text-decoration: line-through; }

/* ============ 企微播报文案预览 ============ */
.wc-preview {
  white-space: pre-wrap;
  font-size: 12.5px;
  line-height: 1.75;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
}

/* ============ 达人公海分页 ============ */
.pool-pager {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 10px 2px 2px; font-size: 11.5px; color: var(--text-3);
}
.pool-pager .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============ 全站可拖选 / 双击复制 ============ */
html, body { -webkit-user-select: text; user-select: text; }
.content, .modal, .drawer, .card, .panel, .table-wrap,
.form-row, .kv-grid, .empty, .section-title {
  -webkit-user-select: text; user-select: text;
}
table.tb td, table.tb th,
.kv .v, .mono, .c-name, .c-sub, .org-chip, .org-team-head,
.wc-preview, code, pre {
  -webkit-user-select: text; user-select: text;
}
/* 只在这些「点了要执行动作」的元素上禁止选中，避免误拖选 */
.nav-item, .btn, .tab, .badge, .role-chip, .pool-pager,
.topbar, .modal-head, .tag, .nav-label, .seg, .seg * {
  -webkit-user-select: none; user-select: none;
}
tr.row-click { cursor: pointer; }
tr.row-click:hover { background: #f7f9fc; }
tr.row-click.selected { background: var(--brand-soft); }

/* ============ 公海达人详情（双栏） ============ */
.pd-grid {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 0 24px;
  align-items: start;
}
.pd-grid .form-grid { gap: 0 12px; }
.pd-grid .table-wrap { max-height: 260px; overflow: auto; }
@media (max-width: 1240px) {
  .pd-grid { grid-template-columns: 1fr; }
}
.modal.xwide { max-width: 96vw; }

/* ============ 多联系方式（多微信 / 多号码 / 多地址） ============ */
.multi-n {
  display: inline-block; margin-left: 4px; padding: 0 4px;
  font-size: 9.5px; font-weight: 700; line-height: 14px;
  color: var(--brand); background: var(--brand-soft); border-radius: 4px;
  vertical-align: middle;
}
.contact-block { border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; padding: 10px 12px; }
.contact-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.contact-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.contact-k { flex: 0 0 62px; font-size: 11px; color: var(--text-3); padding-top: 5px; }
.contact-v { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.contact-v.addr-list { flex-direction: column; align-items: stretch; gap: 7px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 6px 3px 8px; font-size: 12px;
}
.chip-tag {
  font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--ok);
  background: var(--ok-soft, #e7f7ee); border-radius: 3px; padding: 0 4px; line-height: 14px;
}
.chip-x {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0 2px;
}
.chip-x:hover { color: var(--danger); }
.empty-inline { font-size: 12px; color: var(--text-3); }
.addr-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.addr-main { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; }
.addr-ops { display: flex; gap: 5px; flex: 0 0 auto; }

/* ============ 看板周期切换（月度 / 年度） ============ */
.seg { display: inline-flex; background: #f2f4f7; border-radius: 8px; padding: 2px; }
.seg-btn {
  border: 0; background: transparent; cursor: pointer; padding: 4px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-3); border-radius: 6px; line-height: 18px;
}
.seg-btn.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,24,40,.08); }

/* ============ 赛道 / 合作模式 / 资源标签 ============ */
.hint-inline {
  font-style: normal; margin-left: 5px; padding: 0 5px;
  font-size: 9.5px; font-weight: 600; color: var(--text-3);
  background: #f2f4f7; border-radius: 4px; line-height: 15px;
}
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.tag-opt { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.tag-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-opt span {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  font-size: 12px; color: var(--text-2); background: #fff;
  border: 1px solid var(--line); border-radius: 7px;
  -webkit-user-select: none; user-select: none;
}
.tag-opt span:hover { border-color: var(--brand-line); color: var(--brand); }
.tag-opt input:checked + span {
  color: var(--brand); background: var(--brand-soft);
  border-color: var(--brand-line); font-weight: 600;
}
.tag-opt input:focus-visible + span { outline: 2px solid var(--brand-line); outline-offset: 1px; }
.tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }

/* ============ 矩阵账号 ============ */
.mx-new { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mx-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 10px; }
.mx-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mx-members { border-top: 1px dashed var(--line-2); }
.mx-m { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.mx-m:last-child { border-bottom: 0; }
.mx-add { display: flex; gap: 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.mx-add select { flex: 1; min-width: 0; }

/* ============ 拒绝 / 跟进倒计时 ============ */
.owner-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.reject-line {
  font-size: 10.5px; color: var(--danger); margin-top: 3px;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
tr.row-rejected { background: #fffafa; }
tr.row-rejected:hover { background: #fff5f5; }

/* 今天刚从公海领进来的：底色淡绿 + 左侧一道竖线，领完切过来一眼能看到 */
tr.row-fresh { background: #f6fef9; box-shadow: inset 3px 0 0 var(--ok); }
tr.row-fresh:hover { background: #ecfdf3; }
.reject-box {
  margin-top: 12px; border: 1px solid #fecdca; background: #fffbfa;
  border-radius: 9px; padding: 10px 12px;
}
.reject-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; color: var(--danger);
}
.reject-head span { font-weight: 400; font-size: 11px; color: var(--text-3); }
.reject-body { font-size: 12.5px; color: var(--text); margin-top: 6px; line-height: 1.5; }
.reject-note { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* ============================================================
   手机端（≤900px）：侧栏变底部导航、表格变卡片、抽屉/弹窗全屏
   桌面端一行不动，所有规则都关在这个断点里
   ============================================================ */
@media (max-width: 900px) {
  html, body { -webkit-text-size-adjust: 100%; }
  .app { display: block; height: 100dvh; }

  /* ---- 底部导航 ---- */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; flex: none; height: auto;
    flex-direction: row; border-right: 0; border-top: 1px solid var(--line);
    background: #fff; z-index: 60;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(16,24,40,.06);
  }
  .sidebar .brand, .sidebar .sidebar-foot, .nav-label { display: none; }
  .nav {
    display: flex; flex: 1; overflow-x: auto; overflow-y: hidden;
    padding: 5px 4px; gap: 1px; align-items: stretch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { display: contents; }
  .nav-item {
    position: relative; flex: 1 0 auto; min-width: 60px;
    flex-direction: column; justify-content: center; gap: 3px;
    padding: 6px 8px; font-size: 10px; border-radius: 8px;
  }
  .nav-item .ico { font-size: 16px; width: auto; }
  .nav-item .badge { position: absolute; top: 2px; right: 6px; font-size: 9px; height: 14px; padding: 0 4px; line-height: 14px; }
  /* 底部 tab 是白底，把深色侧栏的导航色覆盖回浅色 */
  .nav-item { color: var(--text-2); }
  .nav-item:hover { background: var(--line-2); color: var(--text); }
  .nav-item.active { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
  .nav-item .badge { background: var(--danger-soft); color: var(--danger); }
  .sidebar .avatar { background: var(--brand-soft); color: var(--brand); }

  /* ---- 顶栏 ---- */
  .main { height: 100%; }
  .topbar { height: auto; flex: 0 0 auto; min-height: 52px; padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .topbar .page-title { font-size: 14px; }
  .topbar .page-sub { display: none; }
  .topbar .spacer { flex: 1 0 0; }
  .search-box { order: 9; width: 100%; }
  #btnExport { display: none; }
  .content { padding: 10px 10px 78px; }

  /* ---- 表格变卡片 ---- */
  .table-wrap { overflow-x: visible; max-height: none !important; }
  .card { border-radius: 10px; }
  table.tb, table.tb tbody, table.tb tr, table.tb td { display: block; width: auto; }
  table.tb thead { display: none; }
  table.tb tbody tr {
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; margin: 0 10px 10px; padding: 8px 12px;
  }
  table.tb tbody tr:first-child { margin-top: 10px; }
  table.tb tbody td {
    border: 0; padding: 3px 0; text-align: left;
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 12.5px;
  }
  table.tb td.right, table.tb th.right { text-align: left; }
  table.tb tbody td::before {
    content: attr(data-label);
    flex: 0 0 70px; font-size: 11px; color: var(--text-3); padding-top: 2px;
  }
  table.tb tbody td:not([data-label])::before { content: none; }
  table.tb tbody td:not([data-label]) { padding-left: 0; }
  table.tb tfoot { display: none; }

  /* ---- 筛选栏 ---- */
  .filterbar { padding: 9px 10px; gap: 6px; }
  .filterbar .field { flex: 1 1 44%; min-width: 0; width: auto !important; }
  .filterbar > div[style*="flex:1"] { display: none; }

  /* ---- 抽屉 / 弹窗全屏 ---- */
  .drawer { width: 100%; max-width: 100%; border-left: 0; }
  .drawer-head { padding: 12px 14px; }
  .drawer-body { padding: 0 14px 24px; }
  .drawer-foot { flex-wrap: wrap; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-foot .btn { flex: 0 1 auto; }

  .modal-mask { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.xwide { width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; }
  .modal-body { max-height: 66dvh; padding: 14px; }
  .modal-head { padding: 12px 14px; }
  .modal-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); flex-wrap: wrap; }

  /* ---- 内容区细节 ---- */
  .pd-grid { grid-template-columns: 1fr; }
  .grid.g4, .grid.g3, .grid.g2 { grid-template-columns: 1fr 1fr; }
  .g4 > .card, .grid > .card { min-width: 0; }
  .kpi { padding: 11px 12px; }
  .kpi .k-value { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-k { flex: 0 0 56px; }
  table.tb tbody td.pool-idx { display: none; }
  /* 卡片里操作按钮排成一行、够大好点 */
  table.tb tbody td[data-label="操作"] { flex-wrap: wrap; }
  table.tb tbody td[data-label="操作"] .btn { height: 30px; }
}

/* 超小屏：KPI 也单列，按钮占满 */
@media (max-width: 420px) {
  .grid.g4, .grid.g3, .grid.g2 { grid-template-columns: 1fr; }
  .nav-item { min-width: 54px; font-size: 9.5px; }
}

/* 新建寄样单 · 多规格产品行（一款一行，共用一个原始单号） */
.sm-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.sm-item > select { flex: 1; min-width: 0; }
.sm-item > input[type="number"] { width: 64px; flex: 0 0 auto; }
.sm-item > button { flex: 0 0 auto; }
@media (max-width: 900px) {
  .sm-item { flex-wrap: wrap; }
  .sm-item > select { flex: 1 1 100%; }
}

/* ===== 待处理悬浮框 / 折叠卡（2026-10-27）===== */
.pending-float{position:fixed;right:18px;bottom:18px;z-index:9990;width:260px;background:var(--bg-1,#fff);
  border:1px solid #d97706;border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.16);overflow:hidden;
  transition:width .18s ease}
.pending-float .pf-head{padding:9px 14px;color:#b45309;cursor:pointer;display:flex;flex-direction:column;gap:1px;
  user-select:none}
.pending-float .pf-head b{font-size:13.5px}
.pending-float .pf-mini{font-size:11.5px;color:var(--text-2,#666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pending-float .pf-hint{font-size:11px;color:var(--text-3,#999)}
.pending-float .pf-body{display:none;max-height:70vh;overflow:auto;border-top:1px solid rgba(0,0,0,.08)}
.pending-float:hover .pf-body,.pending-float.open .pf-body{display:block}
.pending-float:hover,.pending-float.open{width:660px}
.pending-float:hover .pf-mini,.pending-float.open .pf-mini{display:none}
.fold .fold-body{display:none}
.fold:hover .fold-body,.fold.open .fold-body{display:block}
.fold .fold-mini{font-size:11.5px;color:var(--text-3,#999);padding:0 14px 10px;cursor:pointer;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.fold:hover .fold-mini,.fold.open .fold-mini{display:none}

/* ---------- 待处理操作区 v2（2026-10-27 重排：卡片式，系统/本地双栏对比） ---------- */
.pending-float{border:2px solid #d97706;box-shadow:0 8px 28px rgba(180,83,9,.22),0 2px 6px rgba(0,0,0,.08)}
.pending-float .pf-head{border-bottom:1px solid rgba(217,119,6,.25);background:rgba(217,119,6,.06)}
.po-list{display:flex;flex-direction:column;gap:10px;padding:10px}
.po-card{border:1.5px solid #e5e7eb;border-radius:10px;background:var(--bg-1,#fff);overflow:hidden}
.po-card.po-conflict{border-color:#fca5a5}
.po-top{display:flex;gap:8px;align-items:center;justify-content:space-between;
  padding:8px 10px;background:rgba(0,0,0,.025);border-bottom:1px solid #eceef1;flex-wrap:wrap}
.po-nick{font-size:13px;font-weight:700;color:var(--text,#111)}
.po-ops{display:flex;gap:6px;flex-wrap:wrap}
.po-ops .btn.sm{font-size:11.5px;padding:3px 8px;white-space:nowrap}
.po-cmp{display:grid;grid-template-columns:1fr 1fr;gap:0}
.po-sec{padding:8px 10px;border-right:1px dashed #e5e7eb;min-width:0}
.po-sec:last-child{border-right:none}
.po-sec-t{font-size:11px;font-weight:700;color:#b45309;letter-spacing:.3px;margin-bottom:5px}
.po-kv{display:flex;gap:6px;font-size:12px;line-height:1.55;min-width:0}
.po-kv>span{color:var(--text-3,#999);white-space:nowrap;flex:0 0 58px}
.po-kv>b{font-weight:600;color:var(--text,#111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.po-na{font-size:11.5px;color:var(--text-3,#999)}
.po-why{padding:7px 10px;border-top:1px solid #f3d6d6;background:rgba(211,51,51,.045);
  color:#c0392b;font-size:12px;font-weight:600;line-height:1.5}

/* ====== 实际寄出（2026-10-27）：本地寄样表扫描闪烁提醒 ====== */
.as-blink-box { display: flex; flex-direction: column; gap: 5px; }
.as-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; border-radius: 9px; font-size: 13px; cursor: pointer;
  background: #fff7ed; border: 1px solid #fdba74;
  animation: asBlink 1.6s ease-in-out infinite;
}
.as-line:nth-child(even) { animation-delay: .8s; }
.as-line:hover { animation-play-state: paused; background: #ffedd5; }
.as-line b { font-size: 13.5px; }
@keyframes asBlink {
  0%, 100% { background: #fff7ed; box-shadow: none; }
  50% { background: #fed7aa; box-shadow: 0 0 0 2px #fb923c inset; }
}
