:root {
  --brand: #2f5597;
  --brand-dark: #24406f;
  --brand-soft: #eef3fb;
  --ink: #1a2b4c;
  --sub: #6b7280;
  --muted: #9aa4b2;
  --line: #eceff4;
  --bg: #f5f7fa;
  --warn: #b54708;
  --warn-bg: #fff4e5;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #24406f 0%, #2f5597 48%, #3f6cb5 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  box-shadow: 0 20px 60px rgba(15, 40, 90, 0.28);
}

.login-card h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.login-sub {
  margin: 6px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
}

.code-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f1f4f9;
  border-radius: 9px;
  margin-bottom: 22px;
}

.login-tab {
  flex: 1;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sub);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.login-tab:hover {
  color: var(--brand);
}

.login-tab.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 40, 90, 0.12);
}

.login-tip {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.login-tip a {
  color: var(--brand);
  text-decoration: none;
}

.login-tip a:hover {
  text-decoration: underline;
}

.code-row .field {
  flex: 1;
  margin-bottom: 16px;
}

.btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  height: 42px;
  padding: 0 16px;
  border: 1px solid #c8d4e8;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 16px;
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin: 10px 0 0;
}

/* ---------- 主布局 ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 208px;
  flex-shrink: 0;
  background: #1d3557;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 0 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  padding: 0 22px 20px;
  letter-spacing: 0.5px;
}

.nav-item {
  display: block;
  padding: 11px 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #7fa8e8;
  font-weight: 500;
}

/* 跳到独立页面（资料收件箱）的链接：外观同 nav-item，但不是 SPA 视图切换，
   所以故意不用 .nav-item 类 —— 那个类被 app.js 绑了 setView(data-nav) */
.nav-link {
  display: block;
  padding: 11px 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* 导航上的待办角标：有待确认申请时亮起，0 条时隐藏 */
.nav-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 8px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: #e05252;
  border-radius: 999px;
  vertical-align: 1px;
  font-weight: 600;
}

.nav-badge.hidden {
  display: none;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.me-name {
  font-size: 14px;
  font-weight: 500;
}

.me-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.btn-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 60px;
}

/* 代看提示条：横贯内容区顶部并吸顶。
   不能用「侧栏换个名字」代替它 —— 侧栏上的字容易被当成自己的名字划过去，
   而顶部这条一直在视线里，提醒「你现在看到的是别人的数据」。 */
.viewas-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -28px -32px 20px;
  padding: 10px 32px;
  background: #fff6e8;
  border-bottom: 1px solid #f3d9ab;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.5;
}

.viewas-bar .btn-link {
  flex: 0 0 auto;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 500;
}

.ops-cell .link-btn + .link-btn {
  margin-left: 12px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.page-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.banner {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ---------- 指标卡 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(15, 40, 90, 0.05);
}

.metric-label {
  font-size: 13px;
  color: var(--sub);
}

.metric-value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.2;
}

.metric-value.warn {
  color: var(--warn);
}

.metric-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- 表格 ---------- */
.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 40, 90, 0.05);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar input[type="search"],
.toolbar select {
  height: 36px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  background: #fff;
}

.toolbar input[type="search"] {
  width: 220px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--sub);
  padding: 10px 20px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}

tbody tr:hover {
  background: #fbfcfe;
}

.cust-name {
  font-weight: 500;
  color: var(--ink);
}

.cust-tax {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 4px;
  padding: 2px 8px;
}

.chip-empty {
  color: var(--warn);
  background: var(--warn-bg);
}

.badge {
  display: inline-block;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 10px;
}

.badge-ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.badge-warn {
  color: var(--warn);
  background: var(--warn-bg);
}

.badge-danger {
  color: var(--danger);
  background: #fdeceb;
}

.badge-plain {
  color: #6b7280;
  background: #f2f4f8;
}

/* 自动调度面板：一行说清「跑没跑」，下面才是明细 */
.sched-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f7f9fc;
  border-radius: 8px;
  margin: 12px 16px;
}

.sched-desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

