/* 销售客户管理系统 - 样式 */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #e3e8ef;
  --text: #1b2430;
  --muted: #7c8798;
  --brand: #2f6bff;
  --brand-dark: #1f4fd8;
  --brand-soft: #eaf0ff;
  --green: #17a673;
  --orange: #f59300;
  --red: #e5484d;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 35, 60, .07), 0 6px 20px rgba(20, 35, 60, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; font-weight: 400; }
.num { text-align: right; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1b2a4a 0%, #2f4a7a 55%, #3f6bb5 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--panel);
  border-radius: 16px; padding: 34px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px; flex: none;
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.login-brand h1 { font-size: 19px; font-weight: 600; }
.login-brand p { font-size: 12px; color: var(--muted); margin-top: 3px; }

.field { display: block; margin-bottom: 15px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .input, .sel, .ta {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
  color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .input:focus, .sel:focus, .ta:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .1);
}
.form-error { color: var(--red); font-size: 12px; min-height: 18px; margin-bottom: 6px; }
.login-hint {
  margin-top: 18px; font-size: 11px; color: var(--muted); text-align: center;
  background: #f7f9fc; padding: 9px; border-radius: 7px;
}

/* ---------- 按钮 ---------- */
.btn {
  padding: 9px 16px; border: none; border-radius: 8px; font-size: 13px;
  font-family: inherit; font-weight: 500; cursor: pointer;
  transition: background .15s, opacity .15s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #eef1f6; color: #4a5568; }
.btn-ghost:hover { background: #e2e7ef; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-danger { background: #fdecec; color: var(--red); }
.btn-danger:hover { background: #f8dada; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  border: none; background: transparent; font-size: 17px; cursor: pointer;
  color: var(--muted); padding: 4px 8px; border-radius: 6px; line-height: 1;
}
.icon-btn:hover { background: #eef1f6; color: var(--text); }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px; background: #1b2430; color: #c8d0dc;
  display: flex; flex-direction: column; flex: none;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px;
  color: #fff; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: none; background: transparent; color: #a8b3c4;
  border-radius: 8px; font-size: 13.5px; font-family: inherit; cursor: pointer;
  text-align: left; transition: background .15s, color .15s;
}
.nav-item i { font-style: normal; font-size: 15px; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--brand); color: #fff; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex: none;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { color: #fff; font-size: 13px; font-weight: 500; }
.user-meta span { font-size: 11px; color: #8b95a5; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; flex: none;
}
.topbar h2 { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar .sel { width: auto; min-width: 120px; padding: 6px 10px; font-size: 12.5px; }

.view { padding: 20px 22px 32px; flex: 1; }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.stat-card {
  background: var(--panel); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); border-left: 3px solid var(--brand);
}
.stat-card .label { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.stat-card .value { font-size: 23px; font-weight: 650; letter-spacing: -.3px; }
.stat-card .sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.stat-card.g { border-left-color: var(--green); }
.stat-card.o { border-left-color: var(--orange); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.card-head h3 { font-size: 14px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- 图表 ---------- */
.chart { padding: 18px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12px; }
.bar-label { width: 68px; color: var(--muted); flex: none; text-align: right; }
.bar-track { flex: 1; height: 18px; background: #f0f3f8; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 4px; transition: width .4s; }
.bar-val { width: 92px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 列表 ---------- */
.list-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 18px;
  border-bottom: 1px solid #f2f4f8; font-size: 13px;
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.rank {
  width: 20px; height: 20px; border-radius: 5px; background: #eef1f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); flex: none; font-weight: 600;
}
.rank.top { background: var(--brand); color: #fff; }
.list-val { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input { width: 250px; }
.toolbar .sel { width: auto; min-width: 120px; }

/* ---------- 表格 ---------- */
.table-card { padding: 0; }
.table-scroll { max-height: 640px; overflow-y: auto; }
.table-scroll::-webkit-scrollbar { width: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: #d5dce6; border-radius: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 14px; background: #f8fafc;
  color: var(--muted); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #f2f4f8; vertical-align: middle; }
.table th:nth-child(3), .table td:nth-child(3) { width: 76px; }
.table th:nth-child(4), .table td:nth-child(4) { width: 92px; }
.table th:nth-child(5), .table td:nth-child(5) { width: 84px; }

/* 接单登记：公司与达人列不换行 */
#of-tbody td:nth-child(3),
#of-tbody td:nth-child(4),
#of-tbody td:nth-child(5) { white-space: nowrap; }
#of-tbody .cell-main { white-space: nowrap; }
/* 接单登记表列宽：月份与业务员留足空间 */
#of-tbody td:nth-child(1) { white-space: nowrap; }
#of-tbody td:nth-child(11) { white-space: nowrap; }
#of-tbody td:last-child { white-space: nowrap; min-width: 86px; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.row-actions { display: flex; gap: 6px; }
.link-btn {
  border: none; background: transparent; color: var(--brand);
  font-size: 12.5px; cursor: pointer; padding: 2px 4px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; line-height: 18px; white-space: nowrap;
}
.table td .tag { white-space: nowrap; }
.tag.lv-A { background: #fdecec; color: var(--red); }
.tag.lv-B { background: #fff4e0; color: var(--orange); }
.tag.lv-C { background: #eef1f6; color: var(--muted); }
.tag.st-潜在 { background: #eef1f6; color: #6b7686; }
.tag.st-跟进中 { background: var(--brand-soft); color: var(--brand); }
.tag.st-已合作 { background: #e6f7f0; color: var(--green); }
.tag.st-已流失 { background: #f4f4f6; color: #9aa3b0; }
.tag.plat { background: #f0f4fb; color: #4a6fa5; }

/* ---------- 达人库（产品化展示） ---------- */
.plat-group { margin-bottom: 26px; }
.plat-group-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 0 2px 11px; margin-bottom: 13px;
  border-bottom: 2px solid #eef1f6;
}
.plat-group-name { font-size: 15px; font-weight: 700; color: var(--text); }
.plat-group-count { font-size: 12px; color: var(--muted); }

.talent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}
.talent-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 11px;
}
.talent-card:hover {
  box-shadow: 0 4px 16px rgba(20, 30, 50, .08);
  transform: translateY(-1px); border-color: #cfd9e8;
}
.tc-head { display: flex; gap: 11px; align-items: center; }
.tc-avatar {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #4a7ce8, #6f5ce7);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600;
}
.tc-info { min-width: 0; flex: 1; }
.tc-name {
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc-cat { font-size: 11.5px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 报价档位 */
.tc-tiers { display: flex; flex-direction: column; gap: 5px; }
.tier {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; padding: 5px 10px; background: #f7f9fc; border-radius: 6px;
}
.tier-k { font-size: 11.5px; color: var(--muted); flex: none; }
.tier-v { font-size: 14px; font-weight: 700; color: var(--brand); }
.tier-v.text-p { font-size: 12.5px; font-weight: 600; color: #b45309; }

.tc-stats {
  display: flex; gap: 14px; font-size: 11.5px; color: var(--muted);
  padding-top: 9px; border-top: 1px solid #f2f4f8;
}
.tc-stats b { color: var(--text); font-weight: 600; }
.tc-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px;
}

/* 报价录入网格 */
.price-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
}
.price-grid label { display: flex; flex-direction: column; gap: 4px; }
.price-grid label.full { grid-column: 1 / -1; }
.price-grid label span { font-size: 11.5px; color: var(--muted); }
.price-grid input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 7px; font-size: 13px; font-family: inherit;
}
.price-grid input:focus { outline: none; border-color: var(--brand); }
.sub-title { font-weight: 600; color: var(--text); margin-bottom: 2px; }

/* 抽屉里的外链 */
.dl-link {
  display: inline-block; font-size: 12.5px; color: var(--brand);
  text-decoration: none; padding: 5px 11px; background: var(--brand-soft);
  border-radius: 6px;
}
.dl-link:hover { text-decoration: underline; }


/* 平台多选 */
.plat-picks { display: flex; flex-wrap: wrap; gap: 7px; }
.plat-pick {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 16px;
  font-size: 12.5px; cursor: pointer; user-select: none;
}
.plat-pick input { display: none; }
.plat-pick:has(input:checked) {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand);
}

/* 返点测算框 */
.rebate-calc {
  font-size: 12.5px; color: var(--muted); background: #f7f9fc;
  padding: 9px 12px; border-radius: 7px; line-height: 1.6;
}
.rebate-calc.on { background: #eef4fd; color: #3a4a63; }
.rebate-calc b { color: var(--brand); font-weight: 600; }
.rebate-calc b.hl { color: #d4380d; }


.pool-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start;
}
@media (max-width: 1280px) { .pool-layout { grid-template-columns: 1fr; } }
.pool-claim-card { padding: 0; }
.pool-tabs { padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.pool-tabs .tab { font-size: 13px; }
.pool-claim-card #pool-claims-list { max-height: 560px; overflow-y: auto; }

.claim-row {
  padding: 12px 16px; border-bottom: 1px solid #f2f4f8;
  display: flex; gap: 10px; align-items: flex-start;
}
.claim-row .c-main { flex: 1; min-width: 0; }
.claim-row .c-title { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.claim-row .c-time { font-size: 11px; flex: none; white-space: nowrap; }

.tag.pool-pending { background: #fff4e0; color: var(--orange); }
.tag.pool-approved { background: #e6f7ed; color: var(--green); }
.tag.pool-rejected { background: #fdecec; color: var(--red); }
.tag.pool-cancelled { background: #eef1f6; color: var(--muted); }
.tag.pool-claimed { background: #eaf1fd; color: #3b6fd4; margin-left: 6px; }

/* 入池原因：单行显示，完整内容在 title 提示 */
.pool-reason {
  display: inline-block; max-width: 190px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: #b45309; font-size: 12.5px; cursor: help;
}
.pool-reason em { font-style: normal; color: var(--muted); font-size: 11px; }

/* 项目在公海中的标记 */
.tag.in-pool { background: #f3e8ff; color: #7c3aed; }


.register-layout {
  display: grid; grid-template-columns: 440px 1fr; gap: 18px; align-items: start;
}
@media (max-width: 1280px) { .register-layout { grid-template-columns: 1fr; } }
.reg-list-card { margin-bottom: 0; }
.reg-list-card #reg-list {
  max-height: 620px; overflow-y: auto;
}
.reg-list-card #reg-list::-webkit-scrollbar { width: 8px; }
.reg-list-card #reg-list::-webkit-scrollbar-thumb {
  background: #d5dce6; border-radius: 4px;
}
.reg-form { padding: 18px; }
.form-note {
  font-size: 12px; color: var(--muted); background: #f7f9fc;
  padding: 10px 12px; border-radius: 7px; line-height: 1.6;
}
.reg-form .field-tip { font-size: 11px; color: var(--muted); margin-top: 4px; }
.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line);
}

.upload-zone {
  border: 2px dashed #ccd5e0; border-radius: 10px; padding: 22px 14px;
  text-align: center; cursor: pointer; background: #fafbfd;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand); background: var(--brand-soft);
}
.upload-hint p { font-size: 13px; color: #5a6577; margin: 7px 0 4px; }
.upload-icon {
  width: 36px; height: 36px; margin: 0 auto; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  background: #f7f9fc; border-radius: 7px; font-size: 12.5px;
}
.file-item img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; flex: none; }
.file-item .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fs { color: var(--muted); font-size: 11.5px; flex: none; }

/* 登记列表条目 */
.reg-row {
  padding: 13px 18px; border-bottom: 1px solid #f2f4f8;
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
}
.reg-row:hover { background: #fafbfd; }
.reg-row .r-main { flex: 1; min-width: 0; }
.reg-row .r-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.reg-row .r-name { font-size: 13.5px; font-weight: 600; }
.reg-row .r-meta { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.reg-row .r-proj { font-size: 12px; color: #5a6577; margin-top: 5px; }
.reg-row .r-shot { font-size: 11.5px; color: var(--brand); margin-top: 4px; }

/* 等级标签 */
.tag.lv-s { background: #f3e8ff; color: #7c3aed; }
.tag.lv-A { background: #fdecec; color: var(--red); }
.tag.lv-B { background: #fff4e0; color: var(--orange); }
.tag.lv-C { background: #eef1f6; color: var(--muted); }

/* 截图宫格 */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; }
.shot-card {
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff;
  min-width: 0;
}
.shot-card .shot-img { width: 100%; height: 108px; object-fit: cover; cursor: zoom-in; display: block; background: #f2f4f8; }
.shot-card .shot-meta { padding: 8px 10px; }
.shot-card .shot-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-card .shot-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.shot-card .shot-del { float: right; border: none; background: transparent; color: var(--red); cursor: pointer; font-size: 11.5px; font-family: inherit; }

.proj-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: #f4f7fc; border: 1px solid #e2e9f3; border-radius: 20px;
  font-size: 12.5px; margin: 0 6px 6px 0;
}
.proj-chip .x { cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.proj-chip .x:hover { color: var(--red); }

/* 图片查看器 */
.lightbox {
  position: fixed; inset: 0; background: rgba(12, 18, 28, .9); z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 30px;
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; color: #fff; font-size: 26px;
  background: transparent; border: none; cursor: pointer; line-height: 1;
}
.lightbox .lb-info {
  position: absolute; bottom: 20px; left: 0; right: 0; text-align: center;
  color: #cfd6e0; font-size: 12.5px;
}


.drawer-mask, .modal-mask {
  position: fixed; inset: 0; background: rgba(20, 30, 45, .38); z-index: 40;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 94vw;
  background: var(--panel); z-index: 41; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.12); animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; flex: none;
}
.drawer-head h3 { font-size: 16px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 22px 20px; }
.drawer-foot {
  padding: 12px 22px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex: none; background: #fbfcfe;
}

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 -22px 18px; padding: 0 22px; }
.tab {
  border: none; background: transparent; padding: 12px 14px; cursor: pointer;
  font-size: 13px; font-family: inherit; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
/* 抽屉为 flex 布局，页签需允许收缩，否则内部网格/列表会塌成竖排 */
.tab-pane { min-width: 0; width: 100%; }
.tab-pane > * { min-width: 0; }
/* 抽屉里的行列表：强制占满宽度，避免被 flex 压成竖排 */
.tab-pane .list-row { width: 100%; }
.tab-pane .list-row .grow { min-width: 0; flex: 1 1 auto; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.ta { resize: vertical; min-height: 74px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
.info-item .k { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.info-item .v { font-size: 13.5px; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-soft);
}
.tl-time { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.tl-body { font-size: 13.5px; line-height: 1.6; }
.tl-next { font-size: 12px; color: var(--orange); margin-top: 4px; }

/* ---------- 看板 ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.board-col {
  flex: none; width: 232px; background: #eef1f6; border-radius: var(--radius);
  padding: 12px; min-height: 400px;
}
.board-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.board-col .col-sub { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.opp-card {
  background: #fff; border-radius: 8px; padding: 11px; margin-bottom: 9px;
  box-shadow: 0 1px 3px rgba(20,35,60,.07); cursor: pointer;
}
.opp-card:hover { box-shadow: 0 3px 10px rgba(20,35,60,.12); }
.opp-card .t { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.opp-card .c { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.opp-card .a { font-size: 13.5px; color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 弹窗 ---------- */
.modal-mask { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal {
  background: var(--panel); border-radius: 12px; width: 100%; max-width: 540px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.22); animation: popIn .18s ease;
}
@keyframes popIn { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; flex: none;
}
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 12px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex: none;
}
.modal-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  background: #1b2430; color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; z-index: 60; box-shadow: 0 6px 24px rgba(0,0,0,.2);
  animation: popIn .18s ease;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* ---------- 业绩报表 ---------- */
.perf-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.perf-year-tabs { display: flex; gap: 4px; }
.ytab {
  padding: 6px 14px; border: 1px solid var(--line); background: #fff;
  border-radius: 7px; font-size: 12.5px; cursor: pointer; color: var(--muted);
  font-family: inherit;
}
.ytab:hover { border-color: var(--brand); color: var(--brand); }
.ytab.active {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600;
}
.perf-view-tabs { display: flex; gap: 2px; margin-left: auto;
  background: #eef1f6; padding: 3px; border-radius: 8px; }
.ptab {
  padding: 6px 14px; border: none; background: transparent;
  border-radius: 6px; font-size: 12.5px; cursor: pointer;
  color: var(--muted); font-family: inherit;
}
.ptab.active { background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 同比徽标 */
.yoy {
  font-size: 11px; font-weight: 600; margin-left: 7px;
  padding: 1px 6px; border-radius: 4px; vertical-align: middle;
}
.yoy.up { background: #e6f7ed; color: #1a8754; }
.yoy.down { background: #fdecec; color: #d4380d; }

/* 月度趋势柱状图 */
.trend-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 190px; padding: 8px 2px 0;
}
.trend-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; min-width: 0; cursor: default;
}
.trend-col.cur .trend-bar { background: linear-gradient(180deg, #4a7ce8, #6f5ce7); }
.trend-col:not(.cur) .trend-bar { background: #d5dde8; }
.trend-bar {
  width: 100%; max-width: 34px; border-radius: 4px 4px 0 0;
  min-height: 3px; transition: height .3s;
}
.trend-val {
  font-size: 10.5px; color: var(--muted); margin-bottom: 3px;
  white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.trend-col:hover .trend-val { opacity: 1; }
.trend-lbl { font-size: 10.5px; color: var(--muted); margin-top: 5px; }

/* 年度对比 */
.yr-row {
  display: grid; grid-template-columns: 52px 1fr 92px;
  grid-template-areas: "name bar amt" "name bar sub";
  align-items: center; gap: 3px 9px;
  padding: 8px 6px; border-radius: 7px; cursor: pointer;
}
.yr-row:hover { background: #f7f9fc; }
.yr-row.cur { background: var(--brand-soft); }
.yr-name { grid-area: name; font-size: 12.5px; font-weight: 600; color: var(--text); }
.yr-bar-wrap {
  grid-area: bar; height: 10px; background: #eef1f6; border-radius: 4px; overflow: hidden;
}
.yr-bar { height: 100%; background: #b9c7da; border-radius: 4px; }
.yr-row.cur .yr-bar { background: var(--brand); }
.yr-amt { grid-area: amt; font-size: 12px; text-align: right; font-weight: 600; white-space: nowrap; }
.yr-sub { grid-area: sub; font-size: 10.5px; color: var(--muted); text-align: right; white-space: nowrap; }

/* 迷你条形列表 */
.mini-row {
  display: flex; align-items: center; gap: 9px; padding: 5px 2px;
}
.mini-k { font-size: 12px; width: 68px; flex: none; color: var(--text); }
.mini-bar-wrap {
  flex: 1; height: 7px; background: #eef1f6; border-radius: 4px; overflow: hidden;
}
.mini-bar { height: 100%; background: linear-gradient(90deg, #7ea3e8, #4a7ce8); border-radius: 4px; }
.mini-v { font-size: 11.5px; width: 78px; text-align: right; flex: none; }

.mini-table { width: 100%; }
.mini-table td { padding: 6px 4px; font-size: 12px; border-bottom: 1px solid #f4f6f9; }
.mini-table .rank {
  width: 22px; color: var(--muted); font-size: 11px; text-align: center;
}
.mini-table .num { text-align: right; font-weight: 600; }

/* 布局 */
.perf-row {
  display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-bottom: 16px;
}
@media (max-width: 1180px) { .perf-row { grid-template-columns: 1fr; } }
.perf-row2 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px;
}
@media (max-width: 1180px) { .perf-row2 { grid-template-columns: 1fr; } }
.perf-chart-card, .perf-side-card { padding-bottom: 14px; }

/* 项目表：金额条 + 月度小柱 */
.amt-bar {
  height: 3px; background: #eef1f6; border-radius: 2px; margin-top: 4px;
  overflow: hidden; min-width: 40px;
}
.amt-bar > div { height: 100%; background: var(--brand); border-radius: 2px; }
.mpills { display: flex; gap: 2px; align-items: flex-end; height: 50px; }
.mpill {
  width: 7px; background: linear-gradient(180deg, #9db8e8, #4a7ce8);
  border-radius: 2px 2px 0 0; display: inline-block;
}
.mtick { height: 6px; background: var(--brand); border-radius: 3px; }
.mkey { font-weight: 600; font-size: 12.5px; }
.tchip {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: #eef4fd; color: #3b6fd4; margin: 1px 3px 1px 0;
}
.tchip.more { background: #eef1f6; color: var(--muted); }

/* ================= 销售业绩大屏 ================= */
.db-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.db-title { display: flex; align-items: baseline; gap: 10px; }
.db-title h3 { font-size: 17px; font-weight: 700; margin: 0; }
.db-year-tabs { display: flex; gap: 4px; }
.db-ytab {
  padding: 6px 15px; border: 1px solid var(--line); background: #fff;
  border-radius: 7px; font-size: 12.5px; cursor: pointer; color: var(--muted);
  font-family: inherit; transition: all .15s;
}
.db-ytab:hover { border-color: var(--brand); color: var(--brand); }
.db-ytab.active {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(74,124,232,.28);
}

/* KPI 卡 */
.db-kpi {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px;
}
@media (max-width: 1280px) { .db-kpi { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .db-kpi { grid-template-columns: repeat(2, 1fr); } }
.db-kpi-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; position: relative; overflow: hidden;
}
.db-kpi-card.kpi-main {
  background: linear-gradient(135deg, #4a7ce8, #6f5ce7);
  border-color: transparent; color: #fff;
}
.db-kpi-card.kpi-main::after {
  content: ""; position: absolute; right: -28px; top: -28px;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.db-kpi-label {
  font-size: 12px; color: var(--muted); display: flex;
  align-items: center; gap: 6px; margin-bottom: 7px;
}
.db-kpi-card.kpi-main .db-kpi-label { color: rgba(255,255,255,.82); }
.db-kpi-value {
  font-size: 25px; font-weight: 700; letter-spacing: -.4px;
  line-height: 1.15; color: var(--text);
}
.db-kpi-card.kpi-main .db-kpi-value { color: #fff; font-size: 28px; }
.db-kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.db-kpi-card.kpi-main .db-kpi-sub { color: rgba(255,255,255,.75); }
.db-yoy {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px;
}
.db-yoy.up { background: #e6f7ed; color: #1a8754; }
.db-yoy.down { background: #fdecec; color: #d4380d; }
.db-kpi-card.kpi-main .db-yoy.up { background: rgba(255,255,255,.22); color: #fff; }
.db-kpi-card.kpi-main .db-yoy.down { background: rgba(255,255,255,.22); color: #fff; }

/* 布局 */
.db-row { display: grid; gap: 16px; margin-bottom: 16px; }
.db-row-a { grid-template-columns: 1fr 1fr; }
.db-row-b { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1280px) {
  .db-row-a, .db-row-b { grid-template-columns: 1fr; }
}
.db-card { padding-bottom: 14px; }
.db-full { margin-bottom: 16px; }

/* 年度对比柱 */
.db-ybars {
  display: flex; align-items: flex-end; gap: 14px;
  height: 210px; padding: 12px 4px 0;
}
.db-ycol {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; cursor: pointer;
}
.db-ycol:hover .db-ybar { filter: brightness(1.08); }
.db-ybar {
  width: 100%; max-width: 60px; border-radius: 6px 6px 0 0; position: relative;
  background: linear-gradient(180deg, #a8c0e8, #dbe4f2);
  display: flex; justify-content: center; min-height: 4px;
  transition: height .35s;
}
.db-ycol.cur .db-ybar { background: linear-gradient(180deg, #4a7ce8, #6f5ce7); }
.db-ycnt {
  position: absolute; top: -19px; font-size: 10.5px;
  color: var(--muted); white-space: nowrap;
}
.db-ycol.cur .db-ycnt { color: var(--brand); font-weight: 600; }
.db-yval { font-size: 11.5px; color: var(--text); font-weight: 600; margin-bottom: 5px; }
.db-ylbl { font-size: 12px; color: var(--muted); margin-top: 7px; }
.db-ycol.cur .db-ylbl { color: var(--brand); font-weight: 600; }

/* 月度走势 */
.db-mbars {
  display: flex; align-items: flex-end; gap: 8px;
  height: 210px; padding: 12px 4px 0;
}
.db-mcol {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; min-width: 0;
}
.db-mbar {
  width: 100%; max-width: 40px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #7ea3e8, #4a7ce8); min-height: 3px;
  transition: height .35s;
}
.db-mval {
  font-size: 10.5px; color: var(--muted); margin-bottom: 4px;
  white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.db-mcol:hover .db-mval { opacity: 1; }
.db-mlbl { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* 业务员矩阵 */
.db-matrix-wrap { overflow-x: auto; }
.db-matrix { width: 100%; border-collapse: separate; border-spacing: 2px; }
.db-matrix th {
  font-size: 11px; color: var(--muted); font-weight: 500;
  padding: 5px 4px; text-align: center; white-space: nowrap;
}
.db-matrix th.mx-name { text-align: left; min-width: 84px; }
.db-matrix th em {
  display: block; font-style: normal; font-size: 10px; color: #b3bfd0;
}
.db-matrix th.mx-m.has em { color: var(--brand); font-weight: 600; }
.db-matrix th.mx-total { text-align: right; min-width: 128px; }
.db-matrix td.mx-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  padding: 6px 8px; white-space: nowrap;
}
.db-matrix td.mx-cell {
  text-align: center; font-size: 11px; padding: 8px 4px;
  border-radius: 5px; color: #23324d; font-weight: 600;
  min-width: 44px; white-space: nowrap;
}
.db-matrix td.mx-cell.empty { color: #ccd4e0; background: #f7f9fc; font-weight: 400; }
.db-matrix td.mx-total {
  text-align: right; font-size: 12.5px; font-weight: 700;
  color: var(--brand); padding: 6px 8px; white-space: nowrap;
}
.db-matrix td.mx-total em {
  display: block; font-style: normal; font-size: 10.5px;
  color: var(--muted); font-weight: 400;
}
.db-matrix tbody tr:hover td { outline: 1px solid #dbe4f2; }

/* 平台接单 */
.db-plat-row {
  display: grid; grid-template-columns: 78px 1fr 84px;
  grid-template-areas: "name track amt" "name meta meta";
  align-items: center; gap: 2px 9px; padding: 7px 0;
  border-bottom: 1px solid #f4f6f9;
}
.db-plat-name { grid-area: name; font-size: 12.5px; font-weight: 600; }
.db-plat-track {
  grid-area: track; height: 8px; background: #eef1f6;
  border-radius: 4px; overflow: hidden;
}
.db-plat-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #7ea3e8, #4a7ce8);
}
.db-plat-amt {
  grid-area: amt; text-align: right; font-size: 12.5px; font-weight: 700;
  color: var(--text);
}
.db-plat-meta { grid-area: meta; font-size: 10.5px; color: var(--muted); }

/* 榜单表 */
.db-table-scroll { max-height: 300px; overflow-y: auto; }
.db-tbl { width: 100%; }
.db-tbl td, .db-tbl th {
  padding: 7px 6px; font-size: 12px; border-bottom: 1px solid #f4f6f9;
  text-align: left; vertical-align: middle;
}
.db-tbl th { font-size: 11px; color: var(--muted); font-weight: 500; }
.db-tbl .num { text-align: right; }
.db-rank {
  width: 22px; text-align: center; color: var(--muted);
  font-size: 11px; font-weight: 600;
}
.db-rank.r1 { color: #d4a017; }
.db-rank.r2 { color: #8a94a6; }
.db-rank.r3 { color: #b07d4a; }
.db-tbl-main {
  font-weight: 600; color: var(--text);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-tbl-sub { font-size: 10.5px; color: var(--muted); }
.db-tbl-bar {
  width: 70px; height: 5px; background: #eef1f6;
  border-radius: 3px; overflow: hidden;
}
.db-tbl-bar > div { height: 100%; background: var(--brand); border-radius: 3px; }
.db-tbl-num { text-align: right; font-weight: 600; white-space: nowrap; }
.db-tbl-wide .db-tbl-bar { width: 150px; }

/* 自营达人 */
.db-own-sum {
  font-size: 12px; color: var(--muted); padding: 0 0 10px;
  border-bottom: 1px solid #f4f6f9; margin-bottom: 8px;
}
.db-own-sum b { color: var(--brand); font-size: 15px; font-weight: 700; }
.db-own-sum span { margin-left: 8px; }
.db-own-row {
  display: grid; grid-template-columns: 58px 1fr 80px;
  grid-template-areas: "plat track amt" "plat meta meta";
  align-items: center; gap: 2px 8px; padding: 6px 0;
}
.db-own-plat { grid-area: plat; font-size: 12px; font-weight: 600; }
.db-own-track { grid-area: track; height: 7px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.db-own-fill { height: 100%; background: linear-gradient(90deg, #9b8ae8, #6f5ce7); border-radius: 4px; }
.db-own-amt { grid-area: amt; text-align: right; font-size: 12.5px; font-weight: 700; }
.db-own-meta { grid-area: meta; font-size: 10.5px; color: var(--muted); }
.db-own-top { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f4f6f9; }
.db-otag {
  display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 5px;
  background: #f0edfc; color: #5f4bc4; margin: 2px 4px 2px 0;
}

/* 矩阵列宽微调 */
.db-matrix { table-layout: fixed; }
.db-matrix th.mx-name, .db-matrix td.mx-name { width: 92px; }
.db-matrix th.mx-total, .db-matrix td.mx-total { width: 132px; }
.db-matrix th.mx-m { width: auto; min-width: 52px; }
.db-matrix th.mx-m.none { color: #ccd4e0; }
.db-matrix th.mx-m.none em { color: #dde3ec; }
.db-matrix td.mx-cell { min-width: 52px; }

/* 项目榜列宽 */
.db-tbl-wide { table-layout: fixed; }
.db-tbl-wide td, .db-tbl-wide th { overflow: hidden; text-overflow: ellipsis; }

/* ================= 系统设置（标签与格式） ================= */
:root {
  --tag-radius: 5px;
  --tag-font-size: 12px;
}
.tag {
  border-radius: var(--tag-radius);
  font-size: var(--tag-font-size);
}

/* 显示格式 */
.settings-grid { padding: 4px 18px 18px; }
.settings-group { margin-bottom: 18px; }
.settings-group:last-child { margin-bottom: 0; }
.settings-group h5 {
  font-size: 12px; color: var(--muted); font-weight: 600;
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid #f2f4f8;
}
.settings-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px 18px;
}
.settings-item { display: flex; flex-direction: column; gap: 5px; }
.settings-item > span { font-size: 12px; color: var(--muted); }
.settings-item input, .settings-item select {
  height: 32px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-family: inherit; color: var(--text);
}
.settings-item input:focus, .settings-item select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74,124,232,.12);
}

/* 字典布局 */
.dict-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 0; min-height: 420px;
}
@media (max-width: 980px) { .dict-layout { grid-template-columns: 1fr; } }
.dict-side {
  border-right: 1px solid var(--line);
  padding: 8px; overflow-y: auto; max-height: 560px;
  background: #fafbfd;
}
@media (max-width: 980px) {
  .dict-side {
    border-right: none; border-bottom: 1px solid var(--line);
    max-height: 190px;
  }
}
.dict-side-item {
  padding: 9px 11px; border-radius: 7px; cursor: pointer;
  margin-bottom: 2px; transition: background .12s;
}
.dict-side-item:hover { background: #eef2f8; }
.dict-side-item.active { background: var(--brand-soft); }
.ds-name { font-size: 13px; font-weight: 600; color: var(--text); }
.dict-side-item.active .ds-name { color: var(--brand); }
.ds-count {
  float: right; font-size: 11px; color: var(--muted);
  background: #eef1f6; padding: 1px 6px; border-radius: 4px;
}
.dict-side-item.active .ds-count { background: #fff; color: var(--brand); }
.ds-desc {
  font-size: 11px; color: var(--muted); margin-top: 3px;
  line-height: 1.45;
}
.dict-main { padding: 14px 18px 18px; }
.dict-main-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.dict-main-head h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.dict-main-head .muted { font-size: 12px; }

/* 颜色 */
.dict-color-cell { display: flex; align-items: center; gap: 7px; }
.dict-swatch {
  width: 18px; height: 18px; border-radius: 5px;
  display: inline-block; border: 1px solid rgba(0,0,0,.08);
  flex: none;
}
.dict-color-txt {
  font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace;
}
.dict-ops { white-space: nowrap; }
.dict-builtin { font-size: 11px; margin-left: 8px; }
.dict-ops .link-btn { margin-right: 4px; }

/* 取色器 */
.color-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.cp {
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s;
  display: inline-block;
}
.cp:hover { transform: scale(1.12); }
.cp.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px #fff inset;
}

/* ================= 批量导入弹窗 ================= */
.import-tip {
  font-size: 13px; line-height: 1.7; color: var(--muted);
  background: rgba(0,0,0,.035); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px;
}
.import-dl { margin-bottom: 12px; }
.import-summary {
  font-size: 14px; margin-top: 12px; padding: 10px 14px;
  border-radius: 10px; background: rgba(48,164,108,.1); color: #217a53;
}
.import-errors { margin-top: 10px; }
.import-errors h6 {
  margin: 0 0 6px; font-size: 12px; font-weight: 600; color: #c0392b;
}
.import-errors ul {
  margin: 0; padding-left: 18px; max-height: 180px; overflow: auto;
  font-size: 12.5px; line-height: 1.8; color: #a94438;
  background: rgba(229,72,77,.07); border-radius: 10px; padding: 8px 14px 8px 26px;
}

/* ================= OA 返点审批 ================= */
.tag.rbst-wait { background: #fff4e0; color: var(--orange); }
.tag.rbst-ok   { background: #e6f7f0; color: var(--green); }
.tag.rbst-no   { background: #fdecec; color: var(--red); }
.tag.rbst-back { background: #eef1f6; color: var(--muted); }
.tag.rbst-none { background: #f4f5f7; color: #8b95a3; }

.oa-detail { font-size: 13px; }
.oa-dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.oa-code { font-weight: 650; font-size: 15px; letter-spacing: .2px; }
.oa-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 14px; }
.oa-kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 11px; background: rgba(0,0,0,.025); border-radius: 8px;
}
.oa-kv span { color: var(--muted); flex: none; }
.oa-kv b { font-weight: 550; text-align: right; }

.oa-rbcmp {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f7f9fc; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.oa-rb {
  flex: 1; min-width: 108px; text-align: center;
  padding: 8px 6px; border-radius: 8px; background: #fff;
  border: 1px solid rgba(0,0,0,.04);
}
.oa-rb i {
  display: block; font-style: normal; font-size: 11px;
  color: var(--muted); margin-bottom: 4px;
}
.oa-rb b { font-size: 16px; letter-spacing: -.2px; }
.oa-rb em {
  display: block; font-style: normal; font-size: 12px;
  color: var(--muted); margin-top: 2px;
}
.oa-rb.on { background: #eef4fd; border-color: #cfe0f8; }
.oa-rb.on b { color: var(--brand); }
.oa-arrow { color: #b6bfcc; font-size: 16px; }
.oa-delta { width: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.oa-up { color: var(--red); font-weight: 600; }
.oa-down { color: var(--green); font-weight: 600; }

.oa-block {
  background: rgba(0,0,0,.025); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 10px;
}
.oa-block i {
  font-style: normal; font-size: 11.5px; color: var(--muted);
  display: block; margin-bottom: 4px;
}
.oa-block p { margin: 0; line-height: 1.7; }
.oa-audit { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.oa-cur {
  background: #f7f9fc; border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px;
}
.oa-cur-row { display: flex; justify-content: space-between; padding: 4px 0; }
.oa-cur-row span { color: var(--muted); }
.oa-warn {
  margin-top: 6px; font-size: 12px; color: #a96b00;
  background: #fff4e0; padding: 6px 10px; border-radius: 8px;
}

/* ================= OA 打款信息与发票 ================= */
.oa-pt-row { display: flex; gap: 10px; margin-top: 12px; }
.oa-pt {
  flex: 1; display: flex; align-items: center; gap: 9px;
  border: 1px solid rgba(0,0,0,.09); border-radius: 10px;
  padding: 10px 13px; cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s;
}
.oa-pt:hover { border-color: var(--brand); }
.oa-pt input { accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
.oa-pt span { display: flex; flex-direction: column; line-height: 1.35; }
.oa-pt b { font-size: 13.5px; }
.oa-pt i { font-style: normal; font-size: 11px; color: var(--muted); }
.oa-pt:has(input:checked) { border-color: var(--brand); background: #eef4fd; }
.oa-pt:has(input:checked) b { color: var(--brand); }

.oa-inv-list { font-size: 12px; }
.oa-inv-have {
  background: rgba(0,0,0,.03); border-radius: 8px;
  padding: 6px 10px; margin-top: 6px; color: #55606e; line-height: 1.6;
}

.oa-inv-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 4px;
}
.oa-inv {
  border: 1px solid rgba(0,0,0,.07); border-radius: 10px;
  overflow: hidden; background: #fff; cursor: pointer;
}
.oa-inv-thumb {
  height: 92px; display: flex; align-items: center; justify-content: center;
  background: #f4f6fa; font-size: 12px;
}
.oa-inv-img { width: 100%; height: 92px; object-fit: cover; display: block; }
.oa-inv-pdf {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 30px; padding: 0 10px;
  background: #fdecec; color: var(--red);
  border-radius: 7px; font-size: 12px; font-weight: 650;
  text-decoration: none;
}
.oa-inv-name {
  padding: 6px 9px; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
