/* ===== 接单工作台（补充样式，复用 chuhan-workbench.css） ===== */

/* 问候语行：仅看自己下拉 */
.scope-self {
  appearance: none;
  height: 26px;
  margin-left: 2px;
  padding: 0 24px 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-secondary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12px' height='12px' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

/* 右侧工具区：企业类型 + 搜索 + 快速建单 */
.bar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.scope-company {
  appearance: none;
  height: 32px;
  padding: 0 26px 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12px' height='12px' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.bar-tools .global-search {
  margin: 0;
}

.btn-quick-create {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-quick-create svg {
  width: 14px;
  height: 14px;
}

.btn-quick-create:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* 自动移交：实心蓝 */
.btn-auto-transfer {
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.btn-auto-transfer:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* 批量移交 / 自动移交：底边与状态行下横线留 5px 间距 */
#transfer-btn,
#auto-transfer-btn {
  align-self: flex-end;
  margin-bottom: 5px;
}

/* ---- 次级页签 ---- */
.sub-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.sub-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sub-tab.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.sub-count {
  font-weight: 600;
}

/* ---- 表格列宽 ---- */
/* 已申请制函：三个操作按钮；待申请制函：两个按钮 */
.col-action {
  width: 208px;
}

.work-table.is-pending .col-action {
  width: 128px;
}

/* 审批意见顶部“意见有更新”红标 */
.opinion-update {
  margin-bottom: 4px;
}

/* 编号旁版本号 */
.record-no .ver {
  color: var(--primary);
}

.col-dl {
  width: 84px;
  text-align: center !important;
}

.work-table tbody td.col-dl {
  text-align: center;
  color: var(--ink-secondary);
}

.col-opinion {
  min-width: 200px;
  max-width: 260px;
}

.opinion-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.5;
}

/* 复审次数：浅黄底标签 */
.review-count-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fdf6e8;
  color: #b97c1e;
  font-size: 11px;
}

.wait-dash {
  color: #b6bdc9;
  font-size: 11px;
  padding: 2px 0;
}

/* 行可点击进入详情（操作列按钮自身除外） */
.work-table tbody tr {
  cursor: pointer;
}

/* ===== 申请制函：确定制函弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
}

.modal-mask.hidden {
  display: none;
}

.letter-modal {
  width: 1000px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.lm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 10px;
}

/* 标题 + 附属信息（风险识别标签）同行 */
.lm-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.gc-title-hint {
  font-size: 12px;
  color: #e5484d;
  white-space: nowrap;
}

.lm-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.lm-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
  padding: 4px;
}

.lm-close svg {
  width: 20px;
  height: 20px;
}

.lm-body {
  padding: 4px 24px 8px;
  overflow-y: auto;
}

/* 下拉展开时不被滚动容器裁剪 */
.lm-body:has(.m-select.is-open) {
  overflow: visible;
}

/* 概览 */
.ov-row {
  display: flex;
  align-items: flex-start;
  padding: 7px 0;
}

.ov-label {
  flex: 0 0 84px;
  color: #9aa3b2;
  font-size: 14px;
  line-height: 26px;
}

.ov-main {
  flex: 1;
  min-width: 0;
}

.ov-name {
  font-size: 15px;
  color: var(--ink);
  margin-right: 12px;
}

/* 受益人变更标识：名称后面的 new 小标签 */
.ov-new {
  display: inline-block;
  padding: 0 6px;
  margin-left: -6px;
  margin-right: 12px;
  border-radius: 8px;
  background: #fdecec;
  color: #e5484d;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  vertical-align: 1px;
}

.ov-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.ov-staff {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 26px;
}

.lm-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.6;
  vertical-align: middle;
}

.lm-chip-yellow {
  background: #fdf3e0;
  color: #c08418;
}

.lm-chip-blue {
  background: #eef3ff;
  color: var(--primary);
}

.lm-chip-red {
  background: #fdecec;
  color: #e5484d;
}

.ov-main.tag-row {
  align-items: center;
}

/* 确定制函信息 */
.lm-section-title {
  position: relative;
  padding-left: 12px;
  margin: 12px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.lm-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
}

.lm-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.lm-row-2 {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 32px;
}

.lm-row-2 > div {
  flex: 1 1 320px;
  min-width: 0;
}

.lm-label {
  color: #9aa3b2;
  font-size: 14px;
}

.lm-value {
  color: var(--ink);
  font-size: 14px;
}

