.bulk-page { background:#f3edfc; }
.bulk {
  --bulk-panel:#fff; --bulk-ink:#1a1730; --bulk-muted:#5e5874; --bulk-line:#e3d8f5;
  --bulk-soft:#f7f2ff; --bulk-purple:#642ce8; --bulk-focus:#7238ed;
  --bulk-field:#fff; --bulk-disabled:#e6e1f1; --bulk-disabled-text:#706980;
  color:var(--bulk-ink); width:min(100% - 2rem,1480px); max-width:1480px; margin-inline:auto; padding-inline:0; padding-block:1.4rem 3rem;
}
[data-theme="dark"] .bulk-page, .bulk-page[data-theme="dark"] { background:#1a1429; }
[data-theme="dark"] .bulk {
  --bulk-panel:#261e36; --bulk-ink:#f3eeff; --bulk-muted:#d3c7e8; --bulk-line:#51436a;
  --bulk-soft:#322547; --bulk-purple:#743cf0; --bulk-focus:#be9eff;
  --bulk-field:#292038; --bulk-disabled:#3c334b; --bulk-disabled-text:#c2b4d3;
}
.bulk [hidden] { display:none !important; }
.bulk-heading { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.bulk h1 { margin:0 0 .3rem; font-size:clamp(1.65rem,3vw,2.55rem); }
.bulk-heading p { margin:0; color:var(--bulk-muted); max-width:70ch; }
.bulk-heading a { flex:none; color:inherit; text-decoration:underline; text-underline-offset:3px; }
.bulk h2 { margin:0 0 .65rem; font-size:1.15rem; }
.bulk-layout { display:grid; grid-template-columns:minmax(0,2.55fr) minmax(235px,1fr); gap:.9rem; align-items:start; }
.bulk-side { display:grid; gap:.9rem; min-width:0; }
.bulk-panel,.bulk dialog {
  color:var(--bulk-ink); background:var(--bulk-panel); border:1px solid var(--bulk-line);
  border-radius:16px; box-shadow:0 2px 8px #30145b09; padding:1rem; min-width:0;
}
.bulk button,.bulk input[type="search"],.bulk select {
  appearance:none; font:inherit; color:inherit; background:var(--bulk-field);
  border:1px solid var(--bulk-line); border-radius:9px; box-sizing:border-box;
}
.bulk button { padding:.5rem .75rem; font-weight:600; line-height:1.3; cursor:pointer; }
.bulk button:not(:disabled):hover { background:var(--bulk-soft); border-color:var(--bulk-focus); }
.bulk button.primary {
  color:#fff; background:linear-gradient(160deg,#783df1,var(--bulk-purple) 72%,#5822c2);
  border-color:transparent; box-shadow:0 2px 5px #5023ac25;
}
.bulk button.primary:not(:disabled):hover { color:#fff; background:#5621c9; border-color:transparent; }
.bulk button:disabled { color:var(--bulk-disabled-text); background:var(--bulk-disabled); box-shadow:none; cursor:default; opacity:1; }
.bulk :is(button,input,select,a,summary,[tabindex]):focus-visible { outline:2px solid var(--bulk-focus); outline-offset:2px; }
.bulk-actions,.bulk-progress > div { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; }
.bulk-progress { padding:.8rem .95rem; border:1px solid var(--bulk-line); background:var(--bulk-soft); border-radius:12px; margin:.85rem 0; }
.bulk-progress > div { justify-content:space-between; }
.bulk-progress progress { display:block; width:100%; height:.62rem; margin:.55rem 0; border:none; border-radius:20px; background:#ddd0f7; overflow:hidden; accent-color:var(--bulk-purple); }
.bulk-progress progress::-webkit-progress-bar { background:#ddd0f7; }
.bulk-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#7834ef,#642ce8); border-radius:20px; }
.bulk-progress progress::-moz-progress-bar { background:#642ce8; border-radius:20px; }
.bulk-progress p { color:var(--bulk-muted); margin:.3rem 0; }
.bulk-scroll { max-height:min(66vh,620px); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; scrollbar-color:#a992cc transparent; padding:2px 6px 5px 2px; }
.bulk-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:.65rem; }
.bulk-photo { border:1px solid var(--bulk-line); background:var(--bulk-panel); border-radius:12px; min-width:0; }
.bulk-photo[data-state="working"] { outline:2px solid var(--bulk-focus); outline-offset:-1px; }
.bulk-preview { position:relative; overflow:hidden; border-radius:11px 11px 0 0; aspect-ratio:4/3; isolation:isolate; }
.bulk-preview img { display:block; width:100%; height:100%; object-fit:contain; background:#eeeaf4; }
.bulk-photo[data-state="done"] img { background:repeating-conic-gradient(#fff 0 25%,#ebe8f1 0 50%) 0/16px 16px; }
.bulk-status {
  position:absolute; z-index:2; inset:.45rem auto auto .45rem; margin:0; padding:.23rem .48rem;
  color:#2e2840; background:#f1eef7; border-radius:99px; font-size:.76rem; font-weight:700;
}
.bulk-photo[data-state="done"] .bulk-status { color:#165b2a; background:#d7f8df; }
.bulk-photo[data-state="failed"] .bulk-status { color:#8c2130; background:#ffe4e7; }
.bulk-photo[data-state="working"] .bulk-status { inset:50% auto auto 50%; transform:translate(-50%,-50%); background:#241b3aeb; color:white; text-align:center; min-width:max-content; }
.bulk-preview .magic { position:absolute; inset:0; z-index:1; background-color:#21183155; pointer-events:none; }
.bulk-card-footer { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,max-content); align-items:start; gap:.35rem; padding:.42rem .48rem; }
.bulk-filename { margin:.35rem 0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0; font-size:.86rem; }
.bulk-card-footer .bulk-actions { justify-content:flex-end; max-width:100%; gap:.25rem; }
.bulk-card-footer button { font-size:.76rem; padding:.34rem .45rem; }
.bulk-split { display:inline-flex; min-width:0; border-radius:8px; overflow:hidden; }
.bulk-split button.primary { border-radius:0; box-shadow:none; flex:none; }
.bulk-split button.bulk-split-options { border-inline-start:1px solid #ffffff65; min-width:1.65rem; font-size:1rem; line-height:1; }
.bulk-photo-details { width:100%; color:var(--bulk-muted); font-size:.75rem; text-align:end; }
.bulk-photo-details p { margin:.3rem 0; overflow-wrap:anywhere; }
.bulk-photo-details summary { cursor:pointer; }
.bulk-photo-details[open] { text-align:start; }
.bulk-side section:first-child .bulk-actions { align-items:stretch; }
#bulk-zip { flex:1; }
#bulk-count { font-weight:700; margin:.4rem 0 .7rem; }
.bulk-history-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.35rem; margin-bottom:.48rem; }
.bulk-history-item button { text-align:start; overflow-wrap:anywhere; font-size:.83rem; }
.bulk-history-item button:first-child { background:var(--bulk-soft); }
.bulk-storage-panel p { margin:0 0 .65rem; font-weight:600; overflow-wrap:anywhere; }
.bulk-storage-panel #bulk-delete-all { display:block; margin-inline-start:auto; }
#bulk-storage[data-level="warn"] { color:#9c4300; background:#fff1df; border-radius:8px; padding:.55rem; }
#bulk-storage[data-level="critical"] { color:#a01822; background:#ffe4e7; border-radius:8px; padding:.55rem; }
.bulk dialog { width:min(620px,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); padding:1.2rem; }
.bulk dialog::backdrop { background:#241a3d76; }
.bulk-dialog-heading { display:flex; justify-content:space-between; gap:.7rem; align-items:center; margin-bottom:.7rem; }
.bulk-dialog-heading h2 { margin:0; }
.bulk button.bulk-dialog-close { padding:.25rem .55rem; font-size:1.25rem; }
.bulk input[type="search"] { padding:.55rem .65rem; width:100%; margin-bottom:.65rem; }
.bulk select { appearance:auto; padding:.45rem .6rem; min-width:6rem; }
.bulk-review-results { max-height:42vh; overflow:auto; margin-block:.75rem; }
.bulk-review-results label { display:grid; grid-template-columns:auto 42px minmax(0,1fr); align-items:center; gap:.5rem; padding:.4rem; border-bottom:1px solid var(--bulk-line); }
.bulk-review-results label:hover { background:var(--bulk-soft); }
.bulk-review-results label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bulk-review-results input[type="checkbox"],.bulk input[type="range"] { accent-color:var(--bulk-purple); }
.bulk-review-results img { width:42px; height:32px; object-fit:cover; border-radius:5px; }
.bulk-export-fields { display:grid; gap:.65rem; }
.bulk-export-fields label,.bulk-quality-control { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
#bulk-export-jpg-note,#bulk-export-size { color:var(--bulk-muted); }
@media (max-width:1080px) { .bulk-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .bulk { width:min(100% - 1rem,1480px); }
  .bulk-heading { align-items:start; flex-direction:column; gap:.5rem; }
  .bulk-layout,.bulk-grid { grid-template-columns:minmax(0,1fr); }
  .bulk-preview { max-height:235px; }
  .bulk-scroll { max-height:58dvh; }
}
.bulk button .ui-icon { vertical-align:-.18em; width:1em; height:1em; margin-inline-end:.3em; }
.bulk button.bulk-split-options .ui-icon { margin:0; }
.bulk-card-footer .bulk-actions { max-width:min(11rem,42vw); min-width:0; }
