.dockbar_shell{
  position:fixed;
  left:0;
  right:0;
  bottom:18px;
  display:flex;
  justify-content:center;
  align-items:center;
  pointer-events:none;
  z-index:1300;
  width:100%;
}

.dockbar{
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:max-content;
  max-width:calc(100vw - 32px);
  padding:6px 10px;
  background:var(--ui-panel);
  border:1px solid var(--ui-border);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,0.18);
  backdrop-filter:blur(6px);
  white-space:nowrap;
}

.dockbar_search{
  display:flex;
  flex:0 0 auto;
  gap:8px;
  align-items:center;
  order:2;
}

.dockbar_search_toggle{
  width:46px;
  height:50px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
}

.dockbar_search_toggle:hover,
.dockbar_shell.is-search-expanded .dockbar_search_toggle{
  border-color:#dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_search_toggle svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_input_search{
  min-width:0;
  width:0;
  height:34px;
  padding-left:0;
  padding-right:0;
  opacity:0;
  border-width:0;
  pointer-events:none;
  transition:width .18s ease,opacity .15s ease,padding .18s ease,border-width .18s ease;
}

.dockbar_shell.is-search-expanded .dockbar_input_search{
  width:220px;
  min-width:220px;
  padding-left:12px;
  padding-right:12px;
  opacity:1;
  border-width:1px;
  pointer-events:auto;
}

.dockbar_shell.party-manage-test-active .dockbar_common{
  display:none;
}

.dockbar_shell.party-manage-test-active .dockbar_party_manage_test{
  display:flex;
}

.dockbar_shell.party-manage-test-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.party-manage-test-active.is-search-expanded .dockbar_input_search{
  width:260px;
  min-width:260px;
}

.dockbar_shell.recycle-bin-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.recycle-bin-active .dockbar_common{
  display:none;
}

.dockbar_shell.document-center-active .dockbar_common{
  display:none;
}

.dockbar_shell.knowledge-ingest-active .dockbar_common{
  display:none;
}

.dockbar_shell.download-center-active .dockbar_search,
.dockbar_shell.download-center-active .dockbar_common{
  display:none;
}

.dockbar_shell.evidence-task-detail-active .dockbar_search,
.dockbar_shell.evidence-task-detail-active .dockbar_common{
  display:none;
}

.dockbar_shell.ai-chat-test-active{
  display:none;
}

.dockbar_shell.document-center-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.knowledge-ingest-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.download-center-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.evidence-task-detail-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.document-center-active.is-search-expanded .dockbar_input_search,
.dockbar_shell.knowledge-ingest-active.is-search-expanded .dockbar_input_search{
  width:320px;
  min-width:320px;
  padding-left:12px;
  padding-right:12px;
  opacity:1;
  border-width:1px;
  pointer-events:auto;
}

.dockbar_shell.download-center-active .dockbar_download_center{
  display:flex;
  align-items:center;
  max-width:calc(100vw - 96px);
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:thin;
}

.dockbar_shell.evidence-task-detail-active .dockbar_evidence_task_detail{
  display:flex;
  align-items:center;
  max-width:calc(100vw - 96px);
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:thin;
}

.dockbar_shell.evidence-task-detail-active .dockbar{
  max-width:calc(100vw - 24px);
}

.dockbar_shell.document-center-active .dockbar_document_center{
  align-items:center;
  min-width:0;
  max-width:calc(100vw - 72px);
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:thin;
}

.dockbar_shell.document-center-non-search-active .dockbar_search{
  display:none;
}

/* 预览、管理和入库页有各自的返回动作，隐藏全局历史返回，避免出现两个“导航”组。 */
.dockbar_shell.document-center-non-search-active .dockbar_global_navigation,
.dockbar_shell.knowledge-ingest-active .dockbar_global_navigation{
  display:none;
}

.dockbar_shell.knowledge-ingest-active .dockbar_knowledge_ingest{
  align-items:center;
  max-width:calc(100vw - 96px);
}

.dockbar_preview_tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.dockbar_preview_search{
  width:280px;
  height:34px;
  display:flex;
  align-items:center;
  border:1px solid var(--ui-border);
  border-radius:999px;
  background:#fff;
}

.dockbar_preview_search input{
  width:100%;
  min-width:0;
  height:32px;
  border:0;
  outline:0;
  background:transparent;
  padding:0 12px;
  font-size:13px;
  color:var(--ui-text);
}