.lm-checks {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.lm-checks .lm-label {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 21px;
}

/* 选项组内部：各勾选项之间的间距 + 换行；占满标签右侧剩余宽度后在组内换行 */
#lm-formats,
#lm-issuers {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.ck-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  white-space: nowrap;
}

button.ck-toggle {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.ck-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--primary);
  border: 1px solid var(--primary);
  box-sizing: border-box;
}

.ck-box svg {
  width: 10px;
  height: 10px;
  color: #fff;
}

/* 未选中：白底蓝框、无勾、文字置灰 */
.ck-toggle:not(.is-checked) {
  color: var(--text-secondary, #8a8f99);
}

.ck-toggle:not(.is-checked) .ck-box {
  background: #fff;
}

.ck-toggle:not(.is-checked) .ck-box svg {
  display: none;
}

/* 接单 / 资料员下拉 */
.lm-assign {
  gap: 28px;
}

.m-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m-select {
  position: relative;
}

.m-select-control {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 248px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.m-select.is-open .m-select-control {
  border-color: var(--primary);
}

.m-select-placeholder.is-placeholder {
  color: #b3b9c4;
}

.m-select-caret {
  width: 16px;
  height: 16px;
  color: #9aa3b2;
  transition: transform 0.18s;
}

.m-select.is-open .m-select-caret {
  transform: rotate(180deg);
}

.m-select-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 10;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  display: none;
}

.m-select.is-open .m-select-menu {
  display: block;
}

.m-select-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 36px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #edf0f4;
  border-top: 1px solid #edf0f4;
  transform: rotate(45deg);
}

.m-option {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.m-option:hover {
  background: #f5f8ff;
  color: var(--primary);
}

.opt-count {
  color: #9aa3b2;
  font-size: 13px;
}

.m-option:hover .opt-count {
  color: var(--primary);
}

/* 底部按钮 */
.lm-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 16px 24px 26px;
}

.lm-btn {
  appearance: none;
  min-width: 168px;
  height: 44px;
  padding: 0 24px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.lm-btn-plain {
  border: 1px solid var(--primary);
  background: #f2f6ff;
  color: var(--primary);
}

.lm-btn-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.lm-btn-plain:hover {
  background: #e7efff;
}

.lm-btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* 分页：左侧共 N 条风格与截图一致 */
.jiedan-pagination {
  justify-content: flex-end;
}

.jiedan-pagination .page-total {
  margin-right: auto;
}

/* ---- 次级页签行：页签居左，批量确认出函居右 ---- */
.sub-tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-tabs-row .sub-tabs {
  flex: 1;
  min-width: 0;
}

#batch-confirm-btn {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 12px;
  border-radius: 4px;
}

#batch-confirm-btn svg {
  width: 12px;
  height: 12px;
}

/* 待出函：次级页签行右侧平台筛选（风格同 .scope-self） */
.platform-filter {
  appearance: none;
  height: 26px;
  padding: 0 24px 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-secondary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12px' height='12px' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

/* ===== 待出函-待确认：列表内批量确认（批量确认 → 共N条 + 取消 + 确认出函） ===== */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

#batch-start-btn,
#batch-cancel-btn {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

#batch-start-btn:hover,
#batch-cancel-btn:hover {
  background: var(--primary-light);
}

#batch-submit-btn {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

#batch-submit-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.batch-count {
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
}

/* 已出函：次级页签行最右侧批量上传入口 */
#batch-upload-btn {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 12px;
  border-radius: 4px;
}

#batch-upload-btn svg {
  width: 12px;
  height: 12px;
}


/* 选择态：新增勾选列（chuhan-workbench.css 默认隐藏 .col-check，这里在批量选择态放出来） */
.workbench-main.is-batch-selecting .col-check {
  display: table-cell;
}

.col-check {
  width: 40px;
  text-align: center;
}

.col-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ===== 待确认出函：批量确认出函弹窗 ===== */
.batch-modal {
  width: 1360px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.bm-body {
  padding: 0 24px 8px;
  overflow-y: auto;
}

.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bm-table th,
.bm-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #eef1f6;
  vertical-align: top;
}

.bm-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.bm-check {
  width: 44px;
}

.bm-check input[type="checkbox"],
.bm-row-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.bm-company {
  min-width: 220px;
}

.bm-project {
  min-width: 260px;
}

.bm-project-name {
  max-width: 340px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  color: var(--ink);
}

.bm-project .tag-row {
  margin-top: 6px;
  max-width: 340px;
}

.bm-date {
  white-space: nowrap;
}

/* 出函日期右侧的上传列 */
.bm-upload {
  min-width: 130px;
}

