/* Vue 和嵌入办理页共用单选控件样式，保留浏览器原生表单与键盘行为。 */
select:not([multiple]):not([size]) {
  font-family: inherit;
  color: #243b56;
  border: 1px solid #cbdcf0;
  border-radius: 6px;
  background-color: #fff;
  padding: 8px 10px;
}

select:not([multiple]):not([size]):not(:disabled) { cursor: pointer; }
select:not([multiple]):not([size]):hover:not(:disabled),
select:not([multiple]):not([size]):focus-visible,
select:not([multiple]):not([size]):open { border-color: #397bd0; }

@supports (appearance: base-select) and selector(select::picker(select)) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }

  select:not([multiple]):not([size])::picker-icon {
    color: #526d8b;
    margin-inline-start: 8px;
  }

  select:not([multiple]):not([size])::picker(select) {
    margin-block: 4px;
    padding: 4px;
    min-inline-size: anchor-size(width);
    max-inline-size: calc(100vw - 16px);
    max-block-size: min(280px, 55vh);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #a8bed9 transparent;
    border: 1px solid #cfdef0;
    border-radius: 8px;
    background: #fff;
    color: #243b56;
    box-shadow: 0 6px 20px #173b6221;
  }

  select:not([multiple]):not([size]) option {
    padding: 7px 9px;
    border-radius: 4px;
    font: inherit;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  select:not([multiple]):not([size]) option:checked {
    color: #1559b7;
    background: #e8f2ff;
    font-weight: 600;
  }

  select:not([multiple]):not([size]) option:is(:hover, :focus-visible):not(:disabled) {
    background: #f0f6ff;
  }

  select:not([multiple]):not([size]) option:disabled { color: #708399; }
  select:not([multiple]):not([size]) option::checkmark { color: #1559b7; }
}

/* V2 自带的分组选择器沿用同一面板与选项样式。 */
.sel-pop {
  padding: 4px;
  max-height: min(280px, 55vh);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8bed9 transparent;
  border: 1px solid #cfdef0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px #173b6221;
}
.sel-opt { border-radius: 4px; }
.sel-opt:hover { background: #f0f6ff; }
.sel-opt.on { color: #1559b7; background: #e8f2ff; font-weight: 600; }

/* 任务表单使用紧凑布局，沿用原型字段及派发规则。 */
.modal:has(#tf-title) {
  max-width: 660px;
  border-radius: 12px;
}

.modal:has(#tf-title) .modal-head {
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px 14px;
}

.modal:has(#tf-title) .modal-title {
  margin-bottom: 4px;
  font-size: 18px;
}

.modal:has(#tf-title) .modal-close { flex-shrink: 0; }

.modal:has(#tf-title) .modal-body {
  display: grid;
  gap: 14px;
  padding: 16px 22px;
  overscroll-behavior: contain;
}

.modal:has(#tf-title) .form-item { min-width: 0; margin: 0; }
.modal:has(#tf-title) .form-row { gap: 14px 16px; }
.modal:has(#tf-title) .form-row:has(#tf-due) { grid-template-columns: minmax(0, 1fr); }
.modal:has(#tf-title) #tf-due { max-width: 230px; }
.modal:has(#tf-title) .form-hint { margin-top: 4px; line-height: 1.5; }
.modal:has(#tf-title) .modal-foot { align-items: center; padding: 12px 22px; background: #f8fafd; border-radius: 0 0 12px 12px; }

@media (max-width: 560px) {
  .modal-mask:has(#tf-title) { padding: 10px; }
  .modal:has(#tf-title) { max-height: calc(100dvh - 20px); }
  .modal:has(#tf-title) :is(.modal-head, .modal-body, .modal-foot) { padding-inline: 14px; }
  .modal:has(#tf-title) .form-row { grid-template-columns: minmax(0, 1fr); }
}
