/* ==================================================================
 * 扩展样式：批量操作 / 回收站 / 只读详情 / 发票配置
 * 单独成文件，避免修改主样式表 styles.css
 * ================================================================== */

/* ---------------- 批量操作下拉 ---------------- */
.bulk-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bulk-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 208px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bulk-menu-head {
  padding: 8px 10px 6px;
  font-size: 12px;
  color: #667085;
  border-bottom: 1px dashed #edf1f6;
  margin-bottom: 4px;
}

.bulk-menu-head b {
  color: #18bc9c;
  font-size: 13px;
}

.bulk-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.bulk-menu button:hover {
  background: #f2f6fa;
}

.bulk-menu button.danger {
  color: #e5484d;
}

.bulk-menu button.danger:hover {
  background: #fef2f2;
}

.bulk-assign-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f0fbf8;
  border: 1px solid #c7efe6;
  border-radius: 8px;
  color: #0f766e;
  font-size: 13px;
  line-height: 1.6;
}

/* 行内「详情」按钮 */
.lead-action.detail {
  background: #eef2f7;
  color: #344054;
}

/* ---------------- 回收站 ---------------- */
.trash-modal .follow-modal-head,
.record-detail-modal .follow-modal-head {
  border-radius: 14px 14px 0 0;
}

.trash-modal {
  width: min(560px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.trash-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  background: #f8fafc;
}

.trash-count {
  margin-left: 8px;
  font-size: 12px;
  color: #667085;
}

.trash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trash-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
}

.trash-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.trash-main strong {
  font-size: 14px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-main span {
  font-size: 12px;
  color: #98a2b3;
}

.trash-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.trash-btn {
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
}

.trash-btn.restore {
  background: #18bc9c;
  color: #fff;
}

.trash-btn.purge {
  background: #fee2e2;
  color: #c81e1e;
}

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

.trash-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 2px;
  font-size: 12.5px;
  color: #667085;
}

.trash-pager button {
  padding: 5px 12px;
  border: 1px solid #e4e9f0;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.trash-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.trash-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #eef2f6;
  background: #fff;
}

.trash-empty {
  margin: 26px 0;
  text-align: center;
  color: #98a2b3;
  font-size: 13.5px;
}

/* ---------------- 只读详情 ---------------- */
.record-detail-modal {
  width: min(620px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.record-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.record-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 12px;
  background: #f8fafc;
  border-radius: 9px;
  min-width: 0;
}

.record-detail-row span {
  font-size: 12px;
  color: #98a2b3;
}

.record-detail-row b {
  font-size: 13.5px;
  font-weight: 500;
  color: #0f172a;
  word-break: break-all;
}

@media (max-width: 900px) {
  .record-detail-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .bulk-menu {
    left: auto;
    right: 0;
    min-width: 190px;
  }

  .trash-modal,
  .record-detail-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }

  .trash-list li {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }

  .trash-actions {
    justify-content: flex-end;
  }

  .trash-actions .trash-btn {
    padding: 9px 16px;
  }

  .trash-foot {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }
}

/* ---------------- 修改密码弹窗 ---------------- */
.change-password-modal {
  max-width: 420px;
}

.change-password-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #ffe3a3;
  border-radius: 8px;
  color: #92600a;
  font-size: 13px;
  line-height: 1.6;
}

.change-password-modal .follow-field input {
  width: 100%;
  box-sizing: border-box;
}

/* ==================================================================
 * 大屏（桌面端）横向溢出修复
 * 1440px 等较窄桌面宽度下，"支付账户余额统计" 表格与项目进度板
 * 内容宽度大于所在栅格列，会把整页撑宽产生横向滚动条。
 * 让它们各自成为可横向滚动的容器，宽屏下视觉完全不变。
 * ================================================================== */
.deposit-panel {
  overflow-x: auto;
}

.project-board-panel {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .deposit-panel,
  .project-board-panel {
    overflow-x: visible;
  }
}