.bm-file-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.bm-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
}

.bm-file-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-date-input {
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  padding: 5px 8px;
  border: 1px solid #d9e0ea;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.bm-date-input:hover {
  border-color: var(--primary);
}

.bm-risk {
  max-width: 280px;
}

.bm-risk-tag {
  display: inline-flex;
  align-items: center;
  margin: 1px 6px 4px 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fdeaea;
  color: #e5484d;
  font-size: 11px;
  white-space: nowrap;
}

.bm-risk-ok {
  color: #9aa3b2;
  font-size: 12px;
}

.bm-empty {
  text-align: center;
  color: #9aa3b2;
  padding: 32px 0 !important;
}

/* 弹窗底部：左侧条数统计，右侧按钮 */
.bm-footer {
  justify-content: flex-end;
}

.bm-count {
  margin-right: auto;
  align-self: center;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* 仅展示页签（已关闭/草稿）：不响应点击，悬停不变色 */
.status-tab.is-static {
  cursor: default;
}

.status-tab.is-static:hover {
  color: var(--ink-secondary);
}

/* ---- 行内列：出函日期 / 备注 ---- */
.col-issuedate {
  width: 130px;
  white-space: nowrap;
}

.row-date-input {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  padding: 4px 6px;
  border: 1px solid #d9e0ea;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.row-date-input:hover {
  border-color: var(--primary);
}

/* 项目列收窄：长项目名省略号显示（悬停 title 看全名），给备注让空间 */
.work-table td.col-project {
  max-width: 280px;
}

.work-table .col-project .project-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-remark {
  width: 270px;
}

.row-remark-input {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  resize: none;
  overflow: hidden;
  min-height: 26px;
}

.row-remark-input::placeholder {
  color: #b6bdc9;
}

.row-remark-input:hover {
  border-color: #d9e0ea;
  background: #fff;
}

.row-remark-input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}

/* ===== 确认出函弹窗（单条，5.1：出函日期 + 保函文本上传 + 风险提示） ===== */
.confirm-modal {
  width: 640px;
}

/* 顶部红色风险提示文案（固定展示） */
.cf-tip {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 6px;
  background: #fdecec;
  color: #e5484d;
  font-size: 13px;
  line-height: 1.5;
}

/* 排队提示用暖橙（中性挂起），撤销沿用红色 .cf-tip */
.cf-tip-warn {
  background: #fdf3e0;
  color: #c08418;
}

/* ===== 排队/撤销操作确认弹窗（5.4 / 5.6 共用） ===== */
.action-modal {
  width: 480px;
}

.act-info {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
}

.act-row {
  display: flex;
  font-size: 13px;
  line-height: 2;
}

.act-label {
  flex: none;
  width: 72px;
  color: var(--ink-secondary);
}

.act-name {
  color: var(--ink);
  word-break: break-all;
}

.cf-req {
  color: #e5484d;
  font-style: normal;
  margin-right: 2px;
}

.cf-date-input {
  appearance: none;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.cf-date-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* 上传保函文本（非必填；Word 电子版，最多 5 个、单个 ≤100M、不支持文件夹） */
.lm-row-upload {
  align-items: flex-start;
}

.cf-upload-wrap {
  flex: 1;
  min-width: 0;
}

.cf-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fcfdff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cf-upload:hover,
.cf-upload.is-dragover {
  border-color: var(--primary);
  background: #f5f8ff;
}

.cf-up-icon {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.cf-up-main {
  font-size: 14px;
  color: var(--ink);
}

.cf-up-hint {
  font-size: 12px;
  line-height: 1.6;
  color: #9aa3b2;
}

/* 已达 5 个上限：上传框置灰，不再响应 */
.cf-upload.is-full {
  cursor: not-allowed;
  background: #f6f7f9;
}

.cf-upload.is-full:hover {
  border-color: #cbd5e1;
  background: #f6f7f9;
}

.cf-upload.is-full .cf-up-icon,
.cf-upload.is-full .cf-up-main {
  color: #9aa3b2;
}

/* 已选文件列表 */
.cf-file-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.cf-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f5f7fa;
  font-size: 13px;
}

.cf-file-item + .cf-file-item {
  margin-top: 6px;
}

.cf-file-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #e4ecfd;
  color: var(--primary);
}

.cf-file-icon svg {
  width: 11px;
  height: 11px;
}

.cf-file-name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-file-size {
  flex: none;
  color: #9aa3b2;
}

.cf-file-remove {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
  padding: 0;
}