.dockbar_preview_search input::placeholder{
  color:var(--ui-text-muted);
}

.dockbar_preview_count{
  min-width:70px;
  font-size:12px;
  color:var(--ui-text-soft);
  white-space:nowrap;
}

.dockbar_preview_article_select{
  width:150px;
  height:34px;
  border:1px solid var(--ui-border);
  border-radius:999px;
  background:#fff;
  padding:0 28px 0 12px;
  font-size:12px;
  color:var(--ui-text);
  outline:none;
}

.dockbar_preview_article_select:disabled{
  color:var(--ui-text-muted);
  background:rgba(248,250,252,0.82);
}

.dockbar_shell.template-center-active .dockbar_search,
.dockbar_shell.template-center-active .dockbar_common{
  display:none;
}

.dockbar_shell.template-center-active .dockbar_context{
  border-left:none;
  padding-left:0;
}

.dockbar_shell.template-center-active .dockbar_template_center{
  display:flex;
}

.dockbar_shell.template-center-active .dockbar{
  max-width:calc(100vw - 24px);
}

.dockbar_common{
  display:flex;
  gap:6px;
  align-items:center;
  padding-left:0;
  flex:0 0 auto;
  order:3;
}

.dockbar_common .dockbar_create_wrap{
  position:relative;
}

.dockbar_common > [data-action="memo_open"]{
  width:46px;
  height:50px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:0;
  border-radius:7px;
  font-size:11px;
  font-weight:760;
  white-space:nowrap;
}

.dockbar_common > [data-action="memo_open"] svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_common > [data-action="memo_open"] b{
  color:inherit;
  font-size:11px;
  line-height:1;
  font-weight:760;
}

.dockbar_common > [data-action="memo_open"]{
  border:1px solid transparent;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
}

.dockbar_common > [data-action="memo_open"]:hover{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_context{
  display:flex;
  gap:8px;
  padding-left:8px;
  border-left:1px solid var(--ui-border);
  flex:0 0 auto;
  order:4;
}

.dockbar_global_navigation{
  order:0;
}

.dockbar_group{
  display:none;
  gap:8px;
  flex:0 0 auto;
}

.dockbar_action_group{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  min-height:50px;
  padding:0 10px;
  border-right:1px solid var(--ui-border);
}

.dockbar_action_group:last-of-type{
  border-right:0;
}

.dockbar_action_group:not(:has(> button:not([hidden]))){
  display:none;
}

.dockbar_action_group > span{
  margin-right:3px;
  color:var(--ui-text-soft);
  font-size:11px;
  font-weight:760;
}

.dockbar_action_group .dockbar_icon_btn{
  width:46px;
  height:50px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
}

.dockbar_action_group .dockbar_icon_btn:hover:not(:disabled){
  border-color:#dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_action_group .dockbar_icon_btn.is-primary{
  color:#1d4ed8;
}

.dockbar_action_group .dockbar_icon_btn.is-active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:inset 0 0 0 1px #2563eb;
}

.dockbar_action_group .dockbar_icon_btn.is-warn{
  border-color:#fed7aa;
  background:#fff7ed;
  color:#c2410c;
}

.dockbar_action_group .dockbar_icon_btn.is-danger{
  color:#dc2626;
}

.dockbar_action_group .dockbar_icon_btn:disabled{
  opacity:.38;
  cursor:not-allowed;
}

.dockbar_action_group .dockbar_icon_btn svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_action_group .dockbar_icon_btn b{
  color:inherit;
  font-size:11px;
  line-height:1;
  font-weight:760;
}

.dockbar_party_manage_test{
  align-items:center;
  max-width:calc(100vw - 96px);
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:thin;
}

.dockbar_case_manage_test .dockbar_action_group{
  min-height:38px;
  padding:0 0 0 6px;
  border-right:0;
}

.dockbar_case_manage_test .dockbar_action_group > span{
  display:none;
}

