.bulk-entry{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0;color:var(--text-secondary);font-size:13px}
.bulk-sheet{position:fixed;inset:0;margin:auto;width:calc(100vw - 40px);max-width:1600px;height:calc(100dvh - 40px);max-height:100dvh;padding:20px;border:1px solid var(--border-color,#363b45);border-radius:18px;background:var(--bg-primary,#0b1019);color:var(--text-primary,#edf0f5);box-shadow:0 20px 90px #0008;overflow:hidden}
.bulk-sheet[open]{display:flex;flex-direction:column;gap:12px}.bulk-sheet::backdrop{background:#0009}
.bulk-header,.bulk-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;flex-shrink:0}.bulk-header{justify-content:space-between}.bulk-header h2{font-size:22px;margin:0}.bulk-help{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.65}.bulk-status{margin:0;min-height:24px;font-size:14px;color:var(--color-primary,#dfba6b)}.bulk-status.is-error{color:var(--color-danger,#ff8181)}
.bulk-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--border-color,#363b45);border-radius:8px;scrollbar-gutter:stable;touch-action:pan-x pan-y;outline-offset:2px}.bulk-scroll.can-pan{cursor:grab}.bulk-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:14px;table-layout:fixed}.bulk-table th,.bulk-table td{border-right:1px solid var(--border-color,#363b45);border-bottom:1px solid var(--border-color,#363b45);padding:0;min-width:175px;max-width:260px;height:44px;white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:middle}.bulk-table thead th{position:sticky;top:0;z-index:2;padding:10px 12px;background:var(--bg-secondary,#151c29);text-align:left;font-weight:600}.bulk-table thead small{display:block;font-size:11px;font-weight:400;color:var(--text-secondary);margin-top:5px}.bulk-table tbody td:not(:has(input,textarea)){padding:10px 12px}.bulk-table th:first-child{position:sticky;left:0;min-width:62px;max-width:62px;z-index:1;background:var(--bg-secondary,#151c29);text-align:center}.bulk-table thead th:first-child{z-index:3}.bulk-table th .btn{padding:2px 5px;margin-left:4px}#bulkSheet .bulk-table :is(input,textarea){box-sizing:border-box;display:block;width:100%;min-width:175px;height:44px;border:2px solid transparent;border-radius:0;padding:8px 10px;background:transparent;color:inherit;font:inherit;box-shadow:none}#bulkSheet .bulk-table :is(input,textarea):focus{outline:none;border-color:var(--color-primary,#dfba6b);background:var(--bg-secondary,#151c29)}#bulkSheet .bulk-table :is(input,textarea).changed{background:#dfba6b14}#bulkSheet .bulk-table :is(input,textarea)[aria-invalid=true]{border-color:var(--color-danger,#ff8181);background:#ff818114}#bulkSheet .bulk-table :is(input,textarea):disabled{opacity:.7}.bulk-empty{padding:20px;color:var(--text-secondary)}.bulk-sheet button:focus-visible,.bulk-scroll:focus-visible,.bulk-table td:focus-visible{outline:2px solid var(--color-primary,#dfba6b);outline-offset:2px}
@media(max-width:899px){.bulk-sheet{width:100vw;height:100dvh;border-radius:0;padding:12px}.bulk-help{font-size:12px}.bulk-header h2{font-size:18px}#bulkSheet .bulk-table :is(input,textarea){font-size:16px}}

.bulk-sheet [hidden]{display:none!important}.bulk-table textarea{resize:none;line-height:24px}

.bulk-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.bulk-table th:first-child{box-sizing:border-box;width:62px}
.bulk-table th:nth-child(2),.bulk-table td:nth-child(2){position:sticky;left:62px;z-index:1;background:var(--bg-primary,#0b1019);min-width:220px;box-shadow:1px 0 var(--border-color,#363b45)}
.bulk-table thead th:nth-child(2){z-index:3;background:var(--bg-secondary,#151c29)}
.bulk-sheet button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:899px){.bulk-table th:nth-child(2),.bulk-table td:nth-child(2){position:static;min-width:175px;box-shadow:none}}

#bulkSheet .btn-outline{background:var(--bg-secondary,#151c29);color:var(--text-primary,#edf0f5);border:1px solid var(--border-color,#363b45);box-shadow:none}
#bulkSheet .btn-primary{background:var(--color-primary,#736eff);color:var(--a-on-accent,#fff);border:1px solid transparent;box-shadow:none}

.bulk-fill{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0;font-size:13px}
.bulk-selection-info{color:var(--text-secondary);min-width:230px}
#bulkFillValue{width:230px;max-width:100%;padding:8px 10px;border:1px solid var(--border-color);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary)}
#bulkSheet .range-selected{box-shadow:var(--range-edges);background:var(--bg-secondary)}
#bulkSheet .range-selected :is(input,textarea),#bulkSheet .range-selected :is(input,textarea).changed{background:color-mix(in srgb,var(--color-primary) 16%,transparent)}
#bulkSheet .range-selected :is(input,textarea):focus{border-color:transparent}
#bulkSheet .range-selected :is(input,textarea)[aria-invalid=true]{border-color:var(--color-danger);background:#ff818114}
.bulk-scroll.range-selecting,.bulk-scroll.range-selecting *{user-select:none;cursor:cell}
.bulk-table .range-heading{cursor:pointer}

/* A viewport-sized editor with readable compact columns and explicit choices. */
.bulk-sheet{box-sizing:border-box;--bulk-text:160px;--bulk-short:140px;--bulk-date:160px;--bulk-name:220px;--bulk-wide:250px;--bulk-row:62px;--bulk-height:44px}
.bulk-sheet.is-expanded{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0;padding:14px}
.bulk-sheet.is-compact{--bulk-text:126px;--bulk-short:100px;--bulk-date:132px;--bulk-name:180px;--bulk-wide:190px;--bulk-row:48px;--bulk-height:36px;gap:8px}
.bulk-header-buttons,.bulk-view-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bulk-view-controls{margin-left:auto;font-size:12px;color:var(--text-secondary)}
.bulk-view-controls label{display:flex;align-items:center;gap:5px;margin:0}.bulk-view-controls select{width:auto;max-width:190px;padding:6px 24px 6px 8px;border:1px solid var(--border-color);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);font:inherit}
#bulkShowKeys{width:14px;height:14px;margin:0;accent-color:var(--color-primary)}
.bulk-sheet:not(.show-field-keys) .bulk-table thead small,.bulk-sheet:not(.show-field-keys) .bulk-id-column{display:none}
#bulkSheet .bulk-table th,#bulkSheet .bulk-table td{height:var(--bulk-height)}
#bulkSheet .bulk-table .bulk-width-name{width:var(--bulk-name);min-width:var(--bulk-name);max-width:var(--bulk-name)}
#bulkSheet .bulk-table .bulk-width-text{width:var(--bulk-text);min-width:var(--bulk-text);max-width:var(--bulk-text)}
#bulkSheet .bulk-table .bulk-width-short{width:var(--bulk-short);min-width:var(--bulk-short);max-width:var(--bulk-short)}
#bulkSheet .bulk-table .bulk-width-date{width:var(--bulk-date);min-width:var(--bulk-date);max-width:var(--bulk-date)}
#bulkSheet .bulk-table .bulk-width-wide{width:var(--bulk-wide);min-width:var(--bulk-wide);max-width:var(--bulk-wide)}
#bulkSheet .bulk-table th:first-child{width:var(--bulk-row);min-width:var(--bulk-row);max-width:var(--bulk-row)}
#bulkSheet .bulk-table th:nth-child(2),#bulkSheet .bulk-table td:nth-child(2){left:var(--bulk-row)}
#bulkSheet .bulk-table :is(input,textarea){min-width:0;height:var(--bulk-height);padding:6px 8px}
#bulkSheet.is-compact .bulk-table{font-size:13px}
#bulkSheet.is-compact .bulk-table thead th{padding:8px;line-height:1.4}
#bulkSheet.is-compact .bulk-table tbody td:not(:has(input,textarea)){padding:7px 8px}
.bulk-choice-cell{position:relative}
#bulkSheet .bulk-choice-cell input{padding-right:28px}
#bulkSheet .bulk-choice-toggle{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:25px;height:28px;padding:0;border:1px solid var(--border-color);border-radius:4px;background:var(--bg-secondary);color:var(--color-primary);font-size:18px;line-height:1;cursor:pointer}
.bulk-choice-popup{position:absolute;box-sizing:border-box;z-index:20;max-height:280px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--border-color);border-radius:8px;padding:5px;background:var(--bg-secondary,#151c29);color:var(--text-primary);box-shadow:0 8px 30px #0005}
.bulk-choice-hint{font-size:12px;color:var(--text-secondary);margin:5px 7px 8px;line-height:1.5}
#bulkSheet .bulk-choice-option{display:block;width:100%;text-align:left;padding:9px 10px;margin:0;border:0;border-radius:4px;background:transparent;color:inherit;font-size:14px;cursor:pointer}
#bulkSheet .bulk-choice-option:hover,#bulkSheet .bulk-choice-option:focus-visible,#bulkSheet .bulk-choice-option[aria-selected=true]{background:color-mix(in srgb,var(--color-primary) 18%,transparent);outline:1px solid var(--color-primary);outline-offset:-1px}
@media(max-width:899px){.bulk-sheet.is-expanded{padding:10px}.bulk-view-controls{margin-left:0;width:100%}.bulk-view-controls select{max-width:155px}#bulkWindowSize{display:none}.bulk-help{max-height:3.3em;overflow-y:auto}.bulk-sheet.is-compact{--bulk-name:160px}.bulk-header h2{font-size:17px}}