.cf-file-remove:hover {
  background: #e6e9ef;
  color: #6b7280;
}

.cf-file-remove svg {
  width: 10px;
  height: 10px;
}

/* 项目分组标识（待确认出函同组保函） */
.project-group {
  margin-top: 3px;
}

.group-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

/* ===== 同组确认出函弹窗 ===== */
.gc-modal {
  width: 820px;
}

.gc-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-y: auto;
  padding: 18px 22px;
}

/* 主体：概览 + 出函信息 */
.gc-main {
  flex: 1;
  min-width: 0;
  padding-left: 0;
}

.gc-form {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #f7f9fc;
}

.gc-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin-top: 12px;
}

.gc-field {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.gc-field > .lm-label {
  flex: 0 0 auto;
  line-height: 26px;
}

.gc-field > .lm-value {
  line-height: 26px;
}

.gc-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 保函格式 / 出函方 / 出函日期：均独占一行 */
.gc-field-full {
  grid-column: 1 / -1;
}

/* 出函日期字段：label 与输入框居中对齐 */
.gc-field-date {
  align-items: center;
}

/* 出函日期一行：期限/金额/格式/出函方 + 出函日期 + 上传文件 内联排布 */
.gc-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 12px;
}

.gc-inline-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gc-inline-field > .lm-label {
  flex: 0 0 auto;
}

.gc-inline-field .cf-date-input {
  height: 28px;
  font-size: 12px;
}

/* 多项可选时的内联下拉 */
.gc-inline-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}

.gc-inline-select:focus {
  outline: none;
  border-color: var(--primary);
}

.gc-inline-upload .link-btn {
  font-size: 12px;
}

.gc-select {
  width: 200px;
}

.gc-select .m-select-control {
  background: #fff;
}

/* 同组弹窗：保函格式/出函方单选框 */
.gc-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.gc-radio:hover {
  border-color: var(--primary);
}

.gc-radio.is-checked {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.gc-radio input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 同组弹窗：上传保函文本（每张工单独立） */
.gc-field-upload {
  margin-top: 14px;
}

.gc-field-upload .cf-upload {
  padding: 16px;
}

/* 单条布局（详情页复用）：金额/期限以单选呈现 */
.gc-modal.is-single {
  width: 820px;
}

.gc-modal.is-single .gc-main {
  padding-left: 0;
}

.gc-single-only {
  display: none;
}

.gc-modal.is-single .gc-single-only {
  display: flex;
}

/* 多保函项时，保函信息按项分行展示 */
.ov-gi {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ov-gi + .ov-gi {
  margin-top: 6px;
}

/* ===== 备注列「查看」+ 右侧抽屉（待确认出函） ===== */
.remark-col {
  position: relative;
  padding-right: 8px;
}

.remark-view-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 0;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.remark-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 34px;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}

/* 待确认出函：行内可直接编辑最新备注，右上角留出「查看」位置 */
.remark-col .remark-inline {
  padding-right: 34px;
}

.remark-line {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.remark-empty {
  color: #b6bdc9;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 90; /* 低于 toast(99)，保存提示不被遮罩挡住 */
  background: rgba(15, 23, 42, 0.35);
}

.drawer-mask.hidden {
  display: none;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  animation: drawer-in 0.22s ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f6;
}

.drawer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.drawer-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8a93a3;
  cursor: pointer;
}

.drawer-close:hover {
  background: #f1f4f9;
  color: var(--ink);
}

.drawer-close svg {
  width: 16px;
  height: 16px;
}

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

.rd-item + .rd-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
}

.rd-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
}

.rd-user {
  font-weight: 600;
  color: var(--ink);
}

.rd-time {
  color: #8a93a3;
  font-variant-numeric: tabular-nums;
}

.rd-content {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}

.rd-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: #9aa3b2;
}

/* 抽屉底部：即时聊天式输入 + 保存 */
.drawer-foot {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid #eef1f6;
  background: #fff;
}

.rd-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 8px 10px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  resize: none;
}

.rd-input:focus {
  outline: none;
  border-color: var(--primary);
}

.rd-save {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 16px;
}

/* ===== 已出函：上传资料弹窗 ===== */
.material-modal {
  width: 520px;
  max-width: calc(100vw - 48px);
}

.mm-section {
  margin-bottom: 20px;
}

.mm-section:last-child {
  margin-bottom: 0;
}

.mm-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink);
}

.mm-box-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.mm-radio-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
  font-size: 13px;
  color: var(--ink);
}

.mm-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.mm-radio input {
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