.dockbar_case_manage_test .dockbar_icon_btn{
  width:auto;
  min-width:132px;
  height:38px;
  flex-direction:row;
  gap:7px;
  padding:0 13px;
  border:1px solid #bfdbfe;
  border-radius:10px;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_case_manage_test .dockbar_icon_btn:hover:not(:disabled),
.dockbar_case_manage_test .dockbar_icon_btn.is-active{
  border-color:#2563eb;
  background:#dbeafe;
  color:#1d4ed8;
  box-shadow:none;
}

.dockbar_case_manage_test .dockbar_icon_btn b{
  font-size:13px;
}

.case_document_defaults_modal{
  width:min(680px, calc(100vw - 32px));
}

.case_document_defaults_notice{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:12px 14px;
  border:1px solid #bfdbfe;
  border-radius:10px;
  background:#eff6ff;
  color:#1e3a8a;
}

.case_document_defaults_notice span{
  color:#475569;
  font-size:12px;
  line-height:1.6;
}

.case_document_defaults_fields{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.case_document_defaults_group_title{
  padding: 8px 4px 2px;
  color: var(--ui-text-secondary, #475467);
  font-size: 13px;
  font-weight: 700;
}

.case_document_defaults_field{
  display:grid;
  grid-template-columns:minmax(220px, 1fr) minmax(190px, .9fr) auto;
  align-items:center;
  gap:8px 12px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
}

.case_document_defaults_field > span{
  color:#0f172a;
  font-size:13px;
  font-weight:700;
}

.case_document_defaults_field select{
  min-width:0;
  height:38px;
  padding:0 10px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
}

.case_document_defaults_field small{
  grid-column:1 / 3;
  color:#64748b;
  font-size:12px;
}

.case_document_defaults_field button{
  grid-column:3;
  grid-row:2;
  border:0;
  background:transparent;
  color:#2563eb;
  font-size:12px;
  cursor:pointer;
}

.case_document_defaults_field button:disabled{
  color:#94a3b8;
  cursor:not-allowed;
}

.case_document_defaults_hint{
  min-height:20px;
  margin-top:10px;
  color:#166534;
  font-size:12px;
}

@media (max-width:640px){
  .case_document_defaults_field{
    grid-template-columns:1fr;
  }
  .case_document_defaults_field small,
  .case_document_defaults_field button{
    grid-column:1;
    grid-row:auto;
    justify-self:start;
  }
}

/* 统一标准：dockbar 常驻显示图标，按钮名称通过 title 悬浮提示显示。 */
.dockbar .dockbar_icon_btn b,
.dockbar_common > [data-action="memo_open"] b{
  display:none;
}

.dockbar_common > [data-action="memo_open"]{
  width:46px;
  min-width:46px;
  padding:0;
}

.dockbar_action_group .dockbar_icon_btn,
.dockbar_template_center .dockbar_icon_btn{
  width:46px;
  min-width:46px;
}

@media (max-width:720px){
  .dockbar_common > [data-action="memo_open"]{
    width:38px;
    padding:0;
    font-size:0;
  }

  .dockbar_case_manage_test .dockbar_icon_btn{
    min-width:38px;
    width:38px;
    padding:0;
  }

  .dockbar_case_manage_test .dockbar_icon_btn b{
    display:none;
  }

}

@media (max-width: 1080px){
  .dockbar_shell.party-manage-test-active .dockbar_action_group > span,
  .dockbar_shell.party-manage-test-active .dockbar_party_test_hint{
    display:none;
  }

  .dockbar_shell.party-manage-test-active .dockbar_action_group{
    gap:2px;
    padding-inline:5px;
  }
}

@media (max-width: 760px){
  .dockbar_shell.party-manage-test-active .dockbar{
    gap:2px;
    padding-inline:6px;
  }

  .dockbar_shell.party-manage-test-active .dockbar_party_manage_test{
    max-width:calc(100vw - 62px);
  }

  .dockbar_shell.party-manage-test-active .dockbar_action_group .dockbar_icon_btn{
    width:42px;
  }
}

.dockbar_template_center{
  max-width:calc(100vw - 88px);
  gap:10px;
  align-items:center;
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:thin;
}

.dockbar_download_center{
  gap:8px;
  align-items:center;
}

.dockbar_download_center_filter_panel{
  flex:0 0 0;
  width:0;
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
  transition:flex-basis .18s ease,width .18s ease,opacity .15s ease;
}

.dockbar_download_center.is-context-search-expanded .dockbar_download_center_filter_panel{
  flex-basis:520px;
  width:520px;
  opacity:1;
  pointer-events:auto;
}

.dockbar_evidence_task_detail{
  gap:8px;
  align-items:center;
}

.dockbar_evidence_task_detail .btn.is-active{
  border-color:#2563eb;
  color:#1d4ed8;
  background:#eff6ff;
}

.dockbar_evidence_task_detail .btn.is-warn{
  border-color:#fed7aa;
  color:#c2410c;
  background:#fff7ed;
}

.dockbar_download_center_search{
  flex:1 1 260px;
  width:260px;
  height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0;
  border:0 solid var(--ui-border);
  border-radius:8px;
  background:var(--ui-panel-soft);
  color:var(--ui-text-soft);
  overflow:hidden;
  padding:0 10px;
  border-width:1px;
}

.dockbar_download_center_search svg{
  width:15px;
  height:15px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_download_center_search input{
  min-width:0;
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ui-text);
  font-size:12px;
}

.dockbar_download_center_search input::placeholder{
  color:var(--ui-text-muted);
}

.dockbar_download_center_select{
  flex:0 0 auto;
  width:116px;
  height:34px;
  border:1px solid var(--ui-border);
  border-radius:8px;
  background:var(--ui-panel-soft);
  color:var(--ui-text-soft);
  padding:0 24px 0 10px;
  font-size:12px;
  font-weight:700;
}

.dockbar_download_center .dockbar_icon_btn{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
}

.dockbar_download_center .dockbar_icon_btn:hover:not(:disabled){
  border-color:#dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_download_center .dockbar_icon_btn.is-active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:inset 0 0 0 1px #2563eb;
}

.dockbar_download_center .dockbar_icon_btn.is-danger{
  color:#dc2626;
}

.dockbar_download_center .dockbar_icon_btn:disabled{
  opacity:.38;
  cursor:not-allowed;
  background:transparent;
  color:#9ca3af;
  border-color:transparent;
}

.dockbar_download_center .dockbar_icon_btn svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_template_center_search{
  flex:0 0 0;
  width:0;
  height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0;
  border:0 solid var(--ui-border);
  border-radius:8px;
  background:var(--ui-panel-soft);
  color:var(--ui-text-soft);
  opacity:0;
  overflow:hidden;
  pointer-events:none;
  transition:width .18s ease,flex-basis .18s ease,opacity .15s ease,padding .18s ease,border-width .18s ease;
}

.dockbar_template_center.is-context-search-expanded .dockbar_template_center_search{
  flex-basis:260px;
  width:260px;
  padding:0 10px;
  border-width:1px;
  opacity:1;
  pointer-events:auto;
}

.dockbar_template_center_search svg{
  width:15px;
  height:15px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_template_center_search input{
  min-width:0;
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ui-text);
  font-size:12px;
}

.dockbar_template_center_search input::placeholder{
  color:var(--ui-text-muted);
}

.dockbar_template_center .template_action_group{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  min-height:50px;
  padding:0 10px;
  border-right:1px solid var(--ui-border);
}

.dockbar_template_center .template_action_group[hidden],
.dockbar_template_center .dockbar_icon_btn[hidden],
.dockbar_template_center .template_settings_wrap[hidden]{
  display:none;
}

.dockbar_template_center .template_action_group:last-child{
  border-right:0;
}

.dockbar_template_center .template_action_group > span{
  color:var(--ui-text-soft);
  font-size:11px;
  font-weight:760;
  margin-right:3px;
}

.dockbar_template_center .dockbar_icon_btn{
  width:46px;
  height:50px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
}

.dockbar_template_center .dockbar_icon_btn:hover{
  border-color:#dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_template_center .dockbar_icon_btn.is-active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:inset 0 0 0 1px #2563eb;
}

.dockbar_template_center .dockbar_icon_btn:disabled{
  opacity:.38;
  cursor:not-allowed;
  background:transparent;
  color:#9ca3af;
  border-color:transparent;
}

.dockbar_template_center .dockbar_icon_btn svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dockbar_template_center .dockbar_icon_btn b{
  color:inherit;
  font-size:11px;
  line-height:1;
  font-weight:760;
}

.dockbar_template_center .dockbar_icon_btn.is-primary{
  color:#1d4ed8;
}

.dockbar_template_center .dockbar_icon_btn.is-danger{
  color:#dc2626;
}

.dockbar_template_center .template_settings_wrap{
  position:relative;
  flex:0 0 auto;
}

.dockbar_template_center .template_settings_menu,
.dockbar_template_settings_menu{
  position:fixed;
  right:auto;
  bottom:auto;
  z-index:1400;
  width:132px;
  padding:6px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#ffffff;
  box-shadow:0 14px 34px rgba(17,24,39,0.16);
}

.dockbar_template_center .template_settings_menu[hidden],
.dockbar_template_settings_menu[hidden]{
  display:none;
}

.dockbar_template_center .template_settings_menu button,
.dockbar_template_settings_menu button{
  width:100%;
  height:34px;
  border:0;
  border-radius:6px;
  background:#ffffff;
  color:#111827;
  font-size:12px;
  font-weight:760;
  text-align:left;
  padding:0 10px;
  cursor:pointer;
}

.dockbar_template_center .template_settings_menu button:hover,
.dockbar_template_settings_menu button:hover{
  background:#eff6ff;
  color:#1d4ed8;
}

.dockbar_group.active{
  display:flex;
}

.dockbar_subject_ocr_mode{
  display:flex;
  align-items:center;
  gap:8px;
}

.dockbar_subject_ocr_mode[hidden]{
  display:none !important;
}

.dockbar_recycle_divider{
  width:1px;
  height:20px;
  background:var(--ui-border);
  border-radius:999px;
  align-self:center;
}

.dockbar_recycle_mode{
  display:flex;
  align-items:center;
  gap:8px;
}

.dockbar_recycle_mode[hidden]{
  display:none !important;
}

.dockbar_recycle_hint{
  font-size:12px;
  color:var(--ui-text-muted);
  white-space:nowrap;
}

.dockbar_party_test_hint{
  align-self:center;
  max-width:340px;
  overflow:hidden;
  color:var(--ui-text-muted);
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dockbar_create_wrap,
.dockbar_action_wrap{
  position:relative;
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

.dockbar_create_menu,
.dockbar_action_menu{
  position:absolute;
  left:50%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%);
  display:none;
  flex-direction:column;
  min-width:160px;
  padding:6px;
  gap:4px;
  background:var(--ui-panel);
  border:1px solid var(--ui-border);
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,0.20);
  z-index:25;
}

.dockbar_create_wrap.active .dockbar_create_menu,
.dockbar_action_wrap.active .dockbar_action_menu{
  display:flex;
}

.dockbar_create_menu_item,
.dockbar_action_menu_item{
  border:none;
  background:transparent;
  color:var(--ui-text);
  font-size:13px;
  text-align:left;
  line-height:1.2;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  white-space:nowrap;
}

.dockbar_create_menu_item:hover,
.dockbar_action_menu_item:hover{
  background:var(--ui-panel-soft);
}

.dockbar .btn{
  height:34px;
  padding:0 12px;
  font-size:12.5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.dockbar_collapse_btn{
  appearance:none;
  -webkit-appearance:none;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  color:var(--ui-text-soft);
  line-height:1;
  cursor:pointer;
  /* 折叠控制固定为 Dockbar 的最后一个操作项，所有页面统一。 */
  order:999;
  margin-left:2px;
}

.dockbar_collapse_btn:hover,
.dockbar_collapse_btn:focus-visible{
  color:var(--ui-text);
}

.dockbar_collapse_btn:focus-visible{
  outline:2px solid rgba(37,99,235,0.38);
  outline-offset:2px;
}

.dockbar_collapse_icon{
  width:22px;
  height:22px;
  display:block;
  stroke:currentColor;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}

.dockbar_restore_hit{
  pointer-events:auto;
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  width:250px;
  height:5px;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0;
  border:none;
  border-radius:999px;
  background:transparent;
  cursor:pointer;
}

.dockbar_restore_line{
  width:250px;
  height:5px;
  border-radius:999px;
  background:rgba(31,41,55,0.62);
  box-shadow:0 2px 10px rgba(15,23,42,0.18);
}

.dockbar_restore_hit:hover .dockbar_restore_line{
  background:rgba(31,41,55,0.82);
}

.dockbar_shell.is-collapsed .dockbar{
  display:none;
}

.dockbar_shell.is-collapsed .dockbar_restore_hit{
  display:flex;
}

.dockbar [hidden]{
  display:none !important;
}

/* memo modal */

.dockbar_modal_backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.28);
  display:none;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
  z-index:40;
}

.dockbar_modal_backdrop.active{
  display:flex;
}

.dockbar_modal{
  width:min(900px, calc(100vw - 64px));
  max-height:calc(100vh - 120px);
  overflow:hidden;
  background:var(--ui-panel);
  border:1px solid var(--ui-border);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,0.24);
  display:flex;
  flex-direction:column;
}

.dockbar_modal_header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid var(--ui-border);
}

