#tab-cases{--case-green:#153f35;--case-gold:#b98745;--case-line:#d8d0c2}
.case-admin-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px;padding:22px 24px;color:#fff;background:linear-gradient(120deg,#0e332b,#1d5547);border:1px solid rgba(185,135,69,.38);box-shadow:inset 0 1px rgba(255,255,255,.08),0 12px 30px rgba(21,49,41,.12)}
.case-admin-head h2{margin:3px 0 5px;font-size:28px}.case-admin-head p{margin:0;max-width:780px;color:rgba(255,255,255,.72);line-height:1.7}.case-admin-head .eyebrow{color:#e4bd7e;font-size:11px;letter-spacing:.16em}
.case-admin-actions,.case-media-actions,.case-editor-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px}.case-admin-actions{justify-content:flex-end}.case-admin-actions a{display:inline-flex;align-items:center;text-decoration:none}
.case-front-link{min-height:40px;padding:8px 15px;color:#173b33!important;background:linear-gradient(180deg,#f4f7f5,#dfe9e4);border:1px solid rgba(216,229,223,.78);border-radius:4px;box-shadow:inset 0 1px rgba(255,255,255,.9),0 4px 10px rgba(6,31,25,.16);font-weight:700;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
.case-front-link:hover,.case-front-link:focus-visible{color:#0d2f27!important;background:linear-gradient(180deg,#fff,#e8f0ec);box-shadow:inset 0 1px #fff,0 7px 14px rgba(6,31,25,.2);transform:translateY(-1px)}
.case-file-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 15px;color:#fff;background:linear-gradient(#24604f,#174539);border:1px solid #17483b;border-radius:4px;box-shadow:inset 0 1px rgba(255,255,255,.14),0 4px 10px rgba(15,54,44,.15);font-weight:700;cursor:pointer}
.case-file-button:hover{transform:translateY(-1px)}
.case-import-status{margin:0 0 16px;padding:14px 16px;background:#fff9ea;border:1px solid #e0c991;color:#5e4d2e;white-space:pre-line;line-height:1.65}
.case-import-status.is-error{background:#fff1f1;border-color:#dfb0b0;color:#7c2a2a}
.case-import-guide{margin:-3px 0 15px;padding:10px 13px;background:#fbfaf7;border:1px solid #e0d9cd;color:#59635f;font-size:12px}.case-import-guide summary{color:#31594f;font-weight:800;cursor:pointer}.case-import-guide p{margin:9px 0 0;line-height:1.65}.case-import-guide code{color:#765b34}
.case-admin-toolbar{display:grid;grid-template-columns:155px 155px 180px minmax(260px,1fr) auto;align-items:end;gap:12px;margin-bottom:10px;padding:15px 17px;background:#f4f0e8;border:1px solid var(--case-line)}
.case-admin-toolbar label{display:grid;gap:5px;color:#4e5753;font-size:12px;font-weight:700}.case-admin-toolbar select,.case-admin-toolbar input{height:42px}.case-admin-toolbar p{margin:0 0 10px;color:#52605b;white-space:nowrap}.case-admin-toolbar strong{color:var(--case-green);font-size:20px}
.case-status-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:16px}.case-status-summary button{display:flex;align-items:center;gap:10px;padding:10px 14px;color:#3c4d47;background:#fbfaf7;border:1px solid var(--case-line);box-shadow:none;text-align:left}.case-status-summary button:hover,.case-status-summary button.is-active{color:#fff;background:linear-gradient(135deg,#24584a,#153d33);border-color:#1f5043}.case-status-summary strong{font-size:20px}.case-status-summary span{font-size:12px;font-weight:700}
.case-admin-workspace{display:grid;grid-template-columns:minmax(255px,315px) minmax(0,1fr);gap:17px;align-items:start}
.case-admin-list-card,.case-editor{background:#fff;border:1px solid var(--case-line);box-shadow:0 8px 24px rgba(52,45,35,.06)}
.case-admin-list-card{position:sticky;top:12px;max-height:calc(100vh - 130px);overflow:auto;padding:10px}
.case-bulk-bar{position:sticky;z-index:2;top:-10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:-10px -10px 10px;padding:10px;background:#f2eee6;border-bottom:1px solid var(--case-line)}.case-bulk-bar label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700}.case-bulk-bar label input{width:auto}.case-bulk-bar>span{align-self:center;color:#68736f;font-size:11px}.case-bulk-bar button,.case-bulk-bar select{padding:7px 9px;font-size:11px;min-width:0}
.case-admin-list{display:grid;gap:7px}.case-list-row{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:stretch;background:#faf8f3;border:1px solid #e2ddd3;border-radius:4px}.case-list-row.is-selected{border-color:#b98745;box-shadow:0 0 0 2px rgba(185,135,69,.18)}.case-list-check{display:grid;place-items:center;border-right:1px solid #e2ddd3;cursor:pointer}.case-list-check input{width:auto}.case-list-item{width:100%;padding:8px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;border:0;text-align:left;color:#273631;background:transparent;border-radius:0;box-shadow:none}.case-list-item:hover,.case-list-item.is-active{color:#fff;background:linear-gradient(135deg,#24584a,#153d33);transform:none}.case-list-thumb{width:54px;height:54px;object-fit:cover;background:#dfd8cc;border:1px solid rgba(60,52,40,.12)}.case-list-copy{min-width:0}
.case-list-item strong,.case-list-item span,.case-list-item small{display:block}.case-list-item strong{font-size:14px;line-height:1.45}.case-list-item span{margin-top:5px;font-size:11px;opacity:.78}.case-list-item small{margin-top:7px;color:#a36f34;font-weight:700}.case-list-item:hover small,.case-list-item.is-active small{color:#f0ca8e}
.case-list-pagination{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid var(--case-line)}.case-list-pagination button{padding:7px 9px}.case-list-pagination span,.case-list-pagination label{color:#68736f;font-size:11px;white-space:nowrap}.case-list-pagination label{display:flex;align-items:center;gap:4px}.case-list-pagination select{height:32px;padding:4px}
.case-editor{padding:20px}.case-editor-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--case-line)}.case-editor-heading span{color:#807666;font-size:11px;letter-spacing:.12em}.case-editor-heading h3{margin:3px 0 0;font-size:23px}.case-editor-heading .case-status{padding:6px 10px;color:#fff;background:#746956;border-radius:99px;letter-spacing:.04em}.case-editor-heading .case-status.is-published{background:#27624f}
.case-quick-guide{display:flex;justify-content:space-between;gap:18px;margin:0 0 14px;padding:12px 14px;color:#24463d;background:#edf5f1;border:1px solid #cdded6;border-left:4px solid var(--case-green);line-height:1.55}.case-quick-guide span{color:#68736f;font-size:12px}.case-quick-guide b,.required-mark{color:#9b342e}
.case-step{margin:0 0 12px;padding:14px 16px;background:#fbfaf7;border:1px solid #e1dbcf}.case-step-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.case-step-title>span{display:grid;place-items:center;width:28px;height:28px;color:#fff;background:var(--case-green);border-radius:50%;font-weight:800}.case-step-title strong,.case-step-title small{display:block}.case-step-title strong{color:#23483e}.case-step-title small{margin-top:2px;color:#727b77;font-size:12px;font-weight:400}
.case-type-choices{display:grid;grid-template-columns:repeat(2,minmax(0,190px));gap:10px}.case-type-choices button{color:#315249;background:#fff;border:1px solid #bfcfc8;box-shadow:none}.case-type-choices button.is-active{color:#fff;background:linear-gradient(135deg,#24584a,#153d33);border-color:#17483b;box-shadow:0 5px 12px rgba(15,54,44,.16)}
.case-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.case-field-grid label,.case-copy-grid label{display:grid;gap:6px;color:#4b5652;font-size:12px;font-weight:700}.case-field-full{grid-column:1/-1}.case-field-grid input,.case-field-grid select,.case-copy-grid textarea{width:100%}.case-check{align-content:end;grid-template-columns:auto 1fr!important;align-items:center;min-height:42px}.case-check input{width:auto}
.case-media-editor{background:linear-gradient(145deg,#f2eee6,#faf8f3)}.case-media-progress{min-height:21px;margin:10px 0;color:#6f5d3e;font-size:12px}
.case-media-preview{min-height:150px;display:grid;place-items:center;overflow:hidden;background:#e8e2d8;border:1px solid #d6cdbf}.case-media-preview>img,.case-media-preview>video{display:block;width:100%;max-height:430px;object-fit:contain;background:#101b18}.case-media-preview p{color:#7d7c73}.case-video-ready{width:100%;margin:0;padding:8px 12px;color:#245446;background:#eaf4ef;text-align:center;font-size:12px}.case-gallery-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:9px;width:100%;padding:10px}.case-gallery-item{position:relative;min-width:0;background:#15221e}.case-gallery-item img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain}.case-gallery-item span{position:absolute;left:6px;bottom:6px;padding:3px 6px;color:#fff;background:rgba(13,34,28,.78);font-size:10px}.case-gallery-item button{position:absolute;right:5px;top:5px;width:25px;height:25px;padding:0;color:#fff;background:rgba(112,33,30,.9);border:0;border-radius:50%}
.case-copy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.case-copy-full{grid-column:1/-1}.case-editor-note{margin:16px 0 12px;padding:10px 12px;color:#6e6455;background:#f8f4eb;border-left:3px solid var(--case-gold);font-size:12px;line-height:1.65}
.case-optional-fields{margin:14px 0;padding:0;background:#fff;border:1px solid #ddd6ca}.case-optional-fields>summary,.case-system-fields>summary{padding:13px 15px;color:#31594f;font-weight:800;cursor:pointer}.case-optional-fields>summary span{float:right;color:#877455;font-size:11px}.case-optional-fields>.case-field-grid,.case-optional-fields>.case-copy-grid{padding:0 15px 15px}.case-system-fields{margin:0 15px 15px;background:#f7f4ed;border:1px solid #e0d8ca}.case-system-fields>.case-field-grid{padding:0 13px 13px}.case-system-fields small{color:#777;font-weight:400}
.case-editor-actions{padding-top:13px;border-top:1px solid var(--case-line)}
.case-category-dialog{width:min(720px,calc(100% - 32px));max-height:88vh;padding:0;border:0;box-shadow:0 24px 70px rgba(0,0,0,.25)}.case-category-dialog::backdrop{background:rgba(11,30,25,.5)}.case-category-dialog>div{padding:20px}.case-category-dialog header{display:flex;align-items:center;justify-content:space-between;gap:20px}.case-category-dialog h2{margin:0}.case-category-help{margin:8px 0 0;color:#66706c;font-size:12px}.case-category-dialog form{display:grid;grid-template-columns:1fr auto;gap:10px;margin:16px 0 10px}.case-category-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:9px}.case-category-tools strong{color:#274b41;font-size:13px}.case-category-tools input{width:min(300px,58%);height:38px}.case-category-list{display:grid;gap:7px;max-height:48vh;overflow:auto;padding:2px 6px 2px 2px;scrollbar-gutter:stable}.case-category-row{display:grid;grid-template-columns:minmax(170px,1fr) auto auto;align-items:center;gap:9px;padding:10px;background:#f6f2ea;border:1px solid #ded6ca;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}.case-category-row.is-highlighted{background:#fff8e9;border-color:#b98745;box-shadow:0 0 0 3px rgba(185,135,69,.2)}.case-category-row small{display:block;color:#777}.case-category-row button{padding:7px 9px}.case-category-row input{min-width:0;width:100%}.case-category-empty{margin:0;padding:22px;color:#69736f;background:#f8f6f1;text-align:center}

/* CASE1 V2.6: explicit frontend visibility and accessible category ordering. */
.case-category-dialog{width:min(940px,calc(100% - 32px))}.case-category-help{padding:10px 12px;background:#edf5f1;border-left:4px solid var(--case-green);line-height:1.65}.case-category-tools{display:grid;grid-template-columns:auto minmax(220px,1fr) auto}.case-category-tools input{justify-self:end;width:min(330px,100%)}.case-category-save-order{min-width:136px;color:#fff;background:linear-gradient(#27604f,#153f35);border-color:#153f35}.case-category-save-order:disabled{color:#69736f;background:#ebe8e1;border-color:#d8d2c7;box-shadow:none}.case-category-row{grid-template-columns:116px minmax(220px,1fr) 130px auto}.case-category-row.is-backoffice-only{background:#f2f0eb;border-style:dashed}.case-category-row.is-dragging{opacity:.48}.case-category-row.is-dragover{border-color:#b98745;box-shadow:0 0 0 3px rgba(185,135,69,.2)}.case-category-order{display:grid;grid-template-columns:1fr 34px 34px;align-items:center;gap:4px}.case-category-order button{height:34px;padding:0}.case-category-drag{display:grid;place-items:center;min-height:34px;color:#806a49;background:#fff;border:1px solid #d8d0c2;font-size:16px;font-weight:800;cursor:grab}.case-category-drag:active{cursor:grabbing}.case-category-visibility{display:flex;align-items:center;gap:7px;min-height:38px;padding:6px 9px;background:#fff;border:1px solid #d8d0c2;color:#315249;font-size:12px;font-weight:800;white-space:nowrap}.case-category-visibility input{width:auto}.case-category-row>button{min-height:38px}
.case-home-dialog{width:min(1080px,calc(100% - 28px));max-height:92vh;padding:0;border:0;box-shadow:0 24px 70px rgba(0,0,0,.3)}.case-home-dialog::backdrop{background:rgba(11,30,25,.58)}.case-home-dialog>div{padding:20px}.case-home-dialog header{display:flex;align-items:center;justify-content:space-between;gap:20px}.case-home-dialog h2,.case-home-dialog h3{margin:0}.case-home-help{margin:8px 0 12px;padding:10px 12px;color:#315249;background:#edf5f1;border-left:4px solid var(--case-green);font-size:12px;line-height:1.65}.case-home-status{min-height:22px;margin:0;color:#7a6340;font-size:12px}.case-home-settings,.case-home-add,.case-home-pool{margin-top:12px;padding:14px;background:#fbfaf7;border:1px solid var(--case-line)}.case-home-section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:11px}.case-home-section-title p{margin:0;color:#6d7773;font-size:12px}.case-home-settings-grid{display:grid;grid-template-columns:180px minmax(0,1fr) auto;align-items:end;gap:12px}.case-home-settings-grid label,.case-home-pool-controls label{display:grid;gap:5px;color:#4e5955;font-size:11px;font-weight:700}.case-home-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.case-home-add form{display:grid;grid-template-columns:minmax(240px,1fr) auto auto;gap:10px}.case-home-pool-list{display:grid;gap:8px;max-height:43vh;overflow:auto;scrollbar-gutter:stable}.case-home-pool-row{display:grid;grid-template-columns:190px minmax(160px,1fr) minmax(360px,auto);align-items:center;gap:12px;padding:9px;background:#f5f1e9;border:1px solid #dfd6c9}.case-home-pool-row>img{display:block;width:190px;aspect-ratio:16/9;object-fit:cover;background:#1a2823}.case-home-pool-copy{min-width:0}.case-home-pool-copy strong,.case-home-pool-copy span,.case-home-pool-copy small{display:block}.case-home-pool-copy strong{color:#23483e}.case-home-pool-copy span{margin-top:5px;color:#6a736f;font-size:12px}.case-home-pool-copy small{margin-top:4px;color:#907347;font-size:10px}.case-home-pool-controls{display:grid;grid-template-columns:76px 66px auto auto auto;align-items:end;gap:7px}.case-home-pool-controls input[type="number"]{width:76px;height:37px}.case-home-enabled{display:flex!important;align-items:center;gap:5px;height:37px}.case-home-enabled input{width:auto}.case-home-replace{min-height:37px;padding:6px 9px;font-size:11px}.case-home-pool-controls button{padding:7px 9px}.case-home-empty{margin:0;padding:24px;color:#6a736f;background:#f6f3ed;text-align:center}
.case-home-slots{grid-template-columns:repeat(4,minmax(150px,1fr))}.case-home-save-layout{min-height:42px;color:#fff;background:linear-gradient(#265f50,#153f35);border-color:#153f35;box-shadow:0 5px 12px rgba(21,63,53,.18)}.case-home-add form{grid-template-columns:130px minmax(220px,1fr) auto auto auto}.case-home-pick{color:#624719;background:#fff9ec;border:1px solid #bb8b47;box-shadow:0 3px 8px rgba(120,82,29,.1)}.case-home-pool-row{grid-template-columns:190px minmax(170px,1fr) minmax(410px,auto);padding:10px}.case-home-pool-row[data-case-type="video"]{background:#f5f0f1;border-left:4px solid #85243b}.case-home-pool-row>img{cursor:zoom-in}.case-home-pool-row>img:focus{outline:3px solid rgba(185,135,69,.45);outline-offset:2px}.case-home-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.case-home-badges b{padding:3px 6px;color:#fff;background:#496b62;border-radius:2px;font-size:10px}.case-home-badges b.is-video{background:#8d2941}.case-home-badges b.is-slot{color:#654719;background:#f2dfb9}.case-home-pool-controls{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end}.case-home-pool-controls input[type="number"]{height:39px}.case-home-enabled{height:39px}.case-home-replace{min-height:39px;padding:7px 11px;color:#fff;background:linear-gradient(#ba8845,#93652d);border-color:#8c602b}.case-home-save{min-height:39px;padding:7px 12px!important;color:#fff;background:linear-gradient(#27604f,#153f35);border:1px solid #153f35}.case-home-remove{min-height:39px;padding:7px 12px!important;color:#85243b;background:#fff;border:1px solid #9d4054;box-shadow:none}.case-home-auto-cover{min-height:39px;padding:7px 10px!important;color:#6e4a16;background:#fff9ea;border:1px solid #b98947;box-shadow:none}.case-home-pool-controls button:hover,.case-home-replace:hover{filter:brightness(1.05);transform:translateY(-1px)}
.case-picker{width:min(920px,calc(100% - 28px));max-height:86vh;padding:0;border:0;box-shadow:0 24px 70px rgba(0,0,0,.28)}.case-picker::backdrop{background:rgba(11,30,25,.55)}.case-picker>div{padding:18px}.case-picker header{display:flex;align-items:center;justify-content:space-between;gap:18px}.case-picker header h2{margin:0}.case-picker-search{width:100%;margin:12px 0}.case-picker-status{min-height:20px;color:#68736f;font-size:12px}.case-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-height:52vh;overflow:auto}.case-picker-card{position:relative;display:grid;gap:6px;padding:8px;color:#263b35;background:#f7f4ed;border:1px solid #ddd6c9;text-align:left}.case-picker-card.is-selected{outline:3px solid #b98745;background:#fff9ec}.case-picker-card img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#17231f}.case-picker-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.case-picker-card small{color:#6f7774}.case-picker-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}.case-picker-pagination{display:flex;align-items:center;gap:8px}
body.case-layout .shell{max-width:1580px}
.case-picker-filters{display:flex;flex-wrap:wrap;gap:9px;align-items:center}.case-picker-filters select{width:auto;min-width:165px;max-width:100%}.case-picker-filters label{display:inline-flex;align-items:center;gap:6px;font-size:13px}.case-picker-filters input{width:auto}.case-picker-card small{white-space:normal;overflow-wrap:anywhere}.case-video-batch{width:min(960px,calc(100% - 24px));max-height:90vh;overflow:auto;border:0;padding:18px}.case-video-batch::backdrop{background:rgba(11,30,25,.55)}.case-video-batch header{display:flex;align-items:center;justify-content:space-between}.case-video-batch-list{max-height:55vh;overflow:auto;display:grid;gap:8px;margin:14px 0}.case-video-batch-row{display:grid;grid-template-columns:115px minmax(0,1fr);gap:12px;padding:10px;border:1px solid #ddd6c9;background:#faf9f6}.case-video-batch-row img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#192620}.case-video-batch-row>div{display:grid;gap:5px}.case-video-batch-row input,.case-video-batch-row select,.case-video-batch>div>label select{display:block;width:100%}.case-video-batch-result{max-height:150px;overflow:auto;font-size:13px}.case-video-batch-result p{margin:5px 0;overflow-wrap:anywhere}@media(max-width:640px){.case-picker-filters select{width:100%}.case-video-batch-row{grid-template-columns:70px minmax(0,1fr)}}
@media(max-width:980px){.case-admin-head{align-items:flex-start;flex-direction:column}.case-admin-actions{justify-content:flex-start}.case-admin-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.case-search{grid-column:1/-1}.case-admin-workspace{grid-template-columns:1fr}.case-admin-list-card{position:static;max-height:420px}.case-admin-list{grid-template-columns:repeat(2,minmax(0,1fr))}.case-home-settings-grid{grid-template-columns:1fr}.case-home-slots{grid-template-columns:repeat(2,minmax(0,1fr))}.case-home-add form{grid-template-columns:140px minmax(220px,1fr) auto}.case-home-upload,.case-home-pick{grid-row:2}.case-home-pick{grid-column:2}.case-home-add form>button:last-child{grid-column:3;grid-row:2}.case-home-pool-row{grid-template-columns:150px 1fr}.case-home-pool-row>img{width:150px}.case-home-pool-controls{grid-column:1/-1}.case-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.case-admin-head{padding:18px}.case-admin-toolbar,.case-field-grid,.case-copy-grid{grid-template-columns:1fr}.case-admin-toolbar .case-search,.case-field-full,.case-copy-full{grid-column:auto}.case-admin-list{grid-template-columns:1fr}.case-editor{padding:14px}.case-category-dialog form,.case-category-row{grid-template-columns:1fr}.case-media-actions,.case-editor-actions{align-items:stretch;flex-direction:column}.case-media-actions>*{width:100%}.case-quick-guide{flex-direction:column}.case-type-choices{grid-template-columns:1fr}.case-home-section-title{align-items:flex-start;flex-direction:column}.case-home-slots,.case-home-add form,.case-home-pool-row{grid-template-columns:1fr}.case-home-upload,.case-home-pick,.case-home-add form>button:last-child{grid-column:auto;grid-row:auto}.case-home-pool-row>img{width:100%}.case-home-pool-controls{grid-column:auto;align-items:stretch;flex-direction:column}.case-home-pool-controls label,.case-home-pool-controls button{width:100%}.case-home-pool-controls input[type="number"]{width:100%}.case-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.case-picker-footer{align-items:stretch;flex-direction:column}}
@media(max-width:640px){.case-category-tools{grid-template-columns:1fr}.case-category-tools input{justify-self:stretch;width:100%}.case-category-save-order{width:100%}.case-category-row{grid-template-columns:1fr}.case-category-order{grid-template-columns:1fr 42px 42px}.case-category-visibility{justify-content:center}.case-category-row>button{width:100%}}

/* CASE1 V2.8: safe category deletion with explicit migration. */
.case-category-row{grid-template-columns:116px minmax(220px,1fr) 130px auto auto}
.case-category-delete{color:#8b2838;background:#fff5f5;border:1px solid #b85b68;box-shadow:none}
.case-category-delete:hover,.case-category-delete:focus-visible{color:#fff;background:#8b2838;border-color:#6f1f2d}
.case-category-delete-dialog{width:min(560px,calc(100% - 32px));padding:0;border:0;box-shadow:0 24px 70px rgba(0,0,0,.3)}
.case-category-delete-dialog::backdrop{background:rgba(11,30,25,.62)}
.case-category-delete-dialog>div{padding:20px}.case-category-delete-dialog header{display:flex;align-items:center;justify-content:space-between;gap:18px}.case-category-delete-dialog h2{margin:0}
.case-category-delete-warning{margin:14px 0;padding:13px 14px;color:#5f392c;background:#fff3e8;border-left:4px solid #a84a42;font-size:13px;line-height:1.75}
.case-category-delete-target{display:grid;gap:7px;color:#354d46;font-size:12px;font-weight:800}.case-category-delete-target select{width:100%;height:42px}
.case-category-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.case-category-delete-confirm{color:#fff;background:linear-gradient(#a3404b,#762632);border-color:#6e202c}.case-category-delete-confirm:disabled{color:#887e78;background:#e9e4df;border-color:#d5cec8}.case-category-delete-blocked{color:#8b2838;font-size:12px;font-weight:700}
@media(max-width:640px){.case-category-row{grid-template-columns:1fr}.case-category-delete-actions{display:grid;grid-template-columns:1fr 1fr}.case-category-delete-actions button{width:100%}}

/* CASE1 V3.6: case format is the parent of each service category. */
.case-category-dialog form{grid-template-columns:minmax(132px,180px) minmax(180px,1fr) auto}
.case-category-row select{max-width:100%;min-height:36px;margin-bottom:5px}
.case-category-row select:disabled{opacity:.85;color:#315249;background:#e9f0ec}
@media(max-width:640px){.case-category-dialog form{grid-template-columns:1fr}}

/* CASE1 V3.8: explicit batch category tools and per-video validation. */
.case-video-batch-bulk{display:grid;gap:8px;margin-top:13px;padding:12px;background:#eef4f0;border:1px solid #c9dcd0}
.case-video-batch-bulk label{display:grid;gap:5px;font-size:13px;font-weight:700;color:#24473a}
.case-video-batch-bulk select{width:100%;min-height:40px}
.case-video-batch-bulk-actions{display:flex;flex-wrap:wrap;gap:8px}
.case-video-batch-bulk-actions button{min-height:38px}
.case-video-batch-bulk-status{margin:0;color:#476256;font-size:12px}
.case-video-batch-row.has-error{border-color:#b54848;background:#fff5f3}
.case-video-batch-row-error:not([hidden]){display:block;color:#9b302e;font-weight:700}
@media(max-width:640px){.case-video-batch-bulk-actions button{flex:1 1 100%}}

/* Case relations: previewable selection in both image and video editors. */
.case-relation-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0 2px}
.case-relation-actions>div{display:grid;align-content:start;gap:9px;min-width:0;padding:16px;border:1px solid #d9e5de;border-radius:13px;background:#f8faf8}
.case-relation-actions>div>button{justify-self:start}
.case-relation-selected{display:grid;gap:7px;min-width:0}.case-relation-selected p{margin:0;color:#718078}
.case-relation-selected-row{display:flex;align-items:center;gap:10px;min-width:0;padding:7px;border:1px solid #e0e8e3;border-radius:9px;background:#fff}
.case-relation-selected-row img{width:42px;height:42px;object-fit:cover;border-radius:6px}
.case-relation-selected-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.case-relation-selected-row .case-relation-source{display:block;overflow:hidden;color:#60786d;font-size:11px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.case-relation-selected .case-relation-warning{color:#a14a35}
.case-relation-choice:has(input:disabled){cursor:default;background:#f5f7f5}
.case-relation-picker{width:min(900px,94vw);max-height:88vh;padding:22px;border:1px solid #cfddd4;border-radius:16px;color:#173d32}
.case-relation-picker::backdrop{background:rgba(8,31,25,.55)}
.case-relation-picker header{display:flex;justify-content:space-between;align-items:center;gap:10px}
.case-relation-picker h2{margin:0;font-size:23px}.case-relation-picker>input{width:100%;margin:14px 0 6px;padding:12px;border:1px solid #cddbd3;border-radius:10px}
.case-relation-hint{color:#65756d}.case-relation-tray{display:grid;gap:6px;margin:12px 0;padding:12px;border-radius:10px;background:#f1f6f2}
.case-relation-tray-row{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.case-relation-tray-row span{flex:1;min-width:170px}
.case-relation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:42vh;overflow:auto;margin:12px 0;padding:2px}
.case-relation-choice{display:flex;align-items:center;gap:10px;min-width:0;padding:9px;border:1px solid #dbe5df;border-radius:10px;background:white;cursor:pointer}
.case-relation-choice:has(input:checked){border-color:#1e5c49;background:#f1f8f3}.case-relation-choice img{width:68px;height:58px;object-fit:cover;border-radius:7px}
.case-relation-choice span{display:grid;gap:3px;min-width:0}.case-relation-choice strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.case-relation-choice small{color:#65766c}
@media(max-width:700px){.case-relation-actions,.case-relation-grid{grid-template-columns:1fr}.case-relation-picker{padding:15px}}

/* V4.7: shared category + search selection; preserve selected order. */
.case-relation-filters{display:flex;gap:10px;flex-wrap:wrap}.case-relation-filters input{flex:1 1 240px;min-width:0}.case-relation-filters select{flex:0 1 220px;min-height:42px;padding:8px;border:1px solid #c8d8d1;border-radius:8px;background:#fff;color:#173e32}.case-relation-choice{display:grid;grid-template-columns:22px 68px minmax(0,1fr);gap:10px;align-items:center}.case-relation-choice input{width:18px!important;height:18px;min-width:18px;margin:0}.case-relation-choice>span{min-width:0}.case-relation-choice strong{white-space:normal;line-height:1.4}.case-relation-choice small{white-space:normal;line-height:1.4}@media(max-width:600px){.case-relation-filters select{flex:1 1 100%}}

.case-relation-filters input{padding:10px 12px;border:1px solid #cddbd3;border-radius:8px}.case-relation-no-image{width:68px;height:58px;display:grid;place-items:center;background:#edf3ef;border-radius:7px;font-size:12px}
