/* Local collection organization and per-holding batch editing. */
dialog.bulk-editor-dialog[open] {
  display:flex;
  flex-direction:column;
  width:min(900px,calc(100% - 28px));
  max-height:90dvh;
  overflow:hidden;
}
.bulk-editor-dialog .dialog-header,
.bulk-editor-dialog .dialog-footer { flex-shrink:0 }
.bulk-editor-dialog .dialog-header { padding-bottom:16px }
.bulk-editor-dialog .dialog-body { min-height:0; padding-top:4px; overflow:auto; overscroll-behavior:contain }
.bulk-editor-dialog .dialog-footer .btn { min-height:44px }
.batch-editor { min-width:0 }
.batch-fx-note { margin:0 0 16px; color:var(--muted); font-size:12px; line-height:1.7; overflow-wrap:anywhere }
.batch-fx-note strong { color:var(--text); font-weight:500 }
.batch-table-scroll { width:100%; max-width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:10px }
.bulk-edit-table { width:100%; min-width:735px; table-layout:fixed; border-collapse:collapse; font-size:12px; line-height:1.5 }
.bulk-edit-table th { text-align:left; padding:13px 12px; color:var(--muted); font-size:11px; font-weight:500; background:var(--page); border-bottom:1px solid var(--line) }
.bulk-edit-table th:nth-child(1) { width:28% }
.bulk-edit-table th:nth-child(2) { width:19% }
.bulk-edit-table th:nth-child(3) { width:13% }
.bulk-edit-table th:nth-child(4) { width:21% }
.bulk-edit-table th:nth-child(5) { width:19% }
.bulk-edit-table td { padding:14px 12px; vertical-align:top; border-bottom:1px solid var(--line); overflow-wrap:anywhere }
.bulk-edit-table tr:last-child td { border-bottom:0 }
.bulk-edit-table .batch-card strong { display:block; color:var(--text); font-size:13px; font-weight:600; line-height:1.5 }
.bulk-edit-table .batch-card small { display:block; color:var(--muted); font-size:11px; line-height:1.6; margin-top:5px }
.bulk-edit-table .collection-cell { color:var(--muted) }
.bulk-edit-table input { display:block; width:100%; min-width:0; min-height:44px; padding:9px 9px; color:var(--text); font-size:13px; font-variant-numeric:tabular-nums }
.bulk-edit-table input:focus-visible { outline-offset:2px }
.bulk-edit-table input[aria-invalid="true"] { border-color:var(--down) }
.bulk-edit-table .batch-total { padding-top:25px; color:var(--text); font-variant-numeric:tabular-nums; font-weight:600 }
.batch-row-error { display:block; color:var(--down); font-size:11px; line-height:1.6; margin-top:7px; overflow-wrap:anywhere }
.batch-row-error:empty { display:none }
.batch-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; margin-top:18px; border:1px solid var(--line); border-radius:10px; background:var(--page) }
.batch-summary>div { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:7px }
.batch-summary span { color:var(--muted); font-size:11px; line-height:1.5 }
.batch-summary strong { color:var(--text); font-size:17px; font-weight:600; line-height:1.5; font-variant-numeric:tabular-nums; overflow-wrap:anywhere }
.batch-status { margin-top:12px; color:var(--muted); font-size:12px; line-height:1.6 }
.batch-status:empty { display:none }
.batch-remove-note { margin:12px 0 0; color:var(--muted); font-size:12px; line-height:1.7 }
.batch-remove-note.has-removals,.batch-row-removed .batch-total { color:var(--down) }
.bulk-edit-table .batch-row-changed { background:color-mix(in srgb,var(--accent) 5%,var(--panel)) }
.batch-remove-note:empty { display:none }
.collection-organize { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:0 0 18px }
.collection-organize .category-filter { display:flex; flex-direction:column; gap:7px; flex:1 1 220px; max-width:340px; min-width:0; color:var(--muted); font-size:11px; line-height:1.5 }
.category-filter select { display:block; width:100%; min-height:44px; padding:9px 12px; font-size:12px }
.collection-organize>.btn { min-height:44px; flex-shrink:0 }
.category-chip { display:inline-block; max-width:100%; padding:3px 8px; margin:8px 0 0; border:1px solid var(--line); border-radius:6px; background:var(--page); color:var(--accent); font-size:10px; font-weight:500; line-height:1.6; letter-spacing:0; overflow-wrap:anywhere; vertical-align:middle }
.category-list { display:grid; gap:0; margin:16px 0; border:1px solid var(--line); border-radius:9px; overflow:hidden }
.category-row { display:flex; justify-content:space-between; align-items:center; gap:14px; min-height:50px; padding:13px 15px; border-bottom:1px solid var(--line); font-size:12px; line-height:1.6 }
.category-row:last-child { border-bottom:0 }
.category-row>span:first-child,.category-row strong { min-width:0; overflow-wrap:anywhere; font-weight:500 }
.category-row small { color:var(--muted); font-size:11px; line-height:1.6; flex-shrink:0 }
.inline-group-create { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; padding-top:16px; margin-top:16px; border-top:1px solid var(--line) }
.inline-group-create .field { flex:1 1 180px; min-width:0; margin:0 }
.inline-group-create>input { flex:1 1 180px; min-width:0; min-height:44px; padding:10px 12px }
.inline-group-create .btn { min-height:44px; flex-shrink:0 }
.inline-group-create .form-error { flex-basis:100%; margin:0 }
@media(max-width:700px) {
  .bulk-editor-dialog .dialog-header { padding:20px 18px 14px }
  .bulk-editor-dialog .dialog-header h2 { font-size:19px }
  .bulk-editor-dialog .dialog-body { padding:4px 18px 20px }
  .bulk-editor-dialog .dialog-footer { padding:14px 18px }
  .batch-table-scroll { overflow:visible; border:0; border-radius:0 }
  .bulk-edit-table { display:block; min-width:0; width:100%; border-collapse:separate }
  .bulk-edit-table thead { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0 }
  .bulk-edit-table tbody { display:grid; gap:14px }
  .bulk-edit-table .batch-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:13px 12px; padding:15px; border:1px solid var(--line); border-radius:10px; background:var(--page) }
  .bulk-edit-table td { display:block; min-width:0; padding:0; border:0 }
  .bulk-edit-table .batch-card,.bulk-edit-table .collection-cell,.bulk-edit-table .batch-total { grid-column:1/-1 }
  .bulk-edit-table .batch-card strong { font-size:14px }
  .bulk-edit-table .batch-card small { font-size:11px }
  .bulk-edit-table .collection-cell { margin-top:-4px; font-size:12px }
  .bulk-edit-table td[data-label]::before { content:attr(data-label); display:block; margin-bottom:7px; color:var(--muted); font-size:11px; font-weight:400; line-height:1.6 }
  .bulk-edit-table .collection-cell[data-label]::before { display:inline; margin:0 5px 0 0 }
  .bulk-edit-table input { min-height:46px; padding:10px 9px; font-size:16px; background:var(--panel) }
  .bulk-edit-table .batch-total { display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:11px 0 0; border-top:1px solid var(--line); font-size:13px }
  .bulk-edit-table .batch-total[data-label]::before { margin:0; max-width:65% }
  .batch-summary { padding:14px; gap:12px }
  .batch-summary strong { font-size:15px }
  .collection-organize { gap:10px }
  .collection-organize .category-filter { max-width:none; flex-basis:100% }
  .collection-organize>.btn { flex:1 1 130px; justify-content:center }
  .category-filter select { font-size:14px }
  .category-row { align-items:flex-start; padding:12px }
  .inline-group-create .field { flex-basis:100% }
  .inline-group-create>input { flex-basis:100% }
  .inline-group-create>.btn { width:100%; justify-content:center }
}
@media(max-width:380px) {
  .batch-summary { grid-template-columns:1fr }
  .bulk-edit-table .batch-row { padding:12px; gap:12px 9px }
}