.dockbar_modal_title{
  font-size:18px;
  font-weight:600;
  color:var(--ui-text);
  line-height:1.3;
}

.dockbar_modal_subtitle{
  margin-top:4px;
  font-size:12px;
  line-height:1.5;
  color:var(--ui-text-muted);
}

.dockbar_modal_close{
  border:none;
  background:transparent;
  color:var(--ui-text-soft);
  cursor:pointer;
  font-size:13px;
  padding:8px 10px;
  border-radius:10px;
}

.dockbar_modal_close:hover{
  background:var(--ui-panel-soft);
  color:var(--ui-text);
}

.dockbar_modal_body{
  padding:18px 20px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.memo_form_grid{
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:16px;
}

.memo_field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.memo_label{
  font-size:12px;
  font-weight:600;
  color:var(--ui-text-muted);
}

.memo_select{
  height:38px;
  border-radius:10px;
  border:1px solid var(--ui-border);
  background:var(--ui-panel);
  color:var(--ui-text);
  padding:0 12px;
  font-size:13px;
}

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

.memo_selected_case{
  min-height:34px;
  display:flex;
  align-items:center;
  padding:0 10px;
  border-radius:10px;
  background:var(--ui-panel-soft);
  color:var(--ui-text-soft);
  font-size:12px;
  border:1px solid var(--ui-border);
  flex:1;
}

.memo_case_picker{
  display:none;
  flex-direction:column;
  gap:10px;
  border:1px solid var(--ui-border);
  border-radius:14px;
  background:var(--ui-panel-soft);
  padding:12px;
}

.memo_case_picker.active{
  display:flex;
}

.memo_case_picker_list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:180px;
  overflow:auto;
}