.row-actions {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

.link {
  color: var(--brand);
  cursor: pointer;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

.link-danger {
  color: var(--danger);
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 标签库 ---------- */
.dim-block {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.dim-block:last-child {
  border-bottom: none;
}

.dim-title {
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 12px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 160px;
}

.tag-card-name {
  font-weight: 500;
  font-size: 13px;
}

.tag-card-items {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* ---------- 抽屉 ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 560px;
  max-width: 94vw;
  background: #fff;
  z-index: 41;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(15, 40, 90, 0.18);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  font-size: 16px;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.drawer-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #dfe5ee;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.btn:hover {
  border-color: #c8d4e8;
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

.btn-brand:hover {
  background: var(--brand-dark);
}

.btn-brand:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.close-x {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row > label {
  display: block;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 6px;
}

.form-row input,
.form-row select {
  width: 100%;
  height: 40px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  background: #fff;
}

.form-row input:focus,
.form-row select:focus {
  border-color: var(--brand);
}

.form-row input[readonly] {
  background: #f7f9fc;
  color: var(--sub);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-note {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 12px;
  line-height: 1.6;
}

.dim-line {
  margin-bottom: 14px;
}

.dim-line-label {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 8px;
}

.pick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pick {
  border: 1px solid #e2e8f2;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  color: #475467;
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition: all 0.12s;
}

.pick:hover {
  border-color: #b9c9e2;
}

.pick.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pick-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

.checklist {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.checklist-item:last-child {
  border-bottom: none;
}

.cl-source {
  font-size: 11px;
  color: var(--muted);
}

.cl-remove {
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
}

.checklist-empty {
  padding: 20px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.add-item {
  margin-top: 10px;
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px 20px;
  box-shadow: 0 20px 60px rgba(15, 40, 90, 0.25);
}

.modal h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.modal p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
}

.modal .modal-note {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.65;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* 追加材料弹窗：字段比别的弹窗多，宽一点、滚动兜底，
   小屏上不能让「加入清单」按钮掉到屏幕外 */
.modal-extra {
  max-width: 470px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

/* 原因 / 截止日快选。财务一天要加七八项，每一项都手打一句原因不现实，
   打不出来就会空着 —— 空着的话客户看到的就是「补充材料」四个字 */
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.quick-chip {
  font-size: 12px;
  line-height: 22px;
  padding: 0 9px;
  border: 1px solid #dfe5ee;
  border-radius: 11px;
  color: var(--sub);
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}

.quick-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.quick-chip.on {
  border-color: var(--brand);
  color: var(--brand);
  background: #eef4ff;
}

/* 同名追加项提示：同一家两个月里加两次「9 月对账单」，
   客户清单上就是两条一样的，谁也说不清要传哪个 */
.extra-hint {
  margin: -8px 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #9a5b00;
  background: #fff6e8;
  border: 1px solid #f0c98d;
  border-radius: 6px;
  padding: 6px 9px;
}

/* 保存后的通知话术。等宽字 + 保留换行：顾问复制的是这段原文，
   预览和粘出去的必须长得一样，不然复制完还得自己调格式 */
.notify-text {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #f7f9fc;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
}

/* 追加项上的截止日 / 逾期标记 */
.chip-due {
  font-style: normal;
  font-size: 10px;
  margin-left: 5px;
  color: #8a5200;
  opacity: 0.85;
}

.chip-late {
  font-style: normal;
  font-size: 10px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 3px;
  background: #fde2e1;
  color: #b42318;
}

/* 客户交了、等财务点头：不能和「已收」长得一样，
   否则财务永远想不起来还有一张截图等着看 */
.chip-pending {
  color: #1d5fd0;
  background: #eaf1ff;
  border-color: #b9cdf5;
}

/* 追加项右上角的撤回：加错了要能撤，不然客户清单里会永远挂着一项 */
.chip-drop {
  font-style: normal;
  margin-left: 6px;
  color: #98a2b3;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.chip-drop:hover {
  color: #b42318;
}

/* 角色和上级并排：两者是联动的，摆一行里才好看出「谁挂在谁下面」 */
.emp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

/* 绑定状态：员工页三列都用它，绿=已绑，灰=没绑。
   这三项决定权限认不认得出人，之前界面上完全看不见。 */
.bind-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  border-radius: 99px;
  background: #f0f2f5;
  color: #8a94a6;
  white-space: nowrap;
}

.bind-tag.on {
  background: #e8f3ec;
  color: #2f7a4d;
}

/* 待确认：申请已提交但还没生效。用琥珀色，不用绿色 ——
   绿色会被读成「已经好了」，这个人此刻其实一点权限都没有。 */
.bind-tag.ask {
  background: #fdf3e0;
  color: #8a5a00;
  margin-left: 8px;
}

.bind-tag.off {
  background: #f3f4f6;
  color: #6b7280;
  margin-left: 8px;
}

.mail-cell {
  font-size: 12px;
  color: var(--sub);
}

.muted {
  color: #9aa3b2;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* 申请卡片放在弹窗里：管理员开这条记录时才看见，不占列表版面 */
.bind-pending {
  border: 1px solid #f0d9b0;
  background: #fffaf2;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
}

.bind-ask {
  font-size: 13px;
  color: #6b4a00;
  line-height: 1.6;
  margin-bottom: 10px;
}

.bind-ask-actions {
  display: flex;
  gap: 8px;
}

.identity-list {
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.identity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.identity-item:hover {
  border-color: var(--brand);
  background: #f7faff;
}

.identity-role {
  font-size: 12px;
  color: var(--brand);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: #1d3557;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 80;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 0.95;
}

/* ---------- 资料缺口 ---------- */
.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 1px 4px rgba(15, 40, 90, 0.05);
}

.month-btn {
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  font-size: 16px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.month-btn:hover {
  background: #e2ebfa;
}

.month-btn.off {
  color: #c3c9d6;
  background: #f4f6fa;
  cursor: default;
}

.month-text {
  min-width: 96px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.rate-line {
  margin-bottom: 4px;
}

.rate-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--warn);
}

.rate-num.ok {
  color: var(--ok);
}

.rate-bar {
  height: 5px;
  border-radius: 999px;
  background: #eef1f6;
  overflow: hidden;
  margin-bottom: 6px;
  max-width: 150px;
}

.rate-bar i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
}

.chip-mark {
  cursor: pointer;
  border: 1px dashed transparent;
}

.chip-mark:hover {
  color: var(--danger);
  background: #fdeceb;
  border-color: #f3c2bd;
}

.chip-done {
  color: var(--ok);
  background: var(--ok-bg);
}

/* ---------- 报税底稿 ---------- */
.badge-info {
  color: var(--brand);
  background: var(--brand-soft);
}

table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table td.strong {
  font-weight: 600;
}

tr.tax-row {
  cursor: pointer;
}

tr.tax-row:hover td {
  background: #f7f9fc;
}

.warn-text {
  color: var(--warn);
}

.tax-detail-row td {
  background: #fafbfd;
  padding: 16px 18px 18px;
}

.tax-detail-grid {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.tax-col {
  flex: 1;
  min-width: 240px;
}

/* 两列并排时，左列的值右对齐到中线，紧贴右列的标签，读出「386,400.00 利润总额」这种句子。
   一条竖线把两组数字分开；窄屏会换行堆叠，这时不画线，否则线跑到左边缘很难看。 */
@media (min-width: 720px) {
  .tax-col + .tax-col {
    border-left: 1px solid #eef1f6;
    padding-left: 24px;
  }
}

.tax-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  color: #6b7280;
  border-bottom: 1px dashed #eef1f6;
}

.tax-kv b {
  color: #1f2937;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tax-kv.strong b {
  font-weight: 600;
  color: #111827;
}

.tax-mini {
  margin-top: 14px;
  width: auto;
  min-width: 360px;
}

.tax-mini th,
.tax-mini td {
  padding: 6px 12px;
  font-size: 12px;
}

.tax-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tax-empty {
  padding: 10px 0;
  font-size: 13px;
  color: #6b7280;
}

/* ---------- 发票 ---------- */
.chip-on {
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.chip[data-inv-filter] {
  cursor: pointer;
}

.panel-head .row-actions {
  align-items: center;
  gap: 8px;
}

a.link {
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

/* 群绑定：侧边栏入口 */
.group-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-line input {
    flex: 1;
    min-width: 0;
}

.btn-mini {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line, #dfe4ec);
    border-radius: 6px;
    background: #fff;
    color: #2f5597;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.btn-mini:hover {
    background: #f2f6fc;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a94a6;
}

/* 一群多公司：这是正常情形，但要显眼到不会看漏 */
.form-hint.warn-hint {
    color: #9a6a12;
    background: #fdf6e7;
    border-radius: 6px;
    padding: 8px 10px;
}

/* ---------- 服务授权 ---------- */
.lic-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #fbfcfe;
}

.lic-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.lic-plan {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.lic-price {
    font-size: 13px;
    color: var(--sub);
}

.lic-line {
    font-size: 12.5px;
    color: var(--sub);
    margin-bottom: 10px;
}

.lic-mods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.lic-mod {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 5px;
    background: #eef0f4;
    color: #9aa4b2;
    text-decoration: line-through;
}

.lic-mod.on {
    background: var(--ok-bg);
    color: var(--ok);
    text-decoration: none;
}

.lic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lic-muted {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 8px;
}

.lic-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--warn);
    margin-bottom: 6px;
}

.lic-error {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--danger);
    background: #fef3f2;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.lic-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.lic-form-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.lic-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.lic-plan-pick {
    display: grid;
    grid-template-columns: 16px auto auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.lic-plan-pick.on {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.lic-plan-name {
    font-size: 13px;
    font-weight: 600;
}

.lic-plan-price {
    font-size: 13px;
    color: var(--brand);
    font-weight: 600;
}

.lic-plan-desc {
    font-size: 12px;
    color: var(--muted);
}

.lic-gates {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.lic-gate {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink);
}

.lic-gate input {
    margin-top: 3px;
}

.lic-checks {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lic-check {
    display: flex;
    gap: 8px;
    font-size: 12px;
    line-height: 1.6;
    padding: 5px 8px;
    border-radius: 6px;
}

.lic-check.ok {
    background: var(--ok-bg);
    color: #05603a;
}

.lic-check.bad {
    background: var(--warn-bg);
    color: #8a4b00;
}

.lic-check-mark {
    font-weight: 700;
}

.lic-warn {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--danger);
}

.btn-mini-primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.btn-mini-primary:hover {
    background: var(--brand-dark);
}

.btn-mini-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-mini-danger {
    color: var(--danger);
    border-color: #f3c9c4;
}

/* 已收项：可点撤销。用虚线下划线而不是按钮 —— 撤销是低频动作，
   但必须一眼看得出「这个能点」，否则顾问只会回到手机上找。 */
.chip-done-soft {
  color: var(--text-soft, #6b7280);
  background: #f1f3f6;
  cursor: pointer;
  border: 1px dashed transparent;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.chip-done-soft:hover {
  color: var(--danger);
  background: #fdeceb;
  border-color: #f3c2bd;
  text-decoration: none;
}

.chips + .chips {
  margin-top: 6px;
}

/* 导出条：低频动作，放页面底部/表格上方一行就够，不做成大按钮 */
.export-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 10px;
  flex-wrap: wrap;
}

.export-bar .link {
  cursor: pointer;
  color: var(--brand);
  font-size: 13px;
}

.export-bar .link:hover {
  text-decoration: underline;
}

/* ---------- 逾期台账 ---------- */

.banner-bad {
  border-left-color: #b42318;
  background: #fef3f2;
  color: #b42318;
}

.lg-chips {
  display: flex;
  gap: 8px;
}

.lg-chip {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #e3e8f0;
  background: #fff;
  color: #4a5568;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.lg-chip:hover {
  border-color: #b9c9e6;
}

.lg-chip-on {
  background: #2f5597;
  border-color: #2f5597;
  color: #fff;
  font-weight: 600;
}

.lg-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* 一格一期。用底色区分而不是只靠符号：一屏扫下去要能看出「这家一直红」 */
.lg-cell {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  cursor: default;
}

.lg-ok {
  background: #e7f6ef;
  color: #067647;
}

.lg-late {
  background: #fff4e5;
  color: #b54708;
}

.lg-miss {
  background: #fef3f2;
  color: #b42318;
}

.lg-waive {
  background: #f4f6fa;
  color: #4a5568;
}

.lg-open {
  background: #eef3fb;
  color: #2f5597;
}

.lg-na {
  background: #fafbfc;
  color: #b6bdc9;
  border: 1px dashed #e3e8f0;
}

/* ---------- 今日分诊 ---------- */

/* 漏斗：三条同宽的条子上下对齐读，比三个百分比数字更快看出「卡在哪一层」。
   最后一层交齐率才是交付结果，前面两层是过程量 —— 过程再好，最后一层低就是没收获。 */
.funnel {
  padding: 6px 16px 10px;
}

.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.funnel-k {
  flex: 0 0 168px;
  font-size: 12.5px;
  color: var(--sub);
}

.funnel-row .rate-bar {
  flex: 1;
  max-width: none;
  margin-bottom: 0;
}

.funnel-v {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 「为什么判成这样」的说明。分诊的价值全在这句话里：
   只说「该打电话」而不说「已经催了两次一条没交」，顾问凭什么信它。 */
.triage-why {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--sub);
  margin-top: 4px;
  max-width: 300px;
}

/* 话术预览：让人一眼看出复制的是「补件」还是「完整清单」，不用点两次才知道 */
.script-preview {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 300px;
  white-space: normal;
}

/* 「顾问追加」的缺项标签：和固定清单项要能一眼分开。
   顾问自己看缺口页时，也得知道这一条是新加的、还是客户一直没交的老项。 */
.chip-extra {
  color: #9a5b00;
  background: #fff6e8;
  border-color: #f0c98d;
}

.chip-tag {
  font-style: normal;
  font-size: 10px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 3px;
  background: #f6dcae;
  color: #8a5200;
}

/* ---------- 从企微通讯录导入（员工页） ---------- */

/* 员工页头部两个按钮并排：添加 + 导入，导入是次要操作用描边样式 */
.page-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-contacts {
  max-width: 620px;
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

.contacts-status {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.6;
  margin-bottom: 12px;
}

.contacts-status:empty {
  display: none;
}

.contacts-fail,
.contacts-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.contacts-fail {
  background: #fff7e8;
  color: #8a5a00;
}

.contacts-error {
  background: #fdecec;
  color: #b42318;
}

.contacts-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--line, #e5e9f0);
  border-radius: 8px;
}

.contacts-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--sub);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, #eef1f5);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.contact-who b {
  font-size: 13px;
  color: var(--text, #1f2733);
}

.contact-id,
.contact-pos {
  font-size: 11px;
  color: var(--sub);
}

.contact-id {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.contact-act {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.contact-pick {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #1f2733);
}

.contacts-foot {
  margin: 12px 0 0 !important;
}
