#documentBundleSettingsList .bundle-compact-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; }
.bundle-compact-name { min-width: 0; overflow-wrap: anywhere; }
#documentBundleSettingsList .bundle-compact-row button { flex: 0 0 auto; min-height: 42px; font-size: 15px; }
dialog.document-bundle-editor { box-sizing: border-box; width: min(1050px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 1px solid #d5dfeb; border-radius: 18px; color: #173452; }
.document-bundle-editor::backdrop { background: #172b4c99; }
.document-bundle-editor-card { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); margin: 0; }
.document-bundle-editor-card header { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 20px; border-bottom: 1px solid #d8e2ef; }
.document-bundle-editor-card h2 { margin: 0 0 8px; font-size: 1.35rem; }
.document-bundle-editor-card p { margin: 0; font-size: .9rem; line-height: 1.5; color: #63758d; }
.document-bundle-editor-fields { display: grid; gap: 16px; padding: 20px; overflow: auto; min-height: 0; }
.document-bundle-editor-fields label { display: grid; gap: 7px; min-width: 0; font-weight: 600; }
.document-bundle-editor-fields input, .document-bundle-editor-fields select { box-sizing: border-box; min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #c8d5e7; border-radius: 10px; font: inherit; background: white; }
.document-bundle-editor-fields input:focus, .document-bundle-editor-fields select:focus { outline: 2px solid #4b75cd; outline-offset: 1px; }
.document-bundle-editor-items { display: grid; gap: 14px; }
.document-bundle-editor-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) 145px auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid #d8e2ef; border-radius: 12px; background: #f8fbff; }
.bundle-editor-item-number { align-self: center; text-align: center; font-weight: 700; color: #075dce; }
.bundle-editor-item-actions { display: flex; gap: 6px; align-items: end; }
.document-bundle-editor button { min-height: 42px; font-size: 15px; white-space: normal; }
.document-bundle-editor-fields > button { justify-self: start; }
.document-bundle-editor-fields .document-bundle-editor-error { color: #a12d2d; overflow-wrap: anywhere; }
.document-bundle-editor-error:empty { display: none; }
.document-bundle-editor-card footer { display: flex; flex-shrink: 0; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid #d8e2ef; background: white; }
@media (max-width: 760px) {
  .document-bundle-editor-item { grid-template-columns: 1fr; }
  .bundle-editor-item-number { display: none; }
  .bundle-editor-item-actions { justify-content: flex-end; }
  .document-bundle-editor-card header, .document-bundle-editor-fields { padding: 16px; }
}
@media (max-width: 430px) {
  dialog.document-bundle-editor { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .document-bundle-editor-card footer { padding: 12px; gap: 8px; }
  .document-bundle-editor-card footer button { flex: 1; }
  #documentBundleSettingsList .bundle-compact-row { padding: 12px; gap: 10px; }
}