.memo_case_option{
  text-align:left;
  border:1px solid var(--ui-border);
  background:var(--ui-panel);
  color:var(--ui-text);
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  font-size:12.5px;
  line-height:1.4;
}

.memo_case_option:hover{
  background:var(--ui-card-hover);
}

.memo_textarea{
  min-height:220px;
  resize:vertical;
  border-radius:12px;
  border:1px solid var(--ui-border);
  background:var(--ui-panel);
  color:var(--ui-text);
  padding:12px 14px;
  font-size:13px;
  line-height:1.6;
  font-family:"JetBrains Mono", monospace;
}

.memo_textarea::placeholder{
  color:var(--ui-text-muted);
}

.dockbar_modal_footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 20px 18px;
  border-top:1px solid var(--ui-border);
}

.dockbar_modal_hint{
  font-size:12px;
  color:var(--ui-text-muted);
  background:var(--ui-panel-soft);
  border:1px dashed var(--ui-border);
  border-radius:10px;
  padding:10px 12px;
}

/* case create */

.case_form_grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.case_form_field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.case_form_field_full{
  grid-column:1 / -1;
}

.case_form_label{
  font-size:12px;
  font-weight:600;
  color:var(--ui-text-muted);
}

.case_form_input{
  height:38px;
}

.case_form_select{
  height:38px;
  border-radius:10px;
  border:1px solid var(--ui-border);
  background:var(--ui-panel);
  color:var(--ui-text);
  padding:0 12px;
  font-size:13px;
}

/* batch import */

.case_batch_section{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--ui-border);
  background:var(--ui-panel-soft);
}

.case_batch_label{
  font-size:12px;
  font-weight:600;
  color:var(--ui-text-muted);
}

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

.case_batch_file{
  border:1px dashed var(--ui-border);
  padding:8px 10px;
  border-radius:10px;
  background:var(--ui-panel);
  color:var(--ui-text);
  font-size:12px;
  max-width:320px;
}

.case_batch_hint{
  font-size:12px;
  color:var(--ui-text-muted);
}

@media (max-width: 900px){
  .memo_form_grid{
    grid-template-columns:1fr;
  }

  .case_form_grid{
    grid-template-columns:1fr;
  }
}
