.bulk-workspace { display:flex; flex-direction:column; gap:22px; }
.bulk-workspace > .page-header { margin-bottom:0; padding-bottom:0; }
.bulk-stage { overflow:hidden; border-radius:18px; }
.bulk-stage[hidden],.bulk-workspace [hidden] { display:none !important; }
.bulk-stage__head { display:flex; gap:13px; align-items:flex-start; padding:20px 24px; border-bottom:1px solid #dce5eb; background:#fbfdfe; }
.bulk-stage__head h2,.bulk-stage__head p { margin:0; }
.bulk-stage__head p { margin-top:4px; line-height:1.6; }
.bulk-stage__number { flex:none; display:grid; place-items:center; width:30px; height:30px; background:#e2f2f5; color:#00687e; border-radius:9px; font-weight:700; }
.bulk-stage__body { display:grid; gap:18px; padding:22px 24px; min-width:0; }
.bulk-fieldset { border:0; margin:0; }
.bulk-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.bulk-action { position:relative; display:flex; align-items:flex-start; gap:11px; min-width:0; padding:16px; border:1px solid #cfdde3; border-radius:14px; color:var(--md-sys-color-on-surface); background:white; text-align:left; cursor:pointer; font:inherit; }
.bulk-action:hover { border-color:#6e9eab; background:#f7fbfc; }
.bulk-action.is-selected { border-color:#007d93; box-shadow:inset 0 0 0 1px #007d93; background:#eef9fb; }
.bulk-action__icon { flex:none; color:#006d83; margin-top:2px; }
.bulk-action__text { display:grid; gap:7px; padding-right:8px; }
.bulk-action__text .md-body-small { line-height:1.55; }
.bulk-action__check { display:none; position:absolute; right:9px; top:9px; width:15px; height:15px; color:#00788d; }
.bulk-action.is-selected .bulk-action__check { display:block; }
.bulk-fieldset:disabled .bulk-action { cursor:default; opacity:.66; }
.bulk-operation-options { display:grid; gap:12px; padding:18px; background:#f7fafb; border:1px solid #dae5e9; border-radius:14px; }
.bulk-operation-options p { margin:0; line-height:1.6; }
.bulk-field { display:grid; gap:8px; min-width:0; }
.bulk-select,.bulk-search { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #b9ccd5; border-radius:10px; background:#fff; color:var(--md-sys-color-on-surface); font:inherit; font-size:14px; }
.bulk-select:focus-visible,.bulk-search:focus-visible,.bulk-workspace button:focus-visible { outline:2px solid #00758a; outline-offset:3px; }
.bulk-select:disabled { color:#6f828d; background:#eef3f5; }
.bulk-layout-fields { display:grid; grid-template-columns:2fr 1fr 2fr; gap:14px; }
.bulk-info { display:flex; gap:9px; align-items:flex-start; padding:12px 14px; border:1px solid #cce0e7; border-radius:10px; color:#335965; background:#eef8fa; line-height:1.65; }
.bulk-info .icon { flex:none; width:18px; height:18px; margin-top:2px; }
.bulk-target-toolbar { display:flex; gap:16px; align-items:center; }
.bulk-target-toolbar .bulk-search { flex:1; }
.bulk-check { display:flex; align-items:center; gap:10px; cursor:pointer; min-width:0; }
.bulk-check input,.bulk-target > input { accent-color:#00788d; width:18px; height:18px; flex:none; margin:0; cursor:pointer; }
.bulk-check input:focus-visible,.bulk-target > input:focus-visible { outline:2px solid #00758a; outline-offset:3px; }
.bulk-check > span { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.bulk-check strong { font-size:14px; }
.bulk-selected-only { white-space:nowrap; font-size:13px; }
.bulk-target-selection { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-bottom:13px; border-bottom:1px solid #e2e9ed; }
.bulk-target-selection .bulk-check { font-size:13px; font-weight:600; }
.bulk-targets { display:grid; grid-template-columns:minmax(0,1fr); grid-auto-rows:max-content; align-content:start; gap:14px; max-height:640px; min-width:0; overflow-y:auto; scrollbar-width:thin; padding:2px; overscroll-behavior:contain; }
/* Intrinsic rows must overflow the scroll area, not shrink clipped branch cards into it. */
.bulk-branch { min-width:0; border:1px solid #d3e0e6; border-radius:14px; background:#fff; overflow:hidden; }
.bulk-branch__head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 16px; background:#f6f9fb; border-bottom:1px solid #e0e9ed; }
.bulk-branch__selected { flex:none; padding:5px 8px; border-radius:7px; color:#38606c; background:#e7f1f4; }
.bulk-branch__groups { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:12px; }
.bulk-target { display:flex; align-items:flex-start; gap:10px; position:relative; padding:14px 12px; border:1px solid #dbe5ea; border-radius:10px; cursor:pointer; min-width:0; }
.bulk-target > input { margin-top:2px; }
.bulk-target.is-selected { background:#edf8fa; border-color:#76adb9; }
.bulk-target__text { display:grid; gap:6px; min-width:0; padding-right:13px; }
.bulk-target__text strong { font-size:13px; overflow-wrap:anywhere; }
.bulk-target__text > span { line-height:1.55; overflow-wrap:anywhere; }
.bulk-target__mark { display:none; width:14px; height:14px; position:absolute; right:8px; top:8px; color:#00788d; }
.bulk-target.is-selected .bulk-target__mark { display:block; }
.bulk-selection-summary { display:grid; gap:7px; padding:14px 16px; border:1px solid #c7dfe5; border-radius:12px; background:#f0f8fa; }
.bulk-selection-summary p { margin:0; }
.bulk-selection-count { color:#14576a; }
.bulk-hidden-selection { color:#775b24; line-height:1.6; }
.bulk-empty { display:grid; justify-items:center; gap:10px; padding:28px 20px; text-align:center; }
.bulk-empty > p { margin:0; }
.bulk-empty > .icon { width:30px; height:30px; color:#839daa; }
.bulk-review-start,.bulk-review__footer,.bulk-results-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.bulk-review-start p,.bulk-review__footer p,.bulk-results-head p { margin:0; line-height:1.6; }
.bulk-review-start .md-button,.bulk-review__footer .md-button { flex:none; }
.bulk-review { display:grid; gap:16px; padding:18px; border:1px solid #c6dfe5; border-radius:14px; background:#f7fbfc; }
.bulk-review__heading { display:flex; gap:12px; align-items:flex-start; }
.bulk-review__heading > .icon { color:#007d90; flex:none; margin-top:2px; }
.bulk-review__heading h3,.bulk-review__heading p { margin:0; }
.bulk-review__heading p { margin-top:5px; line-height:1.6; }
.bulk-review__targets { padding:0; margin:0; list-style:none; max-height:360px; overflow:auto; border:1px solid #d4e3e8; border-radius:10px; background:#fff; }
.bulk-review__targets > li { display:flex; align-items:flex-start; gap:10px; padding:13px 14px; border-bottom:1px solid #e2eaed; }
.bulk-review__targets > li:last-child { border-bottom:0; }
.bulk-review__targets > li > div { min-width:0; overflow-wrap:anywhere; }
.bulk-review__targets > li > .icon { color:#19836f; flex:none; margin-top:2px; }
.bulk-review__targets > li.is-blocked { background:#fff7f4; }
.bulk-review__targets > li.is-blocked > .icon { color:#b63b2a; }
.bulk-review__targets p { margin:5px 0 0; line-height:1.6; overflow-wrap:anywhere; }
.bulk-error { color:var(--md-sys-color-error); }
.bulk-blocked-note { display:grid; justify-items:start; gap:10px; color:#8d352a; }
.bulk-blocked-note p { margin:0; line-height:1.6; }
.bulk-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0; margin:0; list-style:none; }
.bulk-result { min-width:0; padding:16px; border:1px solid #d5e1e7; border-radius:12px; background:#fbfdfe; }
.bulk-result[data-status="success"] { border-color:#b7d8ca; background:#f5fbf7; }
.bulk-result[data-status="failed"] { border-color:#e7c5bf; background:#fff8f6; }
.bulk-result[data-status="preparing"],.bulk-result[data-status="sent"],.bulk-result[data-status="assigned"] { border-color:#bedbe5; background:#f4fafc; }
.bulk-result__head { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.bulk-result__head strong { overflow-wrap:anywhere; }
.bulk-result__status { border-radius:6px; padding:4px 7px; background:#e9f0f3; color:#476271; }
.bulk-result[data-status="success"] .bulk-result__status { color:#247454; background:#e1f1e7; }
.bulk-result[data-status="failed"] .bulk-result__status { color:#a3382a; background:#fbe7e0; }
.bulk-result > p { margin:10px 0 0; line-height:1.65; overflow-wrap:anywhere; }
.bulk-result__devices { margin-top:12px; border-top:1px solid #dce6ea; padding-top:10px; }
.bulk-result__devices summary { cursor:pointer; color:#426575; }
.bulk-result__devices ul { display:grid; gap:7px; margin:10px 0 0; padding-left:18px; }
.bulk-load-notice { margin:0; }
@media (max-width:1199px) { .bulk-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } .bulk-branch__groups { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .bulk-workspace { gap:16px; } .bulk-stage__head,.bulk-stage__body { padding:17px; } .bulk-layout-fields { grid-template-columns:1fr; } .bulk-target-toolbar,.bulk-review-start,.bulk-review__footer,.bulk-results-head { align-items:stretch; flex-direction:column; } .bulk-review-start .md-button,.bulk-review__footer .md-button { width:100%; } .bulk-results { grid-template-columns:1fr; } .bulk-targets { max-height:580px; } .bulk-operation-options,.bulk-review { padding:14px; } }
@media (max-width:479px) { .bulk-actions,.bulk-branch__groups { grid-template-columns:1fr; } .bulk-action { padding:14px; } .bulk-target-selection { align-items:flex-start; flex-direction:column; gap:7px; } .bulk-branch__head { padding:12px; } .bulk-branch__selected { font-size:10px; } .bulk-workspace .page-header__actions { width:100%; } .bulk-workspace .page-header__actions .md-button { width:100%; } }
/* This page already tracks every target inline; floating duplicate cards cover its controls. */
body:has(.bulk-workspace) .command-deck .command-card { display: none; }
