/* Shared task editor: compact desktop form, scrollable content and pinned actions. */
.task-editor-overlay .el-overlay-dialog { overflow: hidden; }
.el-overlay-dialog .el-dialog.task-editor-compact { margin: 4vh auto 0 !important; }
.el-dialog.task-editor-compact {
  --el-dialog-padding-primary: 0;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 32px);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  color: #303133;
}
.task-editor-compact .el-dialog__header {
  flex: none;
  margin: 0;
  padding: 18px 24px;
  border-bottom: 1px solid #ebeef5;
}
.task-editor-compact .el-dialog__title { font-size: 19px; font-weight: 600; line-height: 26px; }
.task-editor-compact .el-dialog__headerbtn { top: 10px; right: 12px; }
.task-editor-compact .el-dialog__body { padding: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.task-editor-compact .el-dialog__footer { flex: none; padding: 12px 24px; border-top: 1px solid #ebeef5; }
.task-editor-compact .task-editor-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.task-editor-main, .task-editor-rules { min-width: 0; padding: 16px 24px; }
.task-editor-rules { border-left: 1px solid #ebeef5; }
.task-editor-compact .el-form-item { margin-bottom: 12px; }
.task-editor-compact .el-form-item__label { padding: 0; margin-bottom: 7px; height: auto; line-height: 20px; font-size: 14px; color: #303133; font-weight: 600; }
.task-editor-compact .el-form-item__content { min-width: 0; line-height: 20px; }
.task-editor-compact .el-input, .task-editor-compact .el-select { width: 100%; }
.task-editor-compact .el-input__wrapper, .task-editor-compact .el-select__wrapper { min-height: 36px; box-sizing: border-box; }
.task-editor-compact .el-button { min-height: 36px; font-size: 14px; }
.task-editor-compact .el-textarea__inner { border-radius: 6px; line-height: 22px; padding: 8px 12px 14px; font-size: 14px; }
.task-editor-compact .task-form-help { font-size: 12px; line-height: 18px; color: #909399; margin-top: 5px; }
.task-editor-people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.task-editor-info { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #7b8696; cursor: help; padding: 0 3px; font-size: 14px; line-height: 18px; vertical-align: middle; }
.task-editor-info:focus-visible { outline: 2px solid #409eff; border-radius: 3px; }
.task-editor-attachments .el-upload { justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.task-attachment-limit { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; color: #909399; font-size: 12px; }
.task-attachment-picker { box-sizing:border-box; width:100%; min-width:0; padding:12px; border:1px dashed #b8c6d9; border-radius:8px; background:#f8fafc; line-height:1.6; font-size:12px; color:#526173; }
.task-attachment-picker:focus-visible,.task-attachment-picker.is-dragging { outline:2px solid #409eff; background:#ecf5ff; }
.task-attachment-picker>span { display:block; margin-top:6px; }
.task-attachment-picker small { display:block; color:#66788d; line-height:1.5; }
.task-attachment-picker button { cursor:pointer; border:1px solid #c5d3e5; border-radius:5px; padding:5px 10px; background:white; color:#245a96; }
.task-attachment-picker button:disabled { opacity:.55; cursor:wait; }
.task-attachment-picker .task-attachment-add { background:#337bd4; border-color:#337bd4; color:white; font-size:13px; }
.task-attachment-picker ul { list-style:none; margin:8px 0 0; padding:0; }
.task-attachment-picker li { display:flex; align-items:center; gap:8px; padding:6px 0; border-top:1px solid #e2e8f0; }
.task-attachment-picker li>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.task-attachment-picker .task-attachment-error { color:#b42318; }
.task-attachment-preview .el-dialog__title { display:block; padding-right:24px; overflow-wrap:anywhere; }
.task-attachment-preview-body { min-height:100px; max-height:65vh; overflow:auto; }
.task-attachment-preview-body img { display:block; max-width:100%; max-height:62vh; object-fit:contain; margin:auto; }
.task-attachment-preview-body pre { white-space:pre-wrap; overflow-wrap:anywhere; font:14px/1.6 monospace; }
.task-attachment-preview .el-dialog__footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
.task-attachment-preview .el-dialog__footer>span { flex:1 1 200px; color:#66788d; font-size:12px; text-align:left; }
.task-editor-compact .el-upload-list__item-name { overflow-wrap: anywhere; }
.task-editor-compact .el-upload-list:empty { margin: 0; }
.task-editor-compact .el-collapse { border-bottom: 0; }
.task-editor-compact .el-collapse-item__header { height: 42px; line-height: 20px; font-size: 14px; font-weight: 600; }
.task-source-summary { margin-left: 24px; color: #909399; font-size: 13px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; text-align: left; }
.task-compact-deadline { width: 100%; display: grid; gap: 10px; }
.task-compact-date-row { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr); gap: 6px; }
.task-compact-date-row .el-button { margin: 0; padding: 8px; }
.task-compact-date-row .el-date-editor.el-input { width: 100%; min-width: 0; }
.task-compact-date-row .el-input__wrapper { padding: 0 7px; }
.task-compact-date-row .el-input__inner { font-size: 13px; }
.task-compact-date-row .is-custom-date .el-input__wrapper { box-shadow: 0 0 0 1px #409eff inset; background: #ecf5ff; }
.task-compact-date-row .is-custom-date .el-input__inner { color: #409eff; }
.task-compact-deadline > .el-date-editor.el-input { width: 100%; }
.task-editor-rules > .el-form-item .el-radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.task-editor-rules .el-radio { margin-right: 0; }
.task-rule-section { border-top: 1px solid #ebeef5; padding-top: 8px; margin-top: 8px; }
.task-rule-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; font-size: 14px; font-weight: 600; }
.task-rule-section > .el-form-item { margin: 8px 0 0; display: flex; align-items: center; }
.task-rule-section > .el-form-item > .el-form-item__label { margin: 0 10px 0 0; flex: none; }
.task-rule-section > .el-form-item > .el-form-item__content { flex: 1; }
.task-recurrence-fields { display: grid; gap: 6px; margin-top: 6px; }
.task-recurrence-fields > .el-radio-group { display: flex; }
.task-recurrence-fields .el-radio-button { flex: 1; }
.task-recurrence-fields .el-radio-button__inner { width: 100%; padding: 8px; }
.task-recurrence-interval, .task-recurrence-end { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.task-editor-compact .task-recurrence-interval .el-input-number { width: 92px; }
.task-recurrence-end > span { white-space: nowrap; }
.task-recurrence-end .el-date-editor.el-input { flex: 1; width: 0; min-width: 0; }
.task-weekdays { display: flex; justify-content: space-between; gap: 5px; }
.task-weekdays .el-checkbox-button { flex: 1; min-width: 0; }
.task-weekdays .el-checkbox-button__inner { width: 100%; padding: 8px 0; border: 1px solid #dcdfe6; border-radius: 4px !important; }
.task-weekdays .el-checkbox-button.is-checked .el-checkbox-button__inner { border-color: #409eff; box-shadow: none; }
.task-editor-compact .task-recurrence-summary { margin-top: 0; }
.task-editor-footer, .task-footer-actions { display: flex; align-items: center; gap: 8px; }
.task-editor-footer { justify-content: space-between; flex-wrap: wrap; }
.task-footer-deadline { color: #909399; font-size: 13px; line-height: 22px; }
.task-footer-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.task-footer-actions .el-button { margin: 0; }
@media (max-width: 760px) {
  .el-overlay-dialog .el-dialog.task-editor-compact { margin: 10px auto 0 !important; }
  .el-dialog.task-editor-compact { max-width: calc(100vw - 16px); }
  .task-editor-compact .task-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .task-editor-main, .task-editor-rules { padding: 16px; }
  .task-editor-rules { border-left: 0; border-top: 1px solid #ebeef5; }
  .task-editor-compact .el-dialog__header { padding: 14px 16px; }
  .task-editor-compact .el-dialog__footer { padding: 10px 16px; }
}
@media (max-width: 420px) {
  .task-editor-people { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .task-attachment-limit { margin-left: 6px; font-size: 11px; }
  .task-footer-deadline { font-size: 12px; }
}
