.detail-actions{display:flex;gap:8px;margin-left:auto;align-items:center}
.login-view{position:fixed;inset:0;z-index:50;background:#f6f7fb;display:grid;place-items:center;padding:24px}
.login-card{width:min(390px,100%);background:#fff;border:1px solid #ebeaf2;border-radius:18px;padding:34px;box-shadow:0 20px 60px rgba(37,40,76,.1);text-align:center}
.login-card .brand-mark{margin:0 auto 15px;width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#ffb36a,#ed625d);color:#fff;font-weight:800;font-size:20px}
.login-card h1{font-size:21px;margin:0 0 7px;color:#292d3d}.login-card>p{margin:0 0 26px;color:#969baa;font-size:12px}
.login-card form{display:grid;gap:15px;text-align:left}.login-card label{display:grid;gap:7px;font-size:12px;color:#656b7c}.login-card input{height:42px;border:1px solid #e5e6ee;border-radius:8px;padding:0 12px;outline:none;font-size:14px}.login-card input:focus{border-color:#8e80ef;box-shadow:0 0 0 3px rgba(107,87,232,.1)}.login-error{min-height:18px;color:#d45d65;font-size:12px}.login-card .primary-button{width:100%;height:42px}
.current-user{color:#777d90;font-size:11px;white-space:nowrap}
.media-player{display:grid;gap:9px}.media-player video{display:block;width:100%;max-height:420px;background:#191a26;border-radius:10px}.media-actions{display:flex;justify-content:space-between;align-items:center;color:#9a9eac;font-size:11px}.media-empty{padding:26px;border:1px dashed #d9d9e7;border-radius:9px;color:#999eae;text-align:center;font-size:12px}
.import-preview{margin-top:18px;padding-top:17px;border-top:1px solid #ececf3}.import-preview-head{display:flex;justify-content:space-between;gap:16px;align-items:center;color:#878c9c;font-size:12px}.import-preview-head strong{color:#343849;font-size:13px}.mapping-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:15px}.mapping-field{display:grid;gap:6px;color:#777d8e;font-size:11px}.mapping-field select{height:34px;border:1px solid #e4e5ed;border-radius:7px;background:#fff;padding:0 8px;color:#3e4353}.import-sample{margin-top:16px}.sample-caption{margin-bottom:7px;color:#777d8e;font-size:11px}.sample-scroll{overflow:auto;border:1px solid #ececf2;border-radius:8px}.sample-scroll table{border-collapse:collapse;min-width:760px;width:100%;font-size:11px}.sample-scroll th,.sample-scroll td{padding:9px 10px;border-bottom:1px solid #f0f0f5;text-align:left;white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}.sample-scroll th{background:#fafafd;color:#777d8e;font-weight:500}.import-preview-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.dictionary-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.dictionary-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;min-height:28px}.dictionary-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:7px;background:#f2f0fc;color:#6152ba;font-size:11px}.dictionary-chip button{border:0;background:transparent;color:#9a91d0;cursor:pointer;padding:0 2px}.dictionary-add{display:flex;gap:8px;margin-top:11px}.dictionary-add input{height:32px;min-width:0;flex:1;border:1px solid #e4e5ed;border-radius:7px;padding:0 9px}.dictionary-empty{color:#a2a5b0;font-size:11px}@media(max-width:900px){.mapping-grid,.dictionary-columns{grid-template-columns:1fr 1fr}}@media(max-width:600px){.mapping-grid,.dictionary-columns{grid-template-columns:1fr}.import-preview-head{align-items:flex-start;flex-direction:column}}
.view-switcher{display:flex;align-items:center;gap:3px;padding:3px;background:#f5f4fb;border:1px solid #ebe9f4;border-radius:9px}
.view-button{width:31px;height:30px;border:0;border-radius:6px;background:transparent;color:#9296a8;cursor:pointer;font-size:16px}
.view-button:hover,.view-button.active{background:#fff;color:#6653d8;box-shadow:0 2px 7px rgba(52,45,115,.09)}
.comfortable-table{background:#fff}
.comfortable-table table{min-width:980px}
.comfortable-table th,.comfortable-table td{padding:13px 12px;vertical-align:middle}
.comfortable-table tbody tr{height:82px;transition:background .15s}
.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#fbfaff}
.comfortable-table .check-col{padding-left:24px;width:44px}
.index-col{width:48px;color:#a3a7b5!important;text-align:center!important}
.case-main-col{min-width:270px;width:31%}
.comfortable-case-cell{display:flex;align-items:center;gap:12px;width:100%;padding:0;border:0;background:transparent;text-align:left;cursor:pointer}
.comfortable-case-copy{display:grid;gap:7px;min-width:0}
.comfortable-case-copy strong{font-size:13px;color:#303548;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}
.comfortable-case-copy small{font-size:11px;color:#9a9eac;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}
.comfortable-table table{min-width:1240px}
.comfortable-table .media-col{width:76px;min-width:76px}
.comfortable-table .title-col{min-width:260px;max-width:340px}
.comfortable-table .topic-col{min-width:220px;max-width:290px}
.comfortable-table td.title-col,.comfortable-table td.topic-col{vertical-align:middle}
.comfortable-table .title-link{display:block;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.comfortable-table .topic-line{max-width:270px;-webkit-line-clamp:3}
.wide-table .title-col{min-width:280px;max-width:360px}
.wide-table .topic-col{min-width:220px;max-width:280px}
.card-field{display:grid;gap:5px;margin-top:11px}
.card-field>span,.compact-label{color:#9a9eac;font-size:10px;font-weight:700;letter-spacing:.2px}
.card-title-field h3{margin:0;line-height:1.5}
.card-topic-field .topic-line{max-width:none}
.case-card-foot{justify-content:flex-end}
.compact-main{display:grid;gap:5px;min-width:220px}
.compact-topic .topic-line{max-width:240px;-webkit-line-clamp:2}
.video-preview{position:relative;display:inline-grid;place-items:center;flex:0 0 43px;width:43px;height:56px;border-radius:8px;background:linear-gradient(135deg,#34395f,#b25d78);overflow:hidden;color:#fff}
.video-preview img{width:100%;height:100%;object-fit:cover}
.video-badge{position:absolute;right:4px;bottom:4px;width:15px;height:15px;border-radius:50%;display:grid;place-items:center;background:rgba(35,31,65,.78);font-size:8px;color:#fff}
.video-placeholder{display:inline-grid;place-items:center;width:43px;height:56px;border-radius:8px;background:linear-gradient(135deg,#34395f,#b25d78);color:#fff;font-size:10px;flex:0 0 43px}
.soft-label,.review-pill{display:inline-block;padding:5px 8px;border-radius:6px;background:#f5f5f8;color:#74798a;font-size:11px;line-height:1.1}
.review-pill{background:#f8f4ff;color:#806bc8}
.wide-table{min-height:390px}
.wide-table table{min-width:1700px}
.wide-table th,.wide-table td{white-space:nowrap}
.wide-table .long-cell{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cell-link{border:0;background:transparent;padding:0;text-align:left;color:#454b5c;cursor:pointer}
.cell-link:hover,.row-action:hover{color:#5a47d0;text-decoration:underline}
.title-link{font-weight:700;color:#303548;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.media-cell{display:flex;align-items:center;gap:8px;border:0;background:transparent;cursor:pointer;color:#5b6172;max-width:170px;text-align:left}
.media-cell .video-preview,.media-cell .video-placeholder{width:34px;height:44px;flex-basis:34px;font-size:9px}
.media-cell .video-badge{width:13px;height:13px;font-size:7px}
.case-grid{padding:22px;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.case-card{border:1px solid #ececf3;border-radius:12px;overflow:hidden;background:#fff;cursor:pointer;transition:.18s}
.case-card:hover{border-color:#d9d3fa;box-shadow:0 10px 24px rgba(58,48,120,.08);transform:translateY(-1px)}
.case-card-media{height:136px;background:#f0eff6;position:relative;display:grid;place-items:center}
.case-card-media .video-preview,.case-card-media .video-placeholder{width:100%;height:100%;border-radius:0;background:linear-gradient(135deg,#373a61,#b55c79);font-size:12px}
.case-card-media .video-badge{width:28px;height:28px;font-size:12px;right:12px;bottom:12px}
.card-check{position:absolute;left:12px;top:12px;background:rgba(255,255,255,.9);border-radius:5px;padding:3px}
.case-card-body{padding:15px 16px 14px;display:grid;gap:10px}
.case-card-top,.case-card-foot,.case-card-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#9a9eac;font-size:11px}
.case-card h3{font-size:14px;margin:0;color:#303548;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.case-card p{font-size:12px;color:#757b8b;line-height:1.7;margin:0;min-height:40px}
.case-card-meta span{padding:4px 7px;background:#f6f5fa;border-radius:5px;color:#74798a}
.case-card-foot{border-top:1px solid #f0f0f5;padding-top:10px}
.recycle-list{display:grid;gap:10px}.recycle-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 17px;border:1px solid #ececf3;border-radius:10px;background:#fff}.recycle-row strong{font-size:13px;color:#353949}.recycle-row p{margin:6px 0 0;color:#969baa;font-size:11px}.recycle-actions{display:flex;gap:8px;flex-shrink:0}@media(max-width:700px){.recycle-row{align-items:flex-start;flex-direction:column}.recycle-actions{width:100%}}
.recycle-select{display:flex;align-items:center;gap:7px;flex:0 0 auto;color:#7d8799;font-size:11px}.recycle-row.is-selected{border-color:#a9b9e8;background:#f7f9ff}.select-all-control{display:inline-flex;align-items:center;gap:6px;color:#6f7c93;font-size:11px;white-space:nowrap}
.user-create-form{display:grid;grid-template-columns:1.1fr 1.1fr .8fr 1.1fr auto;gap:9px;align-items:center}.user-create-form input,.user-create-form select,.user-row input,.user-row select{height:34px;min-width:0;border:1px solid #e1e6f0;border-radius:8px;background:#fff;padding:0 9px;color:#39465d;font-size:12px}.users-list{display:grid;gap:9px;margin-top:15px}.user-row{display:grid;grid-template-columns:minmax(130px,1fr) 1fr .8fr auto 1.1fr auto;gap:9px;align-items:center;padding:11px 12px;border:1px solid #e3e8f0;border-radius:10px;background:#fff}.user-row-main{display:grid;gap:3px}.user-row-main strong{color:#334563;font-size:12px}.user-row-main small{color:#98a4b5;font-size:10px}.user-enabled{display:inline-flex;align-items:center;gap:5px;color:#6e7b90;font-size:11px;white-space:nowrap}@media(max-width:900px){.user-create-form,.user-row{grid-template-columns:1fr 1fr}.user-create-form button,.user-row button{width:max-content}}
.detail-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:15px}.detail-title{min-width:0;padding-right:8px}.detail-title h2{overflow-wrap:anywhere}.detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-left:0}.detail-modal{position:relative}.upload-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:20px}.upload-meta-grid label{display:grid;gap:6px;color:#73798a;font-size:11px}.upload-meta-grid input,.upload-meta-grid select{width:100%;height:36px;border:1px solid #e4e5ed;border-radius:8px;padding:0 10px;background:#fff;color:#3f4453}.upload-meta-grid input:focus,.upload-meta-grid select:focus{outline:0;border-color:#9a8cf1;box-shadow:0 0 0 3px rgba(107,87,232,.1)}.view-button{width:auto;min-width:58px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;gap:4px}.view-button em{font-style:normal;font-size:11px}.view-button.active{background:#fff;color:#5f4bd2;border:1px solid #dcd6fb;box-shadow:0 2px 8px rgba(52,45,115,.12)}.view-button:not(.active){border:1px solid transparent}.upload-inline{border:1px solid #dfd9ff;background:#f5f2ff;color:#6654cb;border-radius:7px;padding:6px 9px;font-size:11px;cursor:pointer;white-space:nowrap}.upload-inline:hover{background:#e9e4ff}.topic-line{display:block;color:#7664cf;font-size:11px;line-height:1.55;white-space:normal;max-width:310px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.topic-line.empty{color:#a3a7b2}.highlight-list{display:flex;flex-wrap:wrap;gap:7px}.highlight-chip{display:inline-flex;align-items:center;padding:5px 9px;border-radius:7px;background:#fff4d9;color:#b37319;font-size:12px;line-height:1.35}.muted-value{color:#a0a4b0}.media-empty{display:grid;gap:12px;justify-items:center}.media-empty .secondary-button{width:max-content}
.inline-editable{display:block;min-height:25px;padding:4px 6px;border:1px solid transparent;border-radius:6px;cursor:text;transition:background .16s,border-color .16s,box-shadow .16s}.inline-editable:hover{background:#fafbfe;border-color:#e6e9f1}.inline-editable.inline-editing{padding:2px;background:#fff;border-color:#aeb8df;box-shadow:0 0 0 3px rgba(111,126,187,.1);cursor:text}.inline-editable input,.inline-editable select{box-sizing:border-box;width:100%;min-width:88px;height:28px;padding:0 7px;border:0;outline:0;background:transparent;color:#3f4658;font:inherit;font-size:11px}.inline-editable.title-link{max-width:330px}.inline-editable.topic-editable{max-width:290px}.inline-editable.review-editable{display:inline-block;min-width:62px}.inline-editable .topic-line{pointer-events:none}.inline-editable .soft-label,.inline-editable .review-pill{pointer-events:none}
.pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 2px;padding:12px 4px 0;border-top:1px solid #eef0f4;color:#8b93a2;font-size:11px}.pagination-actions{display:flex;align-items:center;gap:8px}.pagination-actions label{display:flex;align-items:center;gap:5px}.pagination-actions select{height:30px;padding:0 7px;border:1px solid #e3e7ee;border-radius:7px;background:#fff;color:#626b7b;font-size:11px}.pagination-button{height:30px;padding:0 11px;border:1px solid #e3e7ee;border-radius:7px;background:#fff;color:#606979;font-size:11px;cursor:pointer}.pagination-button:hover:not(:disabled){border-color:#b8c2dc;color:#53658e;background:#fbfcff}.pagination-button:disabled{cursor:not-allowed;opacity:.45}.page-indicator{min-width:48px;text-align:center;color:#5b6680}.scroll-top-button{position:fixed;right:24px;bottom:24px;z-index:40;width:38px;height:38px;border:1px solid #dfe4ed;border-radius:50%;background:rgba(255,255,255,.96);box-shadow:0 5px 18px rgba(45,55,78,.12);color:#6b7895;font-size:17px;line-height:1;cursor:pointer;transition:transform .18s,box-shadow .18s,color .18s}.scroll-top-button:hover{transform:translateY(-2px);box-shadow:0 7px 22px rgba(45,55,78,.17);color:#50628c}@media(max-width:680px){.pagination-bar{align-items:flex-start;flex-direction:column}.pagination-actions{width:100%;justify-content:space-between}.scroll-top-button{right:14px;bottom:14px}}
.case-upload-drop{cursor:pointer;transition:.18s}.case-upload-drop.dragging{outline:2px solid #9a8cf1;outline-offset:2px;background:#ebe7ff!important;color:#5f4bd2}.video-placeholder.case-upload-drop{display:grid;gap:3px;align-content:center}.video-placeholder.case-upload-drop small{font-size:8px;color:#eee}.wide-upload-slot{display:flex;align-items:center;gap:8px;min-width:120px;color:#a0a4b1;font-size:11px}
.filters .search-box{flex:1 1 auto;min-width:280px}.filters .search-box input{width:auto;min-width:0}.filters .search-box:focus-within{border-color:#b6aafa;box-shadow:0 0 0 3px rgba(107,87,232,.08)}.setting-help{margin:0;color:#8d92a1;font-size:11px;line-height:1.6}
.advanced-filter-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:10px 0 0}.advanced-filter-panel label{display:grid;gap:6px;color:#7d8495;font-size:11px}.advanced-filter-panel select,.advanced-filter-panel input{height:36px;border:1px solid #e4e7ee;border-radius:9px;background:#fff;padding:0 10px;color:#4a556b}.filter-advanced-trigger.active{border-color:#d8c9ff;background:#f3efff;color:#654bd0}
@media(max-width:850px){.section-actions{flex-wrap:wrap}.comfortable-table table{min-width:900px}.case-grid{grid-template-columns:1fr}.case-main-col{min-width:250px}}
@media(max-width:900px){.advanced-filter-panel{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.advanced-filter-panel{grid-template-columns:1fr}}

/* Keep the search controls inside the content area at every desktop width. */
.filters{display:grid;grid-template-columns:minmax(260px,1fr) 140px 150px auto;align-items:center;gap:10px;min-width:0}
.filters .search-box{width:100%;min-width:0}
.filters .search-box input{width:100%;min-width:0}
.filters select,.filters>input{width:100%;min-width:0}
.filters .filter-reset{white-space:nowrap}
@media(max-width:900px){.filters{grid-template-columns:minmax(220px,1fr) 130px 140px auto}}
@media(max-width:620px){.filters{grid-template-columns:1fr}.filters .filter-reset{justify-self:start}}

/* Keep the close control in its own visual lane, away from title actions. */
.detail-modal>.close-button{z-index:5;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;line-height:1;padding:0;background:#fff;color:#8f94a4;box-shadow:0 3px 12px rgba(37,40,76,.08)}
.detail-header{position:relative;padding-right:58px}.detail-header .detail-actions{min-width:0}.edit-hero{padding-right:72px}
@media(max-width:560px){.detail-header{padding-right:46px}.detail-header .detail-actions{flex-direction:column;align-items:stretch}.detail-header .detail-actions button{width:100%}.edit-hero{padding-right:58px}}

.saved-view-select{height:36px;max-width:130px;border:1px solid #e4e5ed;border-radius:8px;background:#fff;color:#5e6374;padding:0 9px;font-size:11px}.filter-toggle{height:38px;border:1px solid #e4e5ed;border-radius:8px;background:#fff;color:#858a9a;padding:0 10px;cursor:pointer;font-size:11px;white-space:nowrap}.filter-toggle.active{border-color:#d8c9ff;background:#f3efff;color:#654bd0}.mark-buttons{display:inline-flex;align-items:center;gap:2px;margin-right:6px}.mark-button{border:0;background:transparent;color:#b5b8c4;cursor:pointer;font-size:16px;line-height:1;padding:3px}.mark-button:hover,.mark-button.active{color:#e1a447}.mark-button.active.featured{color:#8d72e8}.card-marks{position:absolute;right:10px;top:10px;background:rgba(255,255,255,.92);padding:2px 4px;border-radius:8px}.case-card-media{position:relative}
.task-card-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}.task-detail-panel{margin:0 24px 24px;border:1px solid #e6e5f1;border-radius:12px;background:#fbfaff;padding:18px}.task-detail-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #ecebf5;padding-bottom:12px;margin-bottom:14px}.task-detail-head h3{margin:5px 0 0;font-size:15px}.task-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.task-detail-grid>div{background:#fff;border:1px solid #ededf3;border-radius:9px;padding:11px}.task-detail-grid>div.full{grid-column:1/-1}.task-detail-grid label{display:block;color:#969baa;font-size:10px;margin-bottom:6px}.task-detail-grid p{margin:0;color:#52586b;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.duplicate-list,.audit-list,.backup-list{display:grid;gap:11px;padding:0 24px 24px}.duplicate-card,.backup-row,.audit-row{border:1px solid #e9e9f1;border-radius:11px;background:#fff}.duplicate-card{padding:15px}.duplicate-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.duplicate-head strong{display:block;color:#353949;font-size:13px}.duplicate-head span{display:block;color:#a0a4b1;font-size:11px;margin-top:4px}.duplicate-items{display:grid;gap:7px;margin-top:13px}.duplicate-items label{display:flex;gap:9px;align-items:center;background:#fafafe;border-radius:8px;padding:9px 10px;cursor:pointer}.duplicate-items label:hover{background:#f3f0ff}.duplicate-items span{display:grid;gap:3px}.duplicate-items b{font-size:12px;color:#4a4f60}.duplicate-items small{font-size:10px;color:#a0a4b1}.audit-row{display:grid;grid-template-columns:1.3fr 1fr 1fr 160px;align-items:center;gap:12px;padding:12px 14px;color:#707687;font-size:11px}.audit-action{color:#6553c3;font-weight:700}.audit-row time{color:#a0a4b1;text-align:right}.backup-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 16px}.backup-row strong{display:block;color:#3b4051;font-size:12px}.backup-row small{display:block;color:#9fa3b0;font-size:10px;margin-top:5px}.inline-empty{position:relative;inset:auto;min-height:140px}
.batch-edit-modal{width:min(720px,100%)!important}.batch-edit-form{padding:20px 26px 0;background:#fff}.batch-edit-form .edit-actions{border-top:1px solid #ececf3}.batch-edit-modal .edit-hero{background:#f8f6ff}
@media(max-width:900px){.section-head{align-items:flex-start;flex-wrap:wrap}.section-actions{justify-content:flex-start}.saved-view-select{max-width:180px}.audit-row{grid-template-columns:1fr 1fr}.audit-row time{grid-column:1/-1;text-align:left}.task-card{grid-template-columns:1fr 120px}.task-card .task-status{grid-column:1/-1;text-align:left}}
@media(max-width:620px){.main-content{padding:18px 10px 40px}.topbar{flex-direction:column}.top-actions{width:100%;justify-content:flex-start}.stats-grid{grid-template-columns:1fr 1fr;gap:9px}.stat-card{padding:13px}.stat-card strong{font-size:23px}.section-head{padding:18px 16px 14px}.section-actions{width:100%;gap:7px}.section-actions .primary-button,.section-actions .secondary-button,.section-actions .ghost-button{padding:8px 10px}.filters{padding:0 16px 14px}.task-detail-panel{margin:0 16px 16px}.task-detail-grid{grid-template-columns:1fr}.task-detail-grid>div.full{grid-column:auto}.duplicate-list,.audit-list,.backup-list{padding:0 16px 16px}.duplicate-head{align-items:flex-start;flex-direction:column}.audit-row{grid-template-columns:1fr}.audit-row time{grid-column:auto}.backup-row{align-items:flex-start;flex-direction:column}.backup-row button{width:100%}}

/* Search is the single text entry; the remaining filters use a calm, grouped toolbar. */
.filters{display:grid;grid-template-columns:1fr;gap:11px;padding:0 24px 18px;border-bottom:1px solid var(--line)}
.filters .search-box{height:42px;width:100%;min-width:0;border-radius:10px;background:#fbfbfe;border-color:#ececf4;padding:0 13px}
.filters .search-box span{font-size:18px;color:#a5a9b8;margin-right:8px}
.filters .search-box input{height:100%;font-size:12px;background:transparent}
.filter-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.filter-controls select{height:36px;min-width:138px;border:1px solid #e9e9f1;border-radius:9px;padding:0 11px;background:#fff;color:#616779;font-size:11px;outline:0}
.filter-controls select:focus{border-color:#cfc5fb;box-shadow:0 0 0 3px rgba(107,87,232,.08)}
.filter-toggle{height:36px;border:1px solid #e9e9f1;border-radius:9px;background:#fff;color:#8b90a0;padding:0 13px;cursor:pointer;font-size:11px;transition:.18s}
.filter-toggle:hover{border-color:#d8d1fb;color:#6d59d6;background:#faf9ff}
.filter-toggle.active{border-color:#d8d1fb;background:#f4f1ff;color:#654bd0;box-shadow:0 2px 7px rgba(107,87,232,.08)}
.filter-reset{height:36px;border-radius:9px;padding:0 12px;color:#9a9eac;background:transparent}
.filter-reset:hover{background:#f7f7fa;color:#6654cb}
@media(max-width:620px){.filter-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.filter-controls select,.filter-controls .filter-toggle,.filter-controls .filter-reset{width:100%}.filter-controls .filter-reset{grid-column:1/-1;text-align:center}}

.audit-list{gap:8px}
.audit-row{display:grid;grid-template-columns:minmax(250px,1.7fr) 150px 130px 150px;align-items:center;gap:16px;padding:13px 16px;background:#fff;border:1px solid #ececf3;border-radius:10px}
.audit-event{display:grid;gap:5px;min-width:0}
.audit-event strong{font-size:12px;color:#4a4f60;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.audit-action{color:#6553c3;font-size:12px;font-weight:700}
.audit-meta{display:grid;gap:4px;min-width:0}
.audit-meta small{color:#a4a8b5;font-size:10px}
.audit-meta span{color:#626878;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.audit-row time{color:#9ea3b1;font-size:11px;text-align:right}
.backup-location{display:flex;align-items:center;gap:10px;margin:0 24px 12px;padding:11px 13px;border:1px solid #e8e4fb;border-radius:10px;background:#faf9ff;color:#6f659d;font-size:11px}
.backup-location strong{color:#5f4bd2}
.backup-location code{color:#8a8e9e;font-family:Consolas,monospace;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.backup-location small{margin-left:auto;color:#a0a4b1}
@media(max-width:900px){.audit-row{grid-template-columns:1.3fr 1fr 1fr}.audit-row time{text-align:left}.backup-location{align-items:flex-start;flex-wrap:wrap}.backup-location small{width:100%;margin-left:0}}
@media(max-width:620px){.audit-row{grid-template-columns:1fr;gap:8px}.audit-row time{text-align:left}.backup-location{margin:0 16px 12px;display:grid;gap:6px}.backup-location small{width:auto}}

/* Edit panel: clear sections, softer surfaces, and a visible save area. */
.detail-modal:has(.edit-form){width:min(860px,100%);max-height:92vh;padding:0;background:#f8f9fd;overflow:auto}
.detail-modal:has(.edit-form) .close-button{z-index:3;right:20px;top:18px;width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.72);font-size:20px}
.edit-hero{display:flex;align-items:center;gap:14px;padding:26px 32px 22px;background:linear-gradient(135deg,#f8f6ff 0%,#fff 62%);border-bottom:1px solid #eceaf7}
.edit-hero-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#6d59e8,#a27cf1);color:#fff;font-size:21px;box-shadow:0 8px 18px rgba(107,87,232,.2)}
.edit-kicker{display:block;color:#8a7ee2;font-size:9px;font-weight:800;letter-spacing:1.8px;margin-bottom:4px}
.edit-hero h2{margin:0;color:#25283a;font-size:21px;letter-spacing:-.2px}.edit-hero p{margin:5px 0 0;color:#8a90a2;font-size:12px}
.edit-form{padding:20px 26px 0}.edit-section{margin-bottom:14px;padding:20px 21px 22px;border:1px solid #e8e9f1;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(52,56,91,.035)}
.edit-section-base{border-top:3px solid #8a78ee}.edit-section-source{border-top:3px solid #72b6c8}.edit-section-content{border-top:3px solid #e6ad64}.edit-section-analysis{border-top:3px solid #e28a9b}.edit-section-notes{border-top:3px solid #a6b27b}
.edit-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:17px}.edit-section-head h3{margin:0;color:#303448;font-size:15px}.edit-section-head p{margin:5px 0 0;color:#9a9eac;font-size:11px}.edit-section-number{color:#b1b4c0;font-size:11px;font-weight:800;letter-spacing:1px}
.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px 16px}.edit-field{display:grid;gap:7px;min-width:0;color:#73798a;font-size:11px}.edit-field.full-field{grid-column:1/-1}.edit-field>span{display:flex;align-items:center;gap:6px;font-weight:600;color:#697084}.edit-field>span b{font-size:9px;font-weight:700;color:#a18ced;background:#f1eeff;border-radius:4px;padding:2px 5px}.edit-field input,.edit-field select,.edit-field textarea{width:100%;border:1px solid #e2e4ed;border-radius:9px;background:#fbfcfe;color:#34394b;font:inherit;font-size:13px;outline:0;transition:border-color .18s,box-shadow .18s,background .18s;padding:0 11px}.edit-field input,.edit-field select{height:39px}.edit-field textarea{min-height:74px;padding:10px 11px;line-height:1.65;resize:vertical}.edit-field input::placeholder,.edit-field textarea::placeholder{color:#b3b6c2}.edit-field input:focus,.edit-field select:focus,.edit-field textarea:focus{background:#fff;border-color:#9b8bf1;box-shadow:0 0 0 3px rgba(107,87,232,.1)}.edit-field small{margin-top:-2px;color:#a3a7b4;font-size:10px;line-height:1.5}
.edit-highlights textarea{background:#fffaf0;border-color:#f2dfb8}.edit-highlights textarea:focus{border-color:#e6ad64;box-shadow:0 0 0 3px rgba(230,173,100,.13)}.edit-actions{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 0 22px}.edit-actions>div:last-child{display:flex;gap:9px}.edit-actions-sticky{position:sticky;bottom:0;margin:0 -26px;padding:14px 26px;background:rgba(255,255,255,.94);border-top:1px solid #e7e8f0;box-shadow:0 -8px 18px rgba(32,35,50,.05);z-index:2}.edit-save-tip{color:#a0a4b2;font-size:10px}
.highlight-block{background:linear-gradient(135deg,#fffdf7,#fff);border-color:#f0e5c9}.highlight-block>label{display:flex;justify-content:space-between;align-items:center}.highlight-block>label em{font-style:normal;color:#bd8b3d;background:#fff2d6;border-radius:5px;padding:3px 6px;font-size:9px}.highlight-block .highlight-list{gap:8px}.highlight-block .highlight-chip{padding:7px 10px;border-radius:8px;background:#fff0ce;color:#a96918;box-shadow:inset 0 0 0 1px rgba(230,173,100,.16)}
@media(max-width:680px){.detail-modal:has(.edit-form){max-height:95vh}.edit-hero{padding:22px 19px 18px}.edit-form{padding:14px 14px 0}.edit-section{padding:17px 15px 18px}.edit-grid{grid-template-columns:1fr}.edit-field.full-field{grid-column:auto}.edit-actions-sticky{margin:0 -14px;padding:12px 14px}.edit-save-tip{display:none}}

/* Global visual system: bright, calm, and intentionally restrained. */
:root{
  --theme-primary:#5d6bd7;
  --theme-primary-dark:#4c5bc7;
  --theme-primary-soft:#eef1ff;
  --theme-surface:#ffffff;
  --theme-bg:#f5f7fb;
  --theme-line:#e7ebf2;
  --theme-ink:#273044;
  --theme-muted:#8d96a8;
  --theme-shadow:0 8px 24px rgba(43,56,88,.055);
  --primary:var(--theme-primary);
  --primary-dark:var(--theme-primary-dark);
  --bg:var(--theme-bg);
  --card:var(--theme-surface);
  --ink:var(--theme-ink);
  --muted:var(--theme-muted);
  --line:var(--theme-line);
  --shadow:var(--theme-shadow);
}

/* 通用模板工具栏：给状态、数量和操作按钮留出清晰间距，避免挤成一团。 */
.template-source-panel > .template-workspace-panel-head {
  gap: 20px;
}
.template-source-panel > .template-workspace-panel-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.template-source-panel > .template-workspace-panel-head > .template-source-actions {
  flex: 0 0 auto;
  gap: 12px;
  padding-left: 8px;
}
.template-source-panel .template-count-control {
  gap: 8px;
  margin-left: 4px;
}
.template-source-panel .template-count-control input {
  width: 46px;
}
.template-source-panel > .template-workspace-panel-head > .template-source-actions button {
  margin-left: 2px;
}
.template-append-target-control {
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  max-width:230px;
  color:#7b88a4;
  font-size:11px;
}
.template-append-target-control > span { flex:0 0 auto; }
.template-append-target-control select {
  width:180px;
  min-width:0;
  height:32px;
  padding:0 8px;
  border:1px solid #dce3ef;
  border-radius:8px;
  background:#fff;
  color:#526681;
  font-size:11px;
}
/* 模板历史操作始终允许换行，避免“选择合并”被挤到屏幕外。 */
#templatesView>.section-head{align-items:flex-start;flex-wrap:wrap;gap:12px}
#templatesView>.section-head>div:first-child{flex:1 1 260px;min-width:220px}
#templatesView>.section-head>.template-workspace-actions{flex:1 1 100%;width:100%;min-width:0;justify-content:flex-end;flex-wrap:wrap;gap:7px}
#templatesView>.section-head>.template-workspace-actions select{min-width:0;max-width:100%}
#templateWorkspaceMergeHistoryBtn{display:inline-flex!important;visibility:visible!important;opacity:1!important}
.template-history-merge-actions button{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 14px;font-family:inherit;font-size:11px;line-height:1}
.template-history-merge-list{touch-action:none;user-select:none}.template-history-merge-item.is-disabled{opacity:.58;cursor:not-allowed}.template-history-merge-item.is-disabled input{cursor:not-allowed}.template-history-merge-item small{line-height:1.4}
.template-history-merge-panel{margin:10px 0 14px;padding:13px 15px;border:1px solid #d9ddff;border-radius:12px;background:linear-gradient(135deg,#fafaff,#f7fbff);box-shadow:0 5px 18px rgba(91,92,190,.06)}
.template-history-merge-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.template-history-merge-head strong{display:block;color:#30466b;font-size:13px}.template-history-merge-head small{display:block;margin-top:4px;color:#8492a8;font-size:10px;line-height:1.5}.template-history-merge-head>span{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#eeecff;color:#6555d7;font-size:10px}
.template-history-merge-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:230px;overflow:auto;margin-top:11px;padding-right:3px}.template-history-merge-item{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:9px;border:1px solid #e2e7f1;border-radius:8px;background:#fff;cursor:pointer}.template-history-merge-item:has(input:checked){border-color:#8d83ed;background:#f7f5ff}.template-history-merge-item input{flex:0 0 auto;margin-top:2px;accent-color:#7565e6}.template-history-merge-item span{min-width:0}.template-history-merge-item strong,.template-history-merge-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.template-history-merge-item strong{color:#445a7a;font-size:11px}.template-history-merge-item small{margin-top:4px;color:#91a0b3;font-size:9px}.template-history-merge-empty{padding:18px;color:#91a0b3;font-size:11px;text-align:center;grid-column:1/-1}.template-history-merge-actions{display:flex;align-items:flex-end;gap:8px;margin-top:11px}.template-history-merge-actions label{display:grid;gap:4px;min-width:220px;color:#71819b;font-size:10px}.template-history-merge-actions input{height:32px;padding:0 9px;border:1px solid #dce3ef;border-radius:7px;background:#fff;color:#4e6380;font-size:11px}.template-history-merge-actions button{height:32px;white-space:nowrap}

.template-workspace-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  padding: 8px 12px;
  border-top: 1px solid #e8ebf3;
  color: #7f8da5;
  font-size: 11px;
}
.template-workspace-pagination > span:first-child {
  margin-right: auto;
  color: #61718b;
  font-variant-numeric: tabular-nums;
}
.template-workspace-pagination .pagination-button {
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: #fff;
  color: #5e6f8b;
  cursor: pointer;
  white-space: nowrap;
}
.template-workspace-pagination .pagination-button:hover:not(:disabled) {
  border-color: #bfc9e1;
  background: #f8f9ff;
  color: #5048b9;
}
.template-workspace-pagination .pagination-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.template-workspace-pagination .page-indicator {
  min-width: 52px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #f8f9fd;
  color: #647391;
  font-variant-numeric: tabular-nums;
}
.template-source-generation-summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #e3e7f1;
  border-radius: 8px;
  background: #f8f9fd;
  color: #687895;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .template-source-panel > .template-workspace-panel-head {
    flex-wrap: wrap;
  }
  .template-source-panel > .template-workspace-panel-head > .template-source-actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
    padding-top: 4px;
  }
}

/* 已保存模板移动端双列与分页最终覆盖规则。 */
@media (max-width:680px){
  .template-workspace-card,.template-workspace-card *{box-sizing:border-box!important;max-width:100%!important}
  .template-workspace-card-head{display:block!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title{display:flex!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title>div:last-child{width:calc(100% - 22px)!important;min-width:0!important;overflow:hidden!important}
  .template-workspace-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;min-width:0!important;flex:none!important;overflow:hidden!important;gap:5px!important}
  .template-workspace-card-actions>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{grid-column:1/-1!important;flex-basis:auto!important}
  .template-workspace-card .template-workspace-text pre{width:100%!important;max-width:100%!important;overflow:auto!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  .template-workspace-card .template-workspace-example p{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  .template-workspace-template-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;min-width:0!important}
  .template-workspace-card{min-width:0!important;width:100%!important;padding:9px!important;border-radius:11px!important;overflow:hidden!important}
  .template-workspace-card-head,.template-workspace-card-title,.template-workspace-card-actions{display:flex!important;min-width:0!important;flex-wrap:wrap!important;gap:5px!important}
  .template-workspace-card-title{align-items:flex-start!important}.template-workspace-card-title>div:last-child{width:100%!important}
  .template-workspace-card-title h3{font-size:12px!important;line-height:1.4!important;max-height:34px!important;overflow:hidden!important}
  .template-workspace-card-title p{font-size:10px!important;line-height:1.45!important;-webkit-line-clamp:2!important;max-height:29px!important}
  .template-workspace-card-actions>*{flex:1 1 calc(50% - 5px)!important;min-width:0!important;padding:6px 4px!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{flex-basis:100%!important}.template-workspace-access{display:block!important;margin:6px 0!important;padding:0!important;font-size:10px!important}
  .template-workspace-access>span:not(.template-workspace-share-badge){display:none!important}.template-workspace-share-badge{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-structure strong{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;font-size:10px!important;line-height:1.45!important}
  .template-workspace-slots{max-height:49px!important;overflow:hidden!important}.template-workspace-slots em{font-size:9px!important;padding:3px 5px!important}
  .template-workspace-card .template-workspace-text pre{max-height:92px!important;min-height:56px!important;padding:7px!important;font-size:9px!important;line-height:1.5!important}
  .template-workspace-card .template-workspace-example[open]{max-height:130px!important}.template-workspace-card .template-workspace-example p{max-height:88px!important;font-size:9px!important;line-height:1.5!important}
  .template-workspace-meta{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:9px!important}
  .template-workspace-pagination{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;margin:8px 0 2px!important;padding:7px 0 0!important;border-top:1px solid #e8ebf3!important;color:#8390a5!important;font-size:10px!important}
  .template-workspace-pagination .pagination-button{min-width:54px!important;height:29px!important;padding:0 7px!important;font-size:10px!important}
}

/* PC 端保持原来的完整模板卡片与横向菜单；摘要折叠仅属于手机端。 */
@media (min-width:681px){
  .sidebar .nav-item .nav-label{
    display:inline!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    overflow:visible!important;
    text-align:left!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
    font-size:inherit!important;
    line-height:inherit!important;
    color:inherit!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .template-workspace-card-details > .template-workspace-details-toggle{display:none!important}
  .template-workspace-card-details > .template-workspace-details-body{display:block!important;padding-top:0!important}
}

/* 文案工坊公开资料读取结果：分别展示链接状态和实际纳入字数。 */
.creative-reference-results{margin:-5px 0 12px;padding:9px 11px;border:1px solid #e1e7f2;border-radius:9px;background:#fbfcff;color:#61708b;font-size:12px;line-height:1.5}
.creative-reference-result-head{margin-bottom:5px;color:#4e5f82;font-weight:700}
.creative-reference-result-item{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 8px;padding:6px 0;border-top:1px solid #edf1f6}
.creative-reference-result-status{font-weight:700;white-space:nowrap}
.creative-reference-result-item.is-ok .creative-reference-result-status{color:#218866}
.creative-reference-result-item.is-error .creative-reference-result-status{color:#b15f69}
.creative-reference-result-url{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#71819e}
.creative-reference-result-detail{grid-column:2;color:#7c8aa2}
.creative-reference-result-preview{grid-column:2;max-height:54px;overflow:auto;color:#8491a7;white-space:pre-wrap;overflow-wrap:anywhere}
.creative-reference-result-actions{grid-column:2;display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.creative-browser-fallback{margin-top:8px;padding:9px 10px;border:1px solid #e0dafa;border-radius:9px;background:#faf9ff;color:#6557b8;font-size:11px;line-height:1.55}
.creative-browser-fallback strong{display:block;margin-bottom:3px;color:#5144a9}
.creative-browser-fallback p{margin:0 0 7px;color:#746b9c}
.creative-browser-fallback>div{display:flex;gap:7px;flex-wrap:wrap}
@media (max-width:680px){
  .creative-reference-results{margin-top:-3px;padding:8px 9px;font-size:11px}
  .creative-reference-result-item{grid-template-columns:auto minmax(0,1fr);gap:2px 6px}
  .creative-reference-result-detail,.creative-reference-result-preview{grid-column:1 / -1;padding-left:0}
}

/* 最终窄屏收口：双列卡片内部按钮不横向溢出。 */
@media (max-width:680px){
  .template-workspace-card,.template-workspace-card *{box-sizing:border-box!important;max-width:100%!important}
  .template-workspace-card-head{display:block!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title{display:flex!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title>div:last-child{width:calc(100% - 22px)!important;min-width:0!important;overflow:hidden!important}
  .template-workspace-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;gap:5px!important}
  .template-workspace-card-actions>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{grid-column:1/-1!important}
  .template-workspace-card .template-workspace-text pre,.template-workspace-card .template-workspace-example p{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
}

/* 最终窄屏收口：双列卡片内部按钮不横向溢出。 */
@media (max-width:680px){
  .template-workspace-card,.template-workspace-card *{box-sizing:border-box!important;max-width:100%!important}
  .template-workspace-card-head{display:block!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title{display:flex!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title>div:last-child{width:calc(100% - 22px)!important;min-width:0!important;overflow:hidden!important}
  .template-workspace-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;gap:5px!important}
  .template-workspace-card-actions>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{grid-column:1/-1!important}
  .template-workspace-card .template-workspace-text pre,.template-workspace-card .template-workspace-example p{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
}

/* 双列模板卡片窄屏收口：操作按钮和长文本不得撑出右列。 */
@media (max-width:680px){
  .template-workspace-card,
  .template-workspace-card *{box-sizing:border-box!important;max-width:100%!important}
  .template-workspace-card-head{display:block!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title{display:flex!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title>div:last-child{width:calc(100% - 22px)!important;min-width:0!important;overflow:hidden!important}
  .template-workspace-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;min-width:0!important;flex:none!important;overflow:hidden!important;gap:5px!important}
  .template-workspace-card-actions>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{grid-column:1/-1!important;flex-basis:auto!important}
  .template-workspace-card .template-workspace-text pre{width:100%!important;max-width:100%!important;overflow:auto!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  .template-workspace-card .template-workspace-example p{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
}

/* 双列模板卡片窄屏收口：操作按钮和长文本不得撑出右列。 */
@media (max-width:680px){
  .template-workspace-card,
  .template-workspace-card *{box-sizing:border-box!important;max-width:100%!important}
  .template-workspace-card-head{display:block!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title{display:flex!important;width:100%!important;overflow:hidden!important}
  .template-workspace-card-title>div:last-child{width:calc(100% - 22px)!important;min-width:0!important;overflow:hidden!important}
  .template-workspace-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;min-width:0!important;flex:none!important;overflow:hidden!important;gap:5px!important}
  .template-workspace-card-actions>*{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{grid-column:1/-1!important;flex-basis:auto!important}
  .template-workspace-card .template-workspace-text pre{width:100%!important;max-width:100%!important;overflow:auto!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  .template-workspace-card .template-workspace-example p{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
}
body{background:var(--theme-bg);color:var(--theme-ink)}
.sidebar{background:#fff;color:var(--theme-ink);border-right:1px solid var(--theme-line);box-shadow:3px 0 16px rgba(43,56,88,.025)}
.brand-mark,.login-card .brand-mark{background:#e8ecff;color:var(--theme-primary);box-shadow:none}
.brand strong{color:var(--theme-ink)}
.brand span{color:#a0a8b7}
.nav-item{color:#7f899c}
.nav-item:hover,.nav-item.active{background:#eef1ff;color:var(--theme-primary)}
.nav-item.active{box-shadow:inset 3px 0 var(--theme-primary)}
.sidebar-bottom{color:#8e97a8;border-color:#edf0f5}
.sidebar-bottom small{color:#adb4c0}
.server-dot{background:#62b495;box-shadow:0 0 0 4px rgba(98,180,149,.12)}
.main-content{background:var(--theme-bg)}
.eyebrow{color:var(--theme-primary)}
.primary-button{background:var(--theme-primary);box-shadow:0 5px 13px rgba(93,107,215,.16)}
.primary-button:hover{background:var(--theme-primary-dark);transform:none}
.secondary-button{background:var(--theme-primary-soft);color:var(--theme-primary)}
.secondary-button:hover{background:#e4e9ff}
.ghost-button{border-color:var(--theme-line);background:#fff;color:#6f788b}
.ghost-button:hover{border-color:#cfd6ee;background:#fafbff;color:var(--theme-primary)}
.danger-button{background:#fff5f5;color:#bd6d78;border:1px solid #f1dfe2}
.stats-grid{gap:16px}
.stat-card,.content-card{border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
.stat-card.accent{background:#fff;color:var(--theme-ink);border-color:#dfe4fb;border-left:3px solid var(--theme-primary)}
.stat-card.accent span,.stat-card.accent small{color:var(--theme-muted)}
.stat-card strong{color:var(--theme-ink)}
.section-head{background:#fff}
th{background:#fbfcfe;color:#9099aa}
th,td{border-bottom-color:#eef1f5}
.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#fafbff}
.video-preview,.video-placeholder{background:#e9edf5!important;color:#6c7890!important}
.video-badge{background:rgba(74,88,126,.76)}
.pill{background:#f1f3f7;color:#7b8495}
.pill.done{background:#edf7f3;color:#4c9d7d}
.pill.pending{background:#fff7e9;color:#c28d43}
.pill.processing{background:#eef1ff;color:var(--theme-primary)}
.soft-label,.review-pill{background:#f3f5f8;color:#778194}
.review-pill{background:#f1f3ff;color:#6975bd}
.topic-line{color:#6d78b9}
.topic-line.empty{color:#a3aab7}
.tag,.dictionary-chip{background:#f1f3ff;color:#6874ba}
.empty-icon{background:#eef1ff;color:var(--theme-primary)}
.task-progress i{background:var(--theme-primary)}
.setting-note{background:#fbfcff;border-color:#e6eaf5;color:#67739a}
.setting-panel,.recommend-card,.detail-block,.edit-section{border-color:var(--theme-line);box-shadow:none}
.recommend-card{background:#fbfcfe}
.recommend-top span{background:#eef1ff;color:var(--theme-primary)}
.recommend-links a{color:var(--theme-primary)}
.recommend-links button{color:#5d9a82}
.upload-overlay,.detail-overlay{background:rgba(40,50,74,.32)}
.upload-modal,.detail-modal,.login-card{box-shadow:0 18px 46px rgba(38,50,78,.14)}
.drop-zone{border-color:#d6dcf0;background:#fbfcff}
.drop-zone.dragging{background:#eef1ff;border-color:var(--theme-primary)}
.upload-icon{background:#eef1ff;color:var(--theme-primary)}
.detail-modal:has(.edit-form){background:#f7f9fc}
.edit-hero{background:#fff;border-bottom-color:var(--theme-line)}
.edit-hero-icon{background:#e8ecff;color:var(--theme-primary);box-shadow:none}
.edit-kicker{color:#7784c8}
.edit-section-base,.edit-section-source,.edit-section-content,.edit-section-analysis,.edit-section-notes{border-top:2px solid #e3e8f1}
.edit-section-head h3{color:var(--theme-ink)}
.edit-highlights textarea,.highlight-block{background:#fffaf0;border-color:#f0dfbd}
.highlight-block .highlight-chip,.highlight-chip{background:#fff3d9;color:#ad7b2d;box-shadow:none}
.edit-actions-sticky{background:rgba(255,255,255,.96);border-top-color:var(--theme-line)}
.close-button{color:#929baa}
.close-button:hover{color:var(--theme-primary);background:#f5f7ff}
.view-switcher{background:#f3f5fa;border-color:#e8ebf2}
.view-button:hover,.view-button.active{color:var(--theme-primary);box-shadow:0 2px 7px rgba(43,56,88,.08)}
.filter-toggle.active{background:var(--theme-primary-soft);border-color:#d8def5;color:var(--theme-primary);box-shadow:none}
.case-card{border-color:var(--theme-line);box-shadow:none}
.case-card:hover{border-color:#d7def4;box-shadow:0 8px 20px rgba(43,56,88,.07);transform:none}
.case-card-media{background:#edf0f6}
.case-card-media .video-preview,.case-card-media .video-placeholder{background:#e9edf5!important}
.case-card-meta span{background:#f3f5f8;color:#778194}
.task-detail-panel{background:#fbfcff;border-color:var(--theme-line)}
.duplicate-card,.backup-row,.audit-row,.recycle-row{border-color:var(--theme-line);box-shadow:none}
.duplicate-items label{background:#fafbfe}
.duplicate-items label:hover{background:#f1f3ff}
.audit-action{color:var(--theme-primary)}
.backup-location{background:#fafbff;border-color:#e4e8f3;color:#6f7890}
.backup-location strong{color:var(--theme-primary)}
.toast{background:#2f394d}
.upload-title-field{grid-column:1/-1}
.upload-title-field textarea{width:100%;min-height:86px;border:1px solid #e2e5ee;border-radius:9px;background:#fbfcfe;color:#34394b;font:inherit;font-size:12px;line-height:1.6;padding:10px 11px;resize:vertical;outline:0}
.upload-title-field textarea:focus{background:#fff;border-color:#9aa8e7;box-shadow:0 0 0 3px rgba(93,107,215,.1)}
.upload-title-field small{color:#9aa2b2;font-size:10px;line-height:1.5}
.upload-topic-field{grid-column:1/-1}
.upload-topic-field textarea{width:100%;min-height:86px;border:1px solid #e2e5ee;border-radius:9px;background:#fbfcfe;color:#34394b;font:inherit;font-size:12px;line-height:1.6;padding:10px 11px;resize:vertical;outline:0}
.upload-topic-field textarea:focus{background:#fff;border-color:#9aa8e7;box-shadow:0 0 0 3px rgba(93,107,215,.1)}
.upload-topic-field small{color:#9aa2b2;font-size:10px;line-height:1.5}
.upload-confirm-button{margin-top:0;width:auto}
.upload-confirm-button:disabled{opacity:.55;cursor:not-allowed}
.upload-modal-footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #ececf4}
.upload-modal-footer button{width:auto;min-width:112px;height:38px;margin:0}
.upload-modal-footer .upload-done-button{width:auto;margin:0}
.upload-match-list{display:grid;gap:10px;margin-top:12px}
.upload-match-card{padding:12px;border:1px solid #e3e8f6;border-radius:10px;background:#fbfcff}
.upload-match-head{display:grid;gap:4px;margin-bottom:10px}
.upload-match-head strong{color:#33405a;font-size:12px}
.upload-match-head span{color:#8e98ad;font-size:11px;line-height:1.5}
.upload-match-candidates{display:grid;gap:8px}
.upload-match-candidate{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;border:1px solid #edf0f6;border-radius:9px;background:#fff}
.upload-match-candidate b{display:block;color:#3b455d;font-size:12px}
.upload-match-candidate small{display:block;margin-top:4px;color:#9aa2b2;font-size:10px}
.upload-match-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
@media(max-width:620px){.upload-match-candidate{align-items:flex-start;flex-direction:column}.upload-match-candidate button,.upload-match-actions button{width:100%}.upload-match-actions{flex-direction:column}}
.task-summary{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.task-summary-item{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border:1px solid #e7eaf1;border-radius:7px;background:#fbfcfe;color:#8a92a2;font-size:10px}.task-summary-item b{color:#596783;font-size:12px}.task-list{max-height:min(68vh,760px);overflow:auto;padding:0 24px 18px;display:block}.task-list-head,.task-row{display:grid;grid-template-columns:minmax(260px,1.8fr) 90px minmax(130px,1fr) 128px 86px;align-items:center;gap:14px}.task-list-head{position:sticky;top:0;z-index:2;padding:8px 12px;border-bottom:1px solid #e9edf3;background:#fff;color:#9aa2b1;font-size:10px}.task-row{min-height:54px;padding:7px 12px;border-bottom:1px solid #eef0f4;color:#596174;font-size:11px}.task-row:hover{background:#fbfcfe}.task-primary{min-width:0}.task-primary strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#364056;font-size:11px;font-weight:700}.task-primary small{display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a0a7b4;font-size:10px}.task-state{display:flex;align-items:center}.task-progress-cell{min-width:0}.task-progress-cell>span{display:block;margin-bottom:4px;color:#8c95a5;font-size:10px}.task-progress{height:5px;margin-top:0;background:#edf0f4;border-radius:99px;overflow:hidden}.task-progress i{display:block;height:100%;border-radius:99px;background:var(--theme-primary)}.task-row time{color:#98a0ae;font-size:10px;white-space:nowrap}.task-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.pill.failed{background:#fff0f0;color:#cc7373}.task-detail-panel{margin-top:12px!important}
@media(max-width:900px){.task-list{max-height:none;overflow:visible}.task-list-head{display:none}.task-row{grid-template-columns:minmax(0,1fr) 90px 80px;gap:8px;padding:10px 8px}.task-progress-cell{grid-column:2}.task-row time{grid-column:1;color:#a0a7b4}.task-row-actions{grid-column:3;grid-row:2}.task-summary{justify-content:flex-start;margin-top:8px}}
@media(max-width:620px){.task-row{grid-template-columns:minmax(0,1fr) auto}.task-state{justify-content:flex-end}.task-progress-cell{grid-column:1/-1}.task-row time{grid-column:1}.task-row-actions{grid-column:2;grid-row:3}.task-summary-item{padding:4px 6px}}

.stage-item{background:#f6f8ff;color:#7380b8}
.workbench-source-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.workbench-source-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e8ebf4;border-radius:9px;background:#fff}
.workbench-source-row span{color:#6d7487;font-size:11px}
.workbench-source-row b{color:#655bd2;font-size:11px}
.workbench-chip-list,.workbench-score-row{display:flex;flex-wrap:wrap;gap:8px}
.workbench-chip{border:1px solid #dfe4f1;border-radius:999px;background:#fff;color:#6d7487;padding:7px 11px;font-size:11px;cursor:pointer}
.workbench-chip.locked{border-color:#d9d0ff;background:#f3f0ff;color:#5f4bd2}
@media(max-width:620px){.workbench-source-list{grid-template-columns:1fr}}

/* Visual language aligned with the publishing assistant: airy blue-gray canvas, soft lavender focus, restrained status colors. */
:root{--theme-primary:#6d63df;--theme-primary-dark:#5c53ce;--theme-primary-soft:#f0efff;--theme-bg:#f4f7fd;--theme-line:#e5eaf4;--theme-ink:#27324a;--theme-muted:#8a95ab;--theme-shadow:0 10px 28px rgba(71,87,139,.075)}
body{background:var(--theme-bg);color:var(--theme-ink)}
.sidebar{width:208px;padding:24px 14px 20px;background:#fff;border-right:1px solid #e5eaf4;box-shadow:4px 0 20px rgba(68,82,129,.035)}
.brand{gap:10px;padding:0 8px 28px}.brand-mark,.login-card .brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#e7e5ff,#def4ff);color:#6158d4}.brand strong{font-size:14px;color:#303a52}.brand span{font-size:10px;color:#a0a9bb}
.sidebar nav{gap:7px}.nav-item{padding:11px 12px;border:1px solid transparent;border-radius:11px;color:#7f8ba2;font-size:13px}.nav-item span{font-size:16px}.nav-item:hover,.nav-item.active{background:#f0efff;border-color:#dfdcff;color:#6158d4}.nav-item.active{box-shadow:inset 3px 0 #7569e6}.sidebar-bottom{padding:14px 8px;border-color:#edf0f6;color:#8b96aa}.sidebar-bottom small{color:#aeb6c4}
.main-content{margin-left:208px;width:calc(100% - 208px);padding:28px 32px 56px;background:linear-gradient(180deg,#f6f8ff 0%,#f4f7fd 100%)}.topbar{margin-bottom:24px}.eyebrow{color:#7166de;font-size:9px;letter-spacing:2px}.topbar h1{color:#263149;font-size:25px}
.top-actions{gap:8px}.primary-button{background:linear-gradient(135deg,#7165e2,#687fdf);box-shadow:0 7px 16px rgba(103,96,218,.18);border-radius:10px}.primary-button:hover{background:linear-gradient(135deg,#6559d4,#5e75d2);transform:translateY(-1px)}.secondary-button{background:#f0efff;color:#655bd2;border:1px solid #e4e1ff;border-radius:10px}.secondary-button:hover{background:#e8e5ff}.ghost-button{border-color:#e4e8f1;border-radius:10px;color:#65718a}.danger-button{border-radius:10px}
.stats-grid{gap:13px;margin-bottom:20px}.stat-card,.content-card{border:1px solid #e6eaf3;border-radius:15px;box-shadow:0 10px 26px rgba(71,87,139,.065)}.stat-card{padding:16px 18px}.stat-card.accent{background:linear-gradient(135deg,#fff 0%,#f5f3ff 100%);border:1px solid #e1defd;border-left:3px solid #7668e6}.stat-card strong{font-size:28px}.content-card{overflow:hidden}.section-head{padding:21px 22px 16px;background:#fff}.section-head h2{font-size:17px;color:#29344c}.section-head p{color:#9aa4b6}
.filters{background:#fff}.filters .search-box{background:#fafbff;border-color:#e7eaf3;border-radius:10px}.filter-controls select,.filter-toggle{border-color:#e5e9f2;border-radius:10px}.filter-toggle.active{background:#f0efff;border-color:#dedaff;color:#655bd2}
.task-workspace{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:16px;padding:0 22px 22px;align-items:start}
.task-list-panel,.task-insight-panel{min-width:0;border:1px solid #e6eaf3;border-radius:14px;background:#fff;box-shadow:0 10px 24px rgba(71,87,139,.06);overflow:hidden}
.task-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:16px 18px;border-bottom:1px solid #edf1f6}
.task-panel-head strong{display:block;color:#28334d}
.task-panel-head small{display:block;margin-top:4px;color:#99a3b6}
.task-pagination-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-top:1px solid #edf1f6;background:#fbfcff}
.task-pagination-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.task-pagination-actions label{display:flex;align-items:center;gap:8px;color:#7f889a;font-size:12px}
.task-pagination-actions select{border:1px solid #e5e9f2;border-radius:10px;padding:6px 10px;background:#fff;color:#4b566e}
.audit-row-actions{display:flex;justify-content:flex-end}
@media (max-width:1080px){.task-workspace{grid-template-columns:1fr}}
.comfortable-table,.wide-table{background:#fff}.comfortable-table th,.wide-table th{background:#fbfcff;color:#929caf}.comfortable-table tbody tr,.wide-table tbody tr{transition:background .16s}.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#fafbff}.comfortable-table tbody tr{height:76px}.comfortable-table th,.comfortable-table td{padding:12px 11px}.cell-link,.inline-editable.title-link{color:#33405d}.inline-editable:hover{background:#f8f9ff;border-color:#e1e5f0}.topic-line{color:#6e66c3}
.soft-label{background:#f1f4f8;color:#748097}.review-pill{background:#f0efff;color:#6a62bd}.pill.done{background:#e8f8f1;color:#48a37d}.pill.pending{background:#fff4df;color:#c48a38}.pill.processing{background:#eef0ff;color:#655bd4}.pill.failed{background:#fff0f2;color:#c97886}
.task-summary-item{background:#f8f9ff;border-color:#e5e8f3}.task-summary-item b{color:#655bd2}.task-list-head{background:#fbfcff;color:#99a3b4}.task-row:hover{background:#f8f9ff}.task-progress i{background:linear-gradient(90deg,#786be5,#7294e6)}
.detail-modal,.upload-modal,.login-card{border-radius:17px;box-shadow:0 20px 60px rgba(58,72,119,.18)}.upload-icon,.edit-hero-icon{background:linear-gradient(135deg,#ebe9ff,#e6f6ff);color:#655bd4}.drop-zone{background:#fbfaff;border-color:#dfdafe}.scroll-top-button{border:0;background:linear-gradient(135deg,#6f63e0,#6688e3);color:#fff;box-shadow:0 8px 20px rgba(101,96,213,.25)}.scroll-top-button:hover{color:#fff;box-shadow:0 10px 24px rgba(101,96,213,.32)}
@media(max-width:850px){.sidebar{width:70px}.main-content{margin-left:70px;width:calc(100% - 70px);padding:24px 18px 50px}}

.history-block{background:#fbfcff}.history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.history-head strong{display:block;color:#39415a;font-size:13px}.history-head small,.history-head>span{color:#9aa2b1;font-size:11px}.history-list{display:grid;gap:7px}.history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid #edf0f6;border-radius:9px;background:#fff}.history-row strong{display:block;color:#515b70;font-size:11px}.history-row p{margin:3px 0 0;color:#a0a7b4;font-size:10px}.history-row .ghost-button{flex:0 0 auto;height:28px;padding:0 10px}.history-empty{margin:0;color:#a0a7b4;font-size:11px;line-height:1.7}
.report-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.report-stat{padding:17px 18px;border:1px solid #edf0f6;border-radius:12px;background:#fff}.report-stat span{display:block;color:#8d96a7;font-size:11px}.report-stat strong{display:block;margin-top:7px;color:#3f4960;font-size:24px}.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.report-panel{min-height:170px;padding:16px;border:1px solid #edf0f6;border-radius:12px;background:#fbfcff}.report-panel h3{margin:0 0 14px;color:#4b556b;font-size:13px}.report-bars{display:grid;gap:10px}.report-bar-row{display:grid;grid-template-columns:minmax(60px,1fr) 1.6fr 22px;align-items:center;gap:8px;color:#778196;font-size:11px}.report-bar-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-bar-row>div{height:7px;overflow:hidden;border-radius:99px;background:#edf0f7}.report-bar-row i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#9b8ff0,#77b6d8)}.report-bar-row b{font-size:11px;text-align:right;color:#59647b}.report-empty{color:#a0a7b4;font-size:11px}@media(max-width:850px){.report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.report-grid{grid-template-columns:1fr}}

/* Add the publishing assistant's soft color layers so the workspace is not a flat white canvas. */
.sidebar{background:linear-gradient(180deg,#fbfbff 0%,#f7f9ff 100%)}.brand-mark,.login-card .brand-mark{background:linear-gradient(135deg,#dcd9ff 0%,#d7f2ff 100%);box-shadow:0 5px 12px rgba(105,98,216,.14)}.nav-item span{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#f0efff;color:#6f64d9;font-size:14px}.nav-item.active span{background:#fff;color:#665bd5;box-shadow:0 3px 8px rgba(96,88,207,.12)}
.main-content{background:radial-gradient(circle at 92% 0%,rgba(220,234,255,.7),transparent 28%),radial-gradient(circle at 8% 32%,rgba(235,229,255,.58),transparent 24%),linear-gradient(180deg,#f2f5fd 0%,#eef2fa 100%)}.topbar{padding:18px 21px;border:1px solid #e3e5f5;border-radius:18px;background:linear-gradient(105deg,#ebe8ff 0%,#f7f5ff 43%,#e0f6fb 100%);box-shadow:0 10px 25px rgba(89,95,173,.09)}.topbar h1{color:#26304b}.topbar .eyebrow{color:#665bd5}.top-actions .sync-status{color:#7d88a2}
.stat-card{border-color:transparent;box-shadow:0 9px 23px rgba(72,88,142,.1)}.stat-card:nth-child(1){background:linear-gradient(135deg,#fff 0%,#eef5ff 100%)}.stat-card:nth-child(2){background:linear-gradient(135deg,#fff 0%,#f2efff 100%)}.stat-card:nth-child(3){background:linear-gradient(135deg,#fff 0%,#eefaf7 100%)}.stat-card:nth-child(4){background:linear-gradient(135deg,#fff 0%,#fff6ea 100%)}.stat-card.accent{background:linear-gradient(135deg,#f5f2ff 0%,#e8eaff 100%);border-color:#d8d4ff;border-left:3px solid #7368df}.stat-card span{color:#7d89a1}.stat-card small{color:#9aa5b8}
.content-card{border-color:#e0e5f1;background:#fff;box-shadow:0 12px 30px rgba(68,83,136,.09)}.content-card>.section-head{background:linear-gradient(180deg,#fff 0%,#f8f9ff 100%)}.section-head{border-bottom:1px solid #edf0f6}.filters{background:#f8f9ff}.filters .search-box{background:#fff;box-shadow:0 2px 7px rgba(75,89,140,.035)}.filter-controls select{background:#fff}.filter-toggle{background:#fff}.table-wrap{background:#fff}.comfortable-table th,.wide-table th{background:#f3f6fd;color:#8793aa}.comfortable-table tbody tr:nth-child(even),.wide-table tbody tr:nth-child(even){background:#fcfdff}.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#f3f5ff}
.video-placeholder{background:linear-gradient(145deg,#e8eef8,#e0e6f3)!important;color:#6e7c94!important}.soft-label{background:#edf2f8}.review-pill{background:#f0efff}.pill.pending{background:#fff0d8}.pill.processing{background:#ebe9ff}.pagination-bar{background:#f8f9ff;border-top-color:#e7ebf4;padding:13px 12px;border-radius:0 0 12px 12px}.task-summary-item{background:#f1efff;border-color:#dedbff}.task-summary-item:nth-child(2n){background:#edf8f5;border-color:#d9efe8}.task-summary-item:nth-child(3n){background:#fff5e6;border-color:#f4e5c8}
.view-switcher{background:#eeeffb;border-color:#dfe1f1}.view-button.active{background:#fff;box-shadow:0 4px 10px rgba(79,87,152,.13)}.secondary-button{background:linear-gradient(135deg,#f0edff,#e9f2ff);border-color:#dfddff}.ghost-button{background:#fbfcff}.scroll-top-button{background:linear-gradient(135deg,#7569e7,#6d98e7)}
@media(max-width:850px){.topbar{padding:16px;border-radius:14px}}

/* Final palette pass: replace the washed-out gradients with solid pastel surfaces and clear hierarchy. */
body{background:#eef2f9}.sidebar{background:#f9faff}.brand-mark,.login-card .brand-mark{background:#dcd9ff;box-shadow:0 5px 12px rgba(105,98,216,.12)}.nav-item span{background:#eeedff;color:#6d63d8}.nav-item.active{background:#e9e7ff;border-color:#d8d3ff}.nav-item.active span{background:#fff}
.main-content{background:#eef2f9}.topbar{background:#e7e6fb;border-color:#d9d7f5;box-shadow:0 9px 22px rgba(75,80,143,.09)}.topbar .eyebrow{color:#6358ce}.primary-button{background:#6c62d8;box-shadow:0 6px 14px rgba(99,91,202,.2)}.primary-button:hover{background:#5c52c9}.secondary-button{background:#ebe9ff;border-color:#dcd8ff;color:#6158cb}.secondary-button:hover{background:#dfdcff}.scroll-top-button{background:#6b62d8;box-shadow:0 7px 18px rgba(91,85,193,.25)}
.stat-card{border:1px solid #e1e6f0;box-shadow:0 8px 20px rgba(72,88,142,.08)}.stat-card:nth-child(1){background:#edf5ff}.stat-card:nth-child(2){background:#f1efff}.stat-card:nth-child(3){background:#edf9f6}.stat-card:nth-child(4){background:#fff5e8}.stat-card.accent{background:#f1efff;border-color:#d8d2ff;border-left:3px solid #7166da}
.content-card{border-color:#dde4f0;box-shadow:0 10px 24px rgba(68,83,136,.08)}.content-card>.section-head{background:#f7f8ff}.filters{background:#f1f4fb}.filters .search-box{background:#fff}.filter-controls select,.filter-toggle{background:#fff}.comfortable-table th,.wide-table th{background:#eaf0fa;color:#7f8da5}.comfortable-table tbody tr:nth-child(even),.wide-table tbody tr:nth-child(even){background:#f9fbff}.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#f0f3ff}.video-placeholder{background:#e4ebf5!important;color:#697993!important}.task-list-head{background:#edf2fa}.task-summary-item{background:#eeecff;border-color:#dcd8ff}.task-summary-item:nth-child(2n){background:#eaf7f3;border-color:#d2ece3}.task-summary-item:nth-child(3n){background:#fff2df;border-color:#f2dfbc}.task-progress i{background:#7167da}.upload-icon,.edit-hero-icon{background:#e4e1ff;color:#6258cf}
.setting-note,.recommend-card,.task-detail-panel{background:#f4f6fc}.drop-zone{background:#f7f5ff}.case-card-media{background:#e8edf6}.detail-modal,.upload-modal,.login-card{box-shadow:0 18px 48px rgba(58,72,119,.16)}
#libraryView{border-top:3px solid #8175df}#tasksView{border-top:3px solid #79b9ae}#duplicatesView{border-top:3px solid #e6b16c}#recycleView{border-top:3px solid #96a8d2}#auditView{border-top:3px solid #8d9bdd}#backupView{border-top:3px solid #8ebf9d}#settingsView{border-top:3px solid #9b8ddd}

/* Analysis workbench: compact paged queue on the left, readable detail on the right. */
.task-workspace{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(340px,.95fr);gap:14px;padding:0 24px 24px;background:#f4f6fb}
.task-panel{min-width:0;border:1px solid #dfe5f0;border-radius:13px;background:#fff;overflow:hidden}
.task-list-panel{display:flex;flex-direction:column;min-height:520px}
.task-insight-panel{display:flex;flex-direction:column;min-height:520px}
.task-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e9edf4;background:#f8f9fd}
.task-panel-head strong{display:block;color:#35405b;font-size:13px}.task-panel-head small{display:block;margin-top:4px;color:#9aa4b5;font-size:10px}.task-panel-head>span{color:#9aa4b5;font-size:10px;white-space:nowrap}
.task-list-panel .task-list{max-height:calc(100vh - 410px);min-height:390px;overflow:auto;padding:0 12px;flex:1}
.task-list-panel .task-list-head,.task-list-panel .task-row{grid-template-columns:minmax(170px,1.55fr) 82px minmax(110px,1fr) 112px minmax(176px,auto);gap:10px}
.task-list-panel .task-list-head{padding:9px 8px;background:#f6f8fc}.task-list-panel .task-row{min-height:58px;padding:8px;border-bottom-color:#edf0f5}.task-row-actions{justify-content:flex-end;flex-wrap:nowrap;white-space:nowrap;gap:5px}.task-row-actions .row-action{white-space:nowrap;padding:5px 7px}
.task-pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-top:1px solid #e8ecf3;background:#fafbfe;color:#8d97a9;font-size:10px}.task-pagination-actions{display:flex;align-items:center;gap:8px}.task-pagination-actions label{display:flex;align-items:center;gap:4px}.task-pagination-actions select{height:28px;border:1px solid #e1e6ef;border-radius:7px;background:#fff;color:#606b80;font-size:10px;padding:0 5px}.task-pagination-actions .pagination-button{height:28px;padding:0 9px}
.task-insight-panel>.task-detail-panel{margin:0!important;border:0;border-radius:0;background:#fff;padding:16px;overflow:auto;flex:1}.task-detail-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:420px;text-align:center;color:#8d97aa}.task-detail-placeholder strong{margin-top:10px;color:#5a667b;font-size:13px}.task-detail-placeholder p{max-width:240px;margin:7px 0 0;color:#a1a9b8;font-size:11px;line-height:1.6}.task-placeholder-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#edf0fa;color:#7773cf;font-size:20px}
.audit-row{grid-template-columns:minmax(220px,1.7fr) 140px 120px 140px 52px}.audit-row>.row-action{justify-self:end}.row-action.danger{color:#c77884;border-color:#f0dce1;background:#fff8f9}.row-action.danger:hover{background:#ffeff2}
@media(max-width:1050px){.task-workspace{grid-template-columns:1fr}.task-insight-panel{min-height:0}.task-insight-panel>.task-detail-panel{min-height:300px}.task-list-panel .task-list{max-height:none}.task-list-panel .task-list-head,.task-list-panel .task-row{grid-template-columns:minmax(180px,1.6fr) 82px minmax(100px,1fr) 112px minmax(160px,auto)}}
@media(max-width:620px){.task-workspace{padding:0 16px 16px}.task-list-panel{min-height:0}.task-list-panel .task-list{min-height:0;padding:0 8px}.task-list-panel .task-list-head{display:none}.task-list-panel .task-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:11px 8px}.task-list-panel .task-progress-cell{grid-column:1/-1}.task-list-panel .task-row time{grid-column:1}.task-list-panel .task-row-actions{grid-column:2;grid-row:2}.task-pagination-bar{align-items:flex-start;flex-direction:column}.task-pagination-actions{width:100%;justify-content:space-between}.audit-row{grid-template-columns:1fr;gap:8px}.audit-row time{grid-column:auto;text-align:left}.audit-row>.row-action{justify-self:start}}

/* Refined visual hierarchy: brighter gradient header, clearer table rhythm, restrained color system. */
body{background:#f1f4fa;color:#2d3850}
.sidebar{background:#fbfcff;border-right-color:#dfe6f1;box-shadow:5px 0 24px rgba(67,83,128,.055)}
.nav-item:hover,.nav-item.active{background:linear-gradient(100deg,#eeeaff 0%,#eaf1ff 100%);border-color:#d8d8fa;color:#5d56c8}.nav-item.active{box-shadow:inset 3px 0 #7169e4,0 5px 14px rgba(95,91,201,.08)}
.main-content{background:#f1f4fa}
.topbar{background:linear-gradient(112deg,#f1edff 0%,#e9edff 48%,#def7f5 100%);border-color:#d9ddf6;box-shadow:0 12px 28px rgba(91,99,170,.12)}
.topbar h1{color:#25314b}.topbar .eyebrow{color:#6b5fe0}.sync-status{color:#7f8ba3}
.primary-button{background:linear-gradient(135deg,#7c70ea 0%,#6c91e7 100%);box-shadow:0 8px 18px rgba(105,98,218,.23)}.primary-button:hover{background:linear-gradient(135deg,#7165df 0%,#6184da 100%)}
.secondary-button{background:linear-gradient(135deg,#f2efff 0%,#eaf2ff 100%);border-color:#dddafa;color:#5d55c7}.secondary-button:hover{background:linear-gradient(135deg,#e9e5ff 0%,#e2edff 100%)}
.stats-grid{gap:15px}.stat-card{border-color:#dfe6f1;box-shadow:0 10px 24px rgba(70,87,132,.09)}.stat-card:nth-child(1){background:linear-gradient(135deg,#ffffff 0%,#edf5ff 100%)}.stat-card:nth-child(2){background:linear-gradient(135deg,#ffffff 0%,#f0edff 100%)}.stat-card:nth-child(3){background:linear-gradient(135deg,#ffffff 0%,#eefaf7 100%)}.stat-card:nth-child(4){background:linear-gradient(135deg,#ffffff 0%,#fff6eb 100%)}
.content-card{border-color:#d9e1ed;box-shadow:0 12px 28px rgba(68,83,136,.085)}.content-card>.section-head{background:#fbfcff;border-bottom-color:#e3e9f2}.section-head h2{color:#263550}.section-head p{color:#8995aa}
.filters{background:#f5f7fc;border-bottom-color:#e0e6f0}.filters .search-box{background:#fff;border-color:#dce4ef;box-shadow:0 3px 10px rgba(76,93,142,.05)}.filter-controls select,.filter-toggle{border-color:#dce3ee;background:#fff}.filter-controls select:focus{border-color:#9c94e8;box-shadow:0 0 0 3px rgba(116,105,226,.1)}
.table-wrap{border-top:1px solid #dfe5ef}.comfortable-table th,.wide-table th{background:#e7edf8;color:#6f7e99;border-bottom:1px solid #d7e0ed;font-weight:700}.comfortable-table td,.wide-table td{border-bottom-color:#e4eaf2}.comfortable-table tbody tr,.wide-table tbody tr{background:#fff}.comfortable-table tbody tr:nth-child(even),.wide-table tbody tr:nth-child(even){background:#f8faff}.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#edf3ff}.comfortable-table td+td,.wide-table td+td{border-left:1px solid #f0f3f8}
.cell-link,.inline-editable.title-link{color:#293954;font-weight:650}.topic-line{display:inline-block;padding:3px 7px;border-radius:6px;background:#f0eeff;color:#665ec7}.soft-label{background:#eaf0f7;color:#687791}.review-pill{background:#eeeaff;color:#5f58c4}.pill.pending{background:#fff0d7;color:#b77924}.pill.processing{background:#ebe8ff;color:#5d53c8}.pill.done{background:#e5f7ef;color:#398c6b}
.video-placeholder{background:#dfe8f4!important;color:#61718b!important;border:1px solid #d1dce9}.case-card-media .video-placeholder{background:#dfe8f4!important}
.pagination-bar{background:#f5f7fc;border-top-color:#dfe6f0}.view-switcher{background:#e8ecf7;border-color:#d8dfec}.view-button.active{background:#fff;color:#5f57c9;box-shadow:0 4px 12px rgba(79,87,152,.14)}

/* Bento-inspired palette: warm canvas, navy type, muted peach/blue/green/lilac blocks. */
body{background:#f7f7f5;color:#142b49}
.sidebar{background:#fffefd;border-right-color:#ebe9e5;box-shadow:5px 0 24px rgba(45,59,82,.045)}
.brand strong,.topbar h1,.section-head h2{color:#142b49}.brand span,.sidebar-bottom,.sidebar-bottom small{color:#8692a1}
.nav-item{color:#728096}.nav-item span{background:#f2f3f6;color:#6d7890}.nav-item:hover,.nav-item.active{background:#f0edff;border-color:#e2dcfb;color:#5c56bc}.nav-item.active span{background:#fff;color:#5c56bc}
.main-content{background:#f7f7f5;padding:32px 34px 64px}
.topbar{background:linear-gradient(110deg,#f3edff 0%,#edf1ff 52%,#e8f7f3 100%);border-color:#e3e1f2;border-radius:22px;box-shadow:0 12px 26px rgba(67,79,105,.08);padding:22px 24px}.topbar h1{font-size:27px;letter-spacing:-.4px}.topbar .eyebrow{color:#6e63c9}
.stats-grid{gap:16px;margin-bottom:24px}.stat-card{min-height:104px;border:0;border-radius:20px;box-shadow:0 10px 22px rgba(60,76,102,.07);padding:18px 20px}.stat-card:nth-child(1){background:#fff0ea}.stat-card:nth-child(2){background:#edf1ff}.stat-card:nth-child(3){background:#edf7f0}.stat-card:nth-child(4){background:#fff5e9}.stat-card span{color:#718096}.stat-card strong{color:#142b49;font-size:30px}.stat-card small{color:#8b96a4}
.content-card{border:0;border-radius:22px;box-shadow:0 12px 28px rgba(60,76,102,.065);background:#fffefd}.content-card>.section-head{padding:24px 26px 18px;background:#fffefd;border-bottom:1px solid #f0efec}.section-head p{color:#8d98a5}
.filters{padding:16px 26px 20px;background:#fffefd;border-bottom:1px solid #efefed}.filters .search-box{background:#fbfbfa;border-color:#e7e8e8;border-radius:12px}.filter-controls select,.filter-toggle{border-color:#e5e7e8;border-radius:10px;background:#fff}.filter-toggle.active{background:#f0edff;border-color:#ded8fa;color:#5d56bc}
.table-wrap{border-top:0}.comfortable-table th,.wide-table th{background:#eaf0fb;color:#5f708b;border-bottom-color:#dce5f2;padding-top:13px;padding-bottom:13px}.comfortable-table td,.wide-table td{border-bottom-color:#eceeec;color:#52627a}.comfortable-table tbody tr,.wide-table tbody tr{background:#fffefd}.comfortable-table tbody tr:nth-child(even),.wide-table tbody tr:nth-child(even){background:#fbfaf8}.comfortable-table tbody tr:hover,.wide-table tbody tr:hover{background:#f0f4ff}.cell-link,.inline-editable.title-link{color:#142b49}.topic-line{background:#f1edff;color:#6259bb}.soft-label{background:#edf2f8;color:#63728a}.review-pill{background:#f0edff;color:#5e56b9}.video-placeholder{background:#e9edf2!important;color:#68778d!important;border:0}
.case-grid{gap:24px;padding:24px 26px}.case-card{border:0;border-radius:20px;box-shadow:0 10px 22px rgba(60,76,102,.07);background:#fffefd}.case-card:nth-child(4n+1){background:#fff1eb}.case-card:nth-child(4n+2){background:#edf1ff}.case-card:nth-child(4n+3){background:#eef7f0}.case-card:nth-child(4n){background:#f4efff}.case-card-media{border-radius:14px;background:#f1f1ef}.case-card:hover{box-shadow:0 14px 28px rgba(60,76,102,.11);transform:translateY(-2px)}
.pagination-bar{background:#fbfaf8;border-top-color:#ebece9;padding:15px 18px;border-radius:0 0 22px 22px}.primary-button{background:linear-gradient(135deg,#7569d8 0%,#6688d6 100%);border-radius:12px}.secondary-button{background:#f0edff;border-color:#e0dafa;color:#5c56bc}.ghost-button{background:#fffefd;border-color:#e3e5e5;color:#65748a}
.task-workspace{background:#f7f7f5;padding:0 26px 26px;gap:18px}.task-panel{border:0;border-radius:18px;box-shadow:0 8px 20px rgba(60,76,102,.06)}.task-panel-head{background:#f1edff;border-bottom-color:#e6e0fa}.task-list-panel .task-list-head{background:#eaf0fb}.task-insight-panel{background:#eef7f0}.task-insight-panel>.task-detail-panel{background:#eef7f0}.task-detail-placeholder{color:#82908e}
.audit-row,.backup-row,.duplicate-card,.recycle-row{border:0;border-radius:16px;box-shadow:0 6px 16px rgba(60,76,102,.045);background:#fffefd}.audit-row:nth-child(4n+1){background:#fff4ed}.audit-row:nth-child(4n+2){background:#f0f3ff}.audit-row:nth-child(4n+3){background:#f0f8f2}.audit-row:nth-child(4n){background:#f5f0ff}.audit-action{color:#5f56ba}.backup-location{background:#eef1ff;border-color:#e1e5f8}.drop-zone{background:#fff1eb;border-color:#f2d5c6}
@media(max-width:850px){.main-content{padding:24px 18px 50px}.topbar{border-radius:18px}.content-card{border-radius:18px}}

/* Keep the existing layout: the palette above changes color only, not geometry or spacing. */

/* 文案生成工坊：输入、模板和结果分区，避免长页面堆叠 */
#creativeView{border-top:3px solid #7d70e7}
.creative-security-badge{padding:7px 10px;border:1px solid #d8eee5;border-radius:999px;background:#effbf6;color:#16845d;font-size:10px;font-weight:700}
.creative-studio-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:16px;padding:18px 22px 16px}
.creative-input-panel,.creative-settings-panel,.creative-results-panel{min-width:0;border:1px solid #e1e8f1;border-radius:14px;background:#fbfcff;padding:16px}
.creative-panel-title,.creative-results-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}.creative-panel-title strong,.creative-results-head strong{display:block;color:#304969;font-size:14px}.creative-panel-title small,.creative-results-head small{display:block;margin-top:5px;color:#8a99ac;font-size:10px;line-height:1.55}.creative-panel-title>span{color:#786bd5;font-size:11px;font-weight:700;white-space:nowrap}
.creative-field{display:grid;gap:6px;margin-top:10px;color:#657792;font-size:11px}.creative-field input,.creative-field textarea,.creative-generation-settings input,.creative-generation-settings select{width:100%;box-sizing:border-box;border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#33415a;padding:9px 10px;font:inherit;outline:0}.creative-field textarea{resize:vertical;line-height:1.6}.creative-field input:focus,.creative-field textarea:focus,.creative-generation-settings input:focus,.creative-generation-settings select:focus{border-color:#a59cf0;box-shadow:0 0 0 3px rgba(125,112,231,.1)}
.creative-source-status{margin-top:9px;padding:8px 10px;border-radius:8px;background:#f3f1ff;color:#6a5bca;font-size:10px;line-height:1.5}
.creative-template-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:9px}.creative-template-tools span{margin-left:auto;color:#8a99ac;font-size:10px}.creative-template-list{display:grid;gap:7px;max-height:310px;overflow:auto;padding:2px}.creative-template-option{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid #e0e7f0;border-radius:9px;background:#fff;cursor:pointer}.creative-template-option.selected{border-color:#aaa0ef;background:#faf9ff}.creative-template-option input{margin-top:2px;accent-color:#7167da}.creative-template-option strong{display:block;color:#3d5270;font-size:11px}.creative-template-option small{display:block;margin-top:4px;color:#8a99ac;font-size:10px;line-height:1.4}
.creative-generation-settings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.creative-generation-settings label{display:grid;gap:5px;color:#657792;font-size:10px}.creative-generation-settings input,.creative-generation-settings select{padding:8px 7px}.creative-generate-button{width:100%;margin-top:13px}.creative-results-panel{margin:0 22px 22px;background:#fff}.creative-results-head{padding-bottom:11px;border-bottom:1px solid #e9edf4}.creative-results-head select{min-width:210px;height:32px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:#52627b;font-size:10px}.creative-result-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:580px;overflow:auto;padding:13px 2px 2px}.creative-result-card{min-width:0;padding:13px;border:1px solid #e1e8f1;border-radius:11px;background:#fbfcff}.creative-result-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.creative-result-index{display:block;color:#304969;font-weight:700;font-size:12px}.creative-result-card-head small{display:block;margin-top:5px;color:#8a99ac;font-size:10px}.creative-result-card pre{max-height:240px;overflow:auto;margin:11px 0 9px;padding:10px;border:1px solid #e6eaf2;border-radius:8px;background:#fff;color:#4e6380;font:11px/1.7 "Microsoft YaHei",sans-serif;white-space:pre-wrap}.creative-boundary-tags{display:flex;gap:6px;flex-wrap:wrap}.creative-boundary-tags span{padding:4px 7px;border-radius:6px;font-size:10px}.creative-boundary-tags .direct{background:#effbf6;color:#16845d}.creative-boundary-tags .adapt{background:#fff8ed;color:#ad751b}.creative-boundary-tags .confirm{background:#fff1f2;color:#b45e6d}.creative-adaptation{margin:8px 0 0;color:#74859b;font-size:10px;line-height:1.5}.creative-empty{padding:34px 12px;color:#93a0b0;font-size:11px;text-align:center}.creative-result-list>.creative-empty{grid-column:1/-1}
.creative-results-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.creative-results-actions span{padding:7px 8px;border-radius:7px;background:#f3f1ff;color:#6a5bca;font-size:10px;font-weight:700}.creative-result-card{cursor:pointer}.creative-result-card.selected{border-color:#8f82ee;background:#faf9ff;box-shadow:0 0 0 2px rgba(125,112,231,.12)}.creative-result-title-line{display:flex;align-items:flex-start;gap:8px}.creative-result-title-line input{margin-top:2px;accent-color:#7167da}.creative-facts{margin:8px 0 0;padding:7px 8px;border-left:3px solid #a89ef0;background:#f6f4ff;color:#6659b8;font-size:10px;line-height:1.5}
@media(max-width:1000px){.creative-studio-grid{grid-template-columns:1fr}.creative-result-list{grid-template-columns:1fr}}
@media(max-width:620px){.creative-studio-grid{padding:12px}.creative-results-panel{margin:0 12px 12px}.creative-generation-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.creative-results-head{flex-direction:column}.creative-results-head select{width:100%}}
.main-content{padding:28px 32px 56px}
.topbar{border-radius:18px;padding:18px 21px}
.stats-grid{gap:13px;margin-bottom:20px}.stat-card{min-height:0;border-radius:15px;padding:16px 18px}
.content-card{border-radius:15px}.content-card>.section-head{padding:21px 22px 16px}
.filters{padding:0 24px 18px}.case-grid{padding:22px;gap:16px}.case-card{border:1px solid #e5e7e8;border-radius:12px}.case-card-media{border-radius:0}
.pagination-bar{padding:13px 12px;border-radius:0 0 12px 12px}.primary-button{border-radius:10px}
.task-workspace{padding:0 24px 24px;gap:14px}.task-panel{border:1px solid #dfe5f0;border-radius:13px}
@media(max-width:850px){.main-content{padding:24px 18px 50px}.topbar{padding:16px;border-radius:14px}.content-card{border-radius:14px}}

/* Color-only gradient finish: bright, soft, and low saturation. */
body{background:linear-gradient(180deg,#f8f9fc 0%,#f3f6fb 100%)}.main-content{background:linear-gradient(180deg,#f7f8fd 0%,#f2f5fb 100%)}
.nav-item:hover,.nav-item.active{background:linear-gradient(100deg,#f0edff 0%,#e9f1ff 100%)}
.topbar{background:linear-gradient(112deg,#f4efff 0%,#ebefff 50%,#e5f8f3 100%)}
.stat-card:nth-child(1){background:linear-gradient(135deg,#fffefd 0%,#fff0ea 100%)}.stat-card:nth-child(2){background:linear-gradient(135deg,#fffefd 0%,#edf1ff 100%)}.stat-card:nth-child(3){background:linear-gradient(135deg,#fffefd 0%,#edf7f0 100%)}.stat-card:nth-child(4){background:linear-gradient(135deg,#fffefd 0%,#fff5e9 100%)}
.content-card{background:linear-gradient(180deg,#fffefd 0%,#fbfcff 100%)}.content-card>.section-head{background:linear-gradient(180deg,#fffefd 0%,#f8f9fd 100%)}.filters{background:linear-gradient(180deg,#fffefd 0%,#f7f8fc 100%)}
.case-card:nth-child(4n+1){background:linear-gradient(145deg,#fffefd 0%,#fff1eb 100%)}.case-card:nth-child(4n+2){background:linear-gradient(145deg,#fffefd 0%,#edf1ff 100%)}.case-card:nth-child(4n+3){background:linear-gradient(145deg,#fffefd 0%,#eef7f0 100%)}.case-card:nth-child(4n){background:linear-gradient(145deg,#fffefd 0%,#f4efff 100%)}
.primary-button{background:linear-gradient(135deg,#7d70e7 0%,#6f94e7 100%)}.secondary-button{background:linear-gradient(135deg,#f2efff 0%,#eaf2ff 100%)}

/* Empty media state: visible enough to scan, still soft and light. */
.video-placeholder,.case-card-media .video-placeholder{background:linear-gradient(145deg,#eef4fb 0%,#dce8f5 100%)!important;color:#5d7491!important;border:1px solid #cddbeb!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.video-placeholder.case-upload-drop{border:1px dashed #b9cde3!important;background:linear-gradient(145deg,#edf4fc 0%,#d9e7f5 100%)!important;color:#587291!important}.video-placeholder.case-upload-drop small{color:#7890a9!important}

/* Type chips: distinguish categories with pale fills only. */
.type-chip{border:1px solid transparent;font-weight:600}.game-tone-0{background:#eaf2ff;color:#5574a5;border-color:#dce8fb}.game-tone-1{background:#e9f7f4;color:#4d8a80;border-color:#d5eee8}.game-tone-2{background:#f1edff;color:#6c61ad;border-color:#e3dcfb}.game-tone-3{background:#eef5f8;color:#5f8191;border-color:#dcebef}.game-tone-4{background:#f4f0ff;color:#7d6bb5;border-color:#e7defb}.game-tone-5{background:#edf6ff;color:#5f7fa7;border-color:#dceafa}
.case-tone-0{background:#fff0e9;color:#a76d52;border-color:#f8dfd2}.case-tone-1{background:#fff6e5;color:#9c7b46;border-color:#f4e7c6}.case-tone-2{background:#edf7f0;color:#568166;border-color:#dceee1}.case-tone-3{background:#f1edff;color:#6f62a8;border-color:#e3dcf8}.case-tone-4{background:#edf3ff;color:#5c79a4;border-color:#dce7f9}.case-tone-5{background:#f6efff;color:#8469aa;border-color:#eadff7}
.case-card-meta .type-chip{display:inline-block;padding:4px 7px;border-radius:6px;font-size:10px;line-height:1.1}

/* Card mode: give each case enough breathing room while leaving table mode unchanged. */
.case-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;padding:22px}
.case-card{min-width:0;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(145deg,#fffefd 0%,#f5f7fc 100%)}
.case-card-media{height:160px;flex:0 0 160px}
.case-card-body{min-width:0;flex:1;padding:15px 16px 16px;gap:11px}
.case-card-top{color:#7d899c;font-size:11px}
.case-card-top span:first-child{color:#566983;font-weight:650}
.case-card .card-field>span{display:block;margin-bottom:5px;color:#8c98aa;font-size:10px}
.case-card .card-title-field h3{min-height:38px;line-height:1.45;color:#243754;font-size:14px}
.case-card .card-topic-field .topic-line{display:block;min-height:30px;padding:6px 8px;background:rgba(241,237,255,.72);border:1px solid rgba(224,217,250,.7);line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.case-card-body>p{min-height:38px;margin:0;color:#6e7b8e;font-size:11px;line-height:1.6}
.case-card-meta{padding-top:2px}
.case-card-foot{margin-top:auto;padding-top:10px;border-top:1px solid rgba(219,225,234,.78)}
@media(max-width:1400px){.case-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.case-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.case-grid{grid-template-columns:1fr;gap:14px;padding:16px}.case-card-media{height:170px;flex-basis:170px}}

/* Key analysis blocks: one soft semantic color per field, with the same geometry. */
.detail-grid .key-block{box-shadow:inset 0 3px 0 rgba(112,128,151,.18)}
.detail-grid .key-copy{background:linear-gradient(135deg,#fffaf4 0%,#fffefd 100%);border-color:#f0dfcf;box-shadow:inset 0 3px 0 #e5b189}
.detail-grid .key-summary{background:linear-gradient(135deg,#f4f7ff 0%,#fffefd 100%);border-color:#dce6f7;box-shadow:inset 0 3px 0 #9db9e8}
.detail-grid .key-hook{background:linear-gradient(135deg,#f7f2ff 0%,#fffefd 100%);border-color:#e6dcfa;box-shadow:inset 0 3px 0 #b9a7e8}
.detail-grid .key-structure{background:linear-gradient(135deg,#f1fbfa 0%,#fffefd 100%);border-color:#d8eee9;box-shadow:inset 0 3px 0 #8dc9bc}
.detail-grid .key-highlights{background:linear-gradient(135deg,#fff9eb 0%,#fffefd 100%);border-color:#f2dfb8;box-shadow:inset 0 3px 0 #e5b466}
.detail-grid .key-reusable{background:linear-gradient(135deg,#f2faf3 0%,#fffefd 100%);border-color:#d9ecdc;box-shadow:inset 0 3px 0 #96c39c}
.detail-grid .key-template{background:linear-gradient(135deg,#f4f1ff 0%,#fffefd 100%);border-color:#ddd5f6;box-shadow:inset 0 3px 0 #9f8de0}
.detail-grid .key-block label{color:#718096}
.detail-grid .key-block p{color:#3e506b}
.detail-grid .key-block>label{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.template-preview-text{margin-bottom:7px!important;line-height:1.7;max-height:3.4em;overflow:hidden}
.template-expand{display:inline-flex;align-items:center;border:0;background:transparent;color:#6d62b8;font-size:11px;line-height:1.4;cursor:pointer;padding:0}
.template-expand:hover{text-decoration:underline}
.template-notes{display:block;margin-top:10px;padding:8px 10px;border-radius:8px;background:rgba(255,255,255,.68);color:#6f6f87;font-size:11px;line-height:1.6;white-space:normal}
.template-notes summary{cursor:pointer;color:#7c6bb8;font-size:10px;font-weight:600;list-style:none}
.template-notes summary::-webkit-details-marker{display:none}
.template-notes p{margin:6px 0 0;white-space:pre-wrap}
.edit-template-field textarea{background:#f9f7ff;border-color:#ddd5f6}
.edit-template-field textarea:focus{border-color:#9f8de0;box-shadow:0 0 0 3px rgba(159,141,224,.13)}
.detail-label-actions{display:inline-flex;align-items:center;gap:8px}
.detail-copy-button{flex:0 0 auto;border:1px solid #d7def0;border-radius:7px;background:#fff;color:#6478a0;font-size:11px;line-height:1;padding:5px 9px;cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease}
.detail-copy-button:hover{background:#eef3ff;border-color:#aebfe5;color:#465f91}
.detail-copy-button:disabled{cursor:not-allowed;opacity:.45;background:#f7f8fb;color:#99a5b8}
.detail-grid .key-highlights>label em{font-size:10px;font-style:normal;font-weight:600;color:#b18436;background:#fff0c8;border:1px solid #f0d99d;border-radius:999px;padding:3px 7px}

/* Mouse drag selection works across table and card layouts without hijacking controls. */
.selection-marquee{position:fixed;z-index:1400;pointer-events:none;border:1px solid #7b78df;background:rgba(123,120,223,.12);border-radius:5px;box-shadow:0 0 0 1px rgba(255,255,255,.72) inset}
.douyin-preview-card[data-douyin-item-card]{cursor:pointer}.douyin-preview-card[data-douyin-item-card] input,.douyin-preview-card[data-douyin-item-card] textarea,.douyin-preview-card[data-douyin-item-card] select,.douyin-preview-card[data-douyin-item-card] button,.douyin-preview-card[data-douyin-item-card] a,.douyin-preview-card[data-douyin-item-card] video{cursor:default}
body.is-box-selecting{user-select:none;cursor:crosshair}
body.is-box-selecting *{user-select:none!important}
[data-case-select].box-selected{outline:2px solid #8179df;outline-offset:-2px;background-color:rgba(235,232,255,.42)}
.case-card.box-selected{box-shadow:0 0 0 2px #8179df,0 9px 24px rgba(99,91,190,.13)}
.case-table tr.box-selected>td{background:rgba(235,232,255,.38)}

/* Filters: keep the search field full width, but make the dropdown toolbar compact. */
.filter-controls{display:flex;align-items:center;flex-wrap:nowrap;gap:8px}
.filter-controls select{width:auto;min-width:0;flex:0 1 178px;height:36px}
.filter-controls select#statusFilter{flex-basis:154px}
.filter-controls .filter-toggle{flex:0 0 auto}
.filter-controls .filter-reset{flex:0 0 auto}
@media(max-width:1050px){.filter-controls{flex-wrap:wrap}.filter-controls select{flex:1 1 160px}}
@media(max-width:620px){.filter-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.filter-controls select,.filter-controls .filter-toggle,.filter-controls .filter-reset{width:100%}.filter-controls .filter-reset{grid-column:1/-1;text-align:center}}

/* Statistics stay selectable for copying without adding another control. */
.stat-card-head{display:flex;align-items:center;min-width:0}
.stat-card strong,.stat-card small,.stat-card-head>span{user-select:text;caret-color:transparent;cursor:default}
.stat-card,.stat-card strong,.stat-card small,.stat-card-head{user-select:none}

/* Search and actions: a brighter control strip with clear but restrained roles. */
.filters .search-box{position:relative;height:44px;border:1px solid #d8e2f0;border-radius:12px;background:linear-gradient(135deg,#ffffff 0%,#f4f7ff 100%);box-shadow:0 4px 12px rgba(93,116,165,.08)}
.filters .search-box:focus-within{border-color:#8e88e5;box-shadow:0 0 0 3px rgba(116,105,226,.12),0 6px 16px rgba(93,116,165,.1)}
.filters .search-box>span{color:#687ca0}
.filters .search-box input{color:#273b5b}
.filters .search-box input::placeholder{color:#94a0b2}
.search-clear{width:25px;height:25px;border:0;border-radius:50%;background:#e8eef8;color:#60728e;font-size:17px;line-height:1;cursor:pointer}
.search-clear:hover{background:#dbe5f3;color:#405675}
.filter-controls select{border-color:#d5dfed;background:#fff;color:#4f6280;box-shadow:0 2px 6px rgba(83,105,148,.04)}
.filter-controls select:focus{border-color:#8e88e5;box-shadow:0 0 0 3px rgba(116,105,226,.1)}
.filter-controls .favorite-filter{background:#fff8ea;border-color:#f0dfbe;color:#a5792e}
.filter-controls .favorite-filter:hover,.filter-controls .favorite-filter.active{background:#fff0d1;border-color:#e9c982;color:#986b1f}
.filter-controls .featured-filter{background:#f3efff;border-color:#dfd5fa;color:#6d5ab7}
.filter-controls .featured-filter:hover,.filter-controls .featured-filter.active{background:#e9e1ff;border-color:#cfc0f3;color:#5b49a8}
.filter-controls .filter-advanced-trigger{background:#eef7f5;border-color:#d2eae3;color:#4b8879}
.filter-controls .filter-advanced-trigger:hover,.filter-controls .filter-advanced-trigger.active{background:#def1eb;border-color:#b9ded3;color:#397667}
.filter-controls .filter-reset{color:#69809f;border-radius:8px;padding:7px 8px}
.filter-controls .filter-reset:hover{background:#edf3fb;color:#4d6585}
.section-actions .ghost-button{background:#f7f9fd;border-color:#d8e2ef;color:#5f718d}
.section-actions .ghost-button:hover{background:#edf3fb;border-color:#c4d3e7;color:#425e83}
.section-actions .secondary-button{background:linear-gradient(135deg,#eee9ff 0%,#e7f0ff 100%);border:1px solid #d8d3fa;color:#5f55bf}
.section-actions .danger-button,.danger-button{background:#fff0f1;border:1px solid #f1d3d8;color:#bd6573}
.section-actions .primary-button{background:linear-gradient(135deg,#7669df 0%,#5e9bdd 100%);color:#fff}

/* Text remains selectable in every case layout, including button-like titles. */
.case-table th,.case-table td,.case-table .inline-editable,.case-grid .case-card-body,.compact-row,.compact-row .cell-link,.compact-copy{user-select:text}
.case-table .check-col,.case-table .media-col,.case-card-media,.card-check,.card-marks{user-select:none}

/* Settings cards: one quiet tint per section so the large form is easier to scan. */
.settings-layout>.setting-panel{border-color:#dfe6f0;box-shadow:0 7px 18px rgba(69,91,133,.05)}
.settings-layout>.setting-panel:nth-child(1){background:linear-gradient(135deg,#f2f6ff 0%,#fbfcff 100%);border-color:#d8e4f6}
.settings-layout>.setting-panel:nth-child(2){background:linear-gradient(135deg,#fff8ef 0%,#fffefd 100%);border-color:#f0dfc9}
.settings-layout>.setting-panel:nth-child(3){background:linear-gradient(135deg,#f0faf7 0%,#fffefd 100%);border-color:#d6ece4}
.settings-layout>.setting-panel:nth-child(4){background:linear-gradient(135deg,#f7f3ff 0%,#fffefd 100%);border-color:#e3dafa}
.settings-layout>.setting-panel:nth-child(5){background:linear-gradient(135deg,#f5f8fc 0%,#fffefd 100%);border-color:#dfe7f0}
.settings-layout>.setting-panel:nth-child(6){background:linear-gradient(135deg,#fff8f1 0%,#fffefd 100%);border-color:#f0dfd0}
.settings-layout>.setting-panel .panel-title h3{color:#253b59}
.settings-layout>.setting-panel .panel-title p,.settings-layout>.setting-panel .setting-help{color:#7e8da3}

/* Audit rows keep the pastel rhythm but no longer alternate with strong full-row colors. */
.audit-row,.audit-row:nth-child(n){background:#fffefd;border:1px solid #e3e8f0;border-left:3px solid #c7d5e8;box-shadow:0 5px 14px rgba(67,86,120,.04)}
.audit-row:nth-child(4n+1){border-left-color:#d7bf9d}.audit-row:nth-child(4n+2){border-left-color:#b9c9e7}.audit-row:nth-child(4n+3){border-left-color:#b9d9ca}.audit-row:nth-child(4n){border-left-color:#cbbce6}
.audit-action{color:#5f6f8a}.audit-event strong{color:#53647d}

/* Comfortable spacing for long-form settings and operational pages. */
.settings-layout{gap:20px;padding:18px 24px 30px}
.settings-layout>.setting-panel{padding:22px}
.settings-layout>.setting-panel .panel-title{margin-bottom:20px}
.settings-layout>.setting-panel .form-stack{gap:14px}
.settings-layout>.setting-panel .form-row{gap:16px}
.settings-layout>.setting-panel .setting-help{margin-top:4px;line-height:1.7}
.settings-layout{margin-top:0}
#settingsView>.section-head{padding:27px 26px 23px;background:linear-gradient(180deg,#fffefd 0%,#f7f8fd 100%);border-bottom:1px solid #dfe6f0}
#settingsView>.section-head h2{margin-bottom:8px;font-size:20px;color:#213957}
#settingsView>.section-head p{line-height:1.7;color:#8190a5}

/* COS migration console */
#cosView>.cos-page-head{padding:24px 26px 20px;background:linear-gradient(135deg,#f8fbff 0%,#f7f5ff 56%,#effaf7 100%);border-bottom:1px solid #e4eaf4}
.cos-page-head h2{font-size:22px!important;letter-spacing:.2px;margin-bottom:7px!important;color:#203858!important}
.cos-page-head p{font-size:12px;line-height:1.6;color:#8190a5}
.cos-head-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.cos-head-status .sync-status{font-weight:700;color:#697b96}
.cos-console{padding:18px 24px 30px;display:grid;gap:16px}
.cos-connection,.cos-progress-panel,.cos-results-panel{border:1px solid #dfe7f2;border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(67,86,120,.05)}
.cos-connection{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 22px;background:linear-gradient(120deg,#f4f8ff 0%,#fbfcff 60%,#f3fbf7 100%)}
.cos-eyebrow{display:block;color:#7282a0;font-size:9px;letter-spacing:1.6px;font-weight:800;margin-bottom:6px}
.cos-connection h3,.cos-progress-panel h3,.cos-results-panel h3{font-size:14px;color:#243b5b;margin:0 0 6px}
.cos-connection p,.cos-progress-panel p,.cos-results-panel p{margin:0;color:#8290a5;font-size:11px;line-height:1.6}
.cos-paths{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.cos-paths span{display:grid;gap:5px;padding:9px 11px;border:1px solid #e1e8f2;border-radius:9px;background:rgba(255,255,255,.8);min-width:125px}
.cos-paths b{font-size:10px;color:#8795aa}.cos-paths code{font-size:11px;color:#4e6790}
.cos-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.cos-stat{padding:16px 17px;border:1px solid #dfe7f2;border-radius:13px;background:linear-gradient(145deg,#fff,#f3f7fd);box-shadow:0 7px 18px rgba(67,86,120,.04)}
.cos-stat.success{background:linear-gradient(145deg,#fff,#effaf5);border-color:#d8ece2}.cos-stat.violet{background:linear-gradient(145deg,#fff,#f5f1ff);border-color:#e4daf5}.cos-stat.orange{background:linear-gradient(145deg,#fff,#fff6ea);border-color:#f0e0c8}
.cos-stat span{display:block;color:#7b8aa1;font-size:11px}.cos-stat strong{display:block;margin:7px 0 4px;color:#263d5e;font-size:27px;line-height:1}.cos-stat small{color:#9aa7b8;font-size:10px}
.cos-progress-panel{padding:18px 20px}.cos-progress-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.cos-progress-top>strong{font-size:22px;color:#6a63d8}.cos-progress-track{height:12px;margin-top:14px;background:#edf1f6;border-radius:99px;overflow:hidden}.cos-progress-track i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#6d65d8,#6e99e5,#53b990);transition:width .35s ease}
.cos-results-panel{overflow:hidden}.cos-results-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:17px 20px;border-bottom:1px solid #edf1f6}.cos-results-table{padding:0 12px 12px}.cos-row{display:grid;grid-template-columns:minmax(220px,1.5fr) 110px 110px minmax(120px,1fr);gap:12px;align-items:center;padding:12px 10px;border-bottom:1px solid #eef2f6;color:#5d6e88;font-size:11px}.cos-row:last-child{border-bottom:0}.cos-row-head{padding-top:14px;color:#8795aa;font-weight:700;background:#fbfcff}.cos-case-name{font-weight:700;color:#344b6d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cos-media-state{display:inline-flex;justify-content:center;padding:5px 8px;border-radius:6px;font-size:10px;font-weight:700;background:#f3f5f8;color:#8794a5}.cos-media-state.is-ok{background:#e8f7ef;color:#1b9c6c}.cos-media-state.is-bad{background:#fff0f0;color:#c46c76}.cos-media-state.is-wait{background:#fff6e6;color:#c18a40}.cos-row-status{color:#7f8da1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cos-migration-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid #edf1f6;background:#fbfcff}
.cos-summary-chip{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border:1px solid #e0e6ef;border-radius:7px;background:#fff;color:#6f7f96;font-size:10px;font-weight:700;white-space:nowrap}
.cos-summary-chip.ok{border-color:#d4eadf;background:#f0faf5;color:#26956c}.cos-summary-chip.warn{border-color:#f0dfbd;background:#fff8eb;color:#b27b31}.cos-summary-chip.bad{border-color:#efd0d4;background:#fff3f4;color:#bd6570}
.cos-details{margin:12px 20px 16px;border:1px solid #e3e8f1;border-radius:10px;background:#fff;overflow:hidden}
.cos-details summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;padding:0 12px;color:#5e7190;font-size:11px;font-weight:700;cursor:pointer;list-style:none;user-select:none}
.cos-details summary::-webkit-details-marker{display:none}.cos-details summary::after{content:"展开";color:#8d9bb0;font-size:10px;font-weight:500}.cos-details[open] summary{border-bottom:1px solid #edf1f6;background:#fafbfe}.cos-details[open] summary::after{content:"收起"}
.cos-details .cos-results-table{max-height:360px;overflow:auto;padding:0 10px 10px}.cos-details .cos-row-head{position:sticky;top:0;z-index:1}
.app-dialog-overlay{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:20px;background:rgba(34,48,74,.34);backdrop-filter:blur(4px)}
.app-dialog-overlay.hidden{display:none}.app-dialog{width:min(440px,calc(100vw - 32px));padding:22px 22px 18px;border:1px solid #dce4f0;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(30,47,80,.24);animation:app-dialog-in .16s ease-out}
.app-dialog-content{display:grid;gap:8px}.app-dialog-icon{display:grid;place-items:center;width:32px;height:32px;margin-bottom:12px;border-radius:10px;background:#eeefff;color:#665bd0;font-weight:800}.app-dialog h3{margin:0;color:#263d5d;font-size:16px}.app-dialog p{margin:0;color:#6f8098;font-size:12px;line-height:1.7;white-space:pre-wrap}.app-dialog-input{width:100%;height:38px;margin-top:6px;padding:0 10px;border:1px solid #dbe3ef;border-radius:9px;outline:0;color:#344a68;font-size:12px}.app-dialog-input:focus{border-color:#8175df;box-shadow:0 0 0 3px rgba(129,117,223,.12)}.app-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.app-dialog-actions button{min-width:76px;height:34px;border-radius:9px;font-size:12px}@keyframes app-dialog-in{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:850px){.cos-connection{align-items:flex-start;flex-direction:column}.cos-paths{justify-content:flex-start}.cos-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cos-row{grid-template-columns:minmax(130px,1fr) 82px 82px 100px;gap:7px}}
@media(max-width:620px){.cos-results-head{align-items:flex-start;flex-direction:column;padding:15px 16px}.cos-migration-summary{padding:10px 16px}.cos-details{margin:10px 16px 14px}.cos-details .cos-results-table{max-height:300px;padding:0 6px 8px}.cos-row{grid-template-columns:minmax(120px,1fr) 68px 68px 82px;padding:10px 6px;font-size:10px}.cos-media-state{padding:4px 5px;font-size:9px}.cos-details summary{padding:0 10px}}
.backup-list{gap:14px;padding:0 24px 28px}
.backup-row{min-height:72px;padding:18px 20px;border-radius:14px}
.backup-row-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.backup-type-label{color:#6d5bc7;font-weight:600}.permission-modal{width:min(720px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 32px));overflow:auto}.permission-section{padding:16px 0;border-top:1px solid #edf0f5}.permission-section h4{margin:0 0 11px;color:#334563;font-size:13px}.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.permission-check{display:flex;align-items:center;gap:8px;min-height:38px;padding:8px 10px;border:1px solid #e4e8f0;border-radius:9px;background:#fbfcfe;color:#59677d;font-size:12px;cursor:pointer}.permission-check:hover{border-color:#c9c4f4;background:#f7f5ff}.permission-check input{accent-color:#7369df}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}.modal-head p{margin:5px 0 0;color:#8b97aa;font-size:11px}@media(max-width:760px){.permission-grid{grid-template-columns:1fr 1fr}.backup-row-actions{width:100%}.backup-row-actions button{flex:1}}@media(max-width:460px){.permission-grid{grid-template-columns:1fr}}
.audit-list{gap:12px;padding:0 24px 28px}
.audit-row{min-height:68px;padding:15px 17px}
.task-workspace{gap:18px;padding:0 24px 30px}
.task-panel-head{padding:17px 18px}
.task-list-panel .task-list{padding:0 16px}
.task-list-panel .task-row{min-height:66px;padding:11px 9px}

/* Shared page rhythm: keep every page header visually separated from its first content block. */
#tasksView>.task-workspace{padding-top:18px}
#libraryView>.filters{padding-top:14px}
#duplicatesView>.duplicate-list,
#recycleView>.recycle-list,
#auditView>.audit-list,
#backupView>.backup-list{padding-top:18px}
#backupView>.backup-location{margin:18px 24px 0}
.task-insight-panel>.task-detail-panel{padding:20px}

/* Analysis queue: use separated task cards instead of a compressed spreadsheet row. */
.task-list-panel{background:#f7f9fd}
.task-list-panel .task-list{display:block;max-height:calc(100vh - 390px);padding:0 16px 20px;background:#f7f9fd}
.task-list-panel .task-list-head{position:sticky;top:0;z-index:3;display:grid;min-height:40px;margin-bottom:10px;padding:11px 14px;border:1px solid #dce5f2;border-radius:10px;background:#eaf0fb;color:#6d7e99}
.task-list-panel .task-row{min-height:92px;margin-bottom:10px;padding:14px 16px;border:1px solid #e0e7f1;border-radius:12px;background:#fff;box-shadow:0 4px 12px rgba(68,88,129,.05);transition:box-shadow .16s,transform .16s,background .16s}
.task-list-panel .task-row:hover{background:#fff;box-shadow:0 8px 18px rgba(68,88,129,.09);transform:translateY(-1px)}
.task-list-panel .task-primary strong{font-size:13px;line-height:1.45;color:#263b59}
.task-list-panel .task-primary small{margin-top:7px;font-size:11px;color:#8795a9}
.task-list-panel .task-state{align-self:start;padding-top:2px}
.task-list-panel .task-progress-cell{align-self:center}
.task-list-panel .task-progress-cell>span{margin-bottom:7px;color:#7b8ca3;font-size:11px}
.task-list-panel .task-progress{height:7px;background:#e9eef5}
.task-list-panel .task-row time{align-self:start;padding-top:4px;color:#8795a8;font-size:11px}
.task-list-panel .task-row-actions{justify-content:flex-start;align-self:start;flex-wrap:wrap;gap:6px;padding-top:0}
.task-list-panel .task-row-actions .row-action{padding:6px 9px;border:1px solid #dce4ef;border-radius:7px;background:#f8faff;color:#5d6f8d;font-size:11px;text-decoration:none}
.task-list-panel .task-row-actions .row-action:hover{background:#edf3ff;border-color:#c5d5eb;color:#4b658b;text-decoration:none}
.task-insight-panel{background:#f1faf7;border-color:#d7ece5}
.task-insight-panel>.task-detail-panel{background:#f1faf7}
.task-insight-panel .task-detail-head{padding:2px 0 14px;border-bottom-color:#d9eee7}
@media(max-width:1050px){.task-list-panel .task-list{max-height:none}.task-list-panel .task-row{min-height:88px}}
@media(max-width:620px){.task-list-panel .task-list{display:block;padding:12px 10px 16px}.task-list-panel .task-list-head{display:none}.task-list-panel .task-row{min-height:0;margin-bottom:10px;padding:14px;grid-template-columns:minmax(0,1fr) auto;gap:10px}.task-list-panel .task-progress-cell{grid-column:1/-1}.task-list-panel .task-row time{grid-column:1;padding-top:0}.task-list-panel .task-row-actions{grid-column:2;grid-row:2}.task-insight-panel>.task-detail-panel{padding:16px}}

/* Header: turn the wide gradient strip into a calmer title bar with a defined action group. */
.topbar{position:relative;min-height:78px;align-items:center;padding:16px 20px 16px 22px;border-radius:18px;background:linear-gradient(112deg,#f2edff 0%,#edf1ff 52%,#e6f7f3 100%);border-color:#dce2f2;box-shadow:0 9px 22px rgba(78,98,143,.09);overflow:hidden}
.topbar::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#786be2,#6da7d9);border-radius:18px 0 0 18px}
.topbar>div:first-child{position:relative;display:grid;gap:3px;padding-left:4px}
.topbar .eyebrow{margin:0;color:#6f62cf;font-size:9px;letter-spacing:2px}
.topbar h1{margin:0;color:#253753;font-size:25px;letter-spacing:-.45px;line-height:1.18}
.top-actions{position:relative;display:flex;align-items:center;gap:7px;padding:5px 6px 5px 10px;border:1px solid rgba(211,220,237,.84);border-radius:12px;background:rgba(255,255,255,.58);box-shadow:0 3px 10px rgba(78,98,143,.05)}
.top-actions .sync-status{margin:0 3px 0 0;color:#73839d;font-size:10px}
.top-actions .current-user{color:#60718e;font-size:10px;white-space:nowrap}
.top-actions .ghost-button,.top-actions .primary-button{height:34px;padding:0 12px;border-radius:9px}
.top-actions .primary-button{box-shadow:0 5px 12px rgba(100,119,217,.2)}
@media(max-width:850px){.topbar{min-height:0;padding:15px 16px}.top-actions{padding:4px;flex-wrap:wrap;justify-content:flex-end}.top-actions .sync-status,.top-actions .current-user{display:none}}

/* Settings: keep ASR and LLM actions together without colliding with the title. */
.setting-panel-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex-shrink:0}
.setting-panel-actions .sync-status{font-size:11px;white-space:nowrap}
.setting-panel-actions .primary-button,.setting-panel-actions .ghost-button{white-space:nowrap}
.setting-panel-actions .primary-button,.setting-panel-actions .ghost-button,#saveRuntimeConfigBtn{height:34px;padding:0 12px;border-radius:9px;font-size:12px;line-height:34px;box-shadow:none}
.setting-panel-actions .primary-button{box-shadow:0 4px 10px rgba(100,119,217,.14)}
.recommend-empty{padding:16px;border:1px dashed #d9dfed;border-radius:10px;background:#fff;color:#8b98ae;font-size:12px;text-align:center}
@media(max-width:620px){.setting-panel-actions{width:100%;justify-content:flex-start}.setting-panel-actions button{flex:1}}

/* Settings and team users: keep labels, fields and actions in predictable groups. */
.runtime-settings-grid,.backup-settings-grid{align-items:end}
.runtime-settings-grid label,.backup-settings-grid label{min-width:0}
.backup-settings-panel .panel-title{margin-bottom:18px}
.settings-layout .form-stack input,.settings-layout .form-stack select,.settings-layout .form-stack textarea{width:100%;border:1px solid #dbe3ef;border-radius:9px;background:#fff;color:#344a68;outline:none}
.settings-layout .form-stack input,.settings-layout .form-stack select{height:38px;padding:0 10px}
.settings-layout .form-stack textarea{min-height:96px;padding:9px 10px;resize:vertical;line-height:1.6}
.backup-settings-grid .check-field{align-content:end}
.backup-settings-grid .check-field>span:first-child{color:#8290a5}
.switch-line{display:flex;align-items:center;gap:9px;height:36px;padding:0 11px;border:1px solid #dfe6f0;border-radius:9px;background:rgba(255,255,255,.76);color:#50627d;font-size:12px}
.switch-line input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:#6d65d8}
.switch-line b{font-weight:600}
.user-create-form{grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;padding:14px;border:1px solid #e2e8f1;border-radius:12px;background:#f8faff}
.user-create-form input,.user-create-form select{height:38px;border-color:#dbe3ef;background:#fff}
.user-create-form button{height:38px;white-space:nowrap}
.users-list{gap:12px;margin-top:16px}
.user-row{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(0,2fr) auto;gap:16px;align-items:start;padding:16px;border:1px solid #dfe6f0;border-radius:13px;background:#fff;box-shadow:0 4px 13px rgba(69,91,133,.045)}
.user-row-main{min-width:0;padding-top:5px}
.user-row-main strong{display:block;overflow-wrap:anywhere;font-size:13px;color:#2f4665}
.user-row-main small{font-size:10px;color:#91a0b4}
.user-row-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-width:0}
.user-field{display:grid;gap:5px;min-width:0;color:#8290a5;font-size:10px}
.user-field input,.user-field select{width:100%;height:36px}
.user-enabled{align-self:end;min-height:36px;padding:0 10px;border:1px solid #e1e7f0;border-radius:9px;background:#fbfcfe}
.user-enabled input{width:15px;height:15px;margin:0;accent-color:#6d65d8}
.user-row-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:92px}
.user-row-actions button{height:34px;padding:0 11px;white-space:nowrap;font-size:11px}
.user-current-badge{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 10px;border-radius:10px;background:#f1f3f8;color:#8b95aa;font-size:11px;white-space:nowrap}
.user-row-readonly{grid-template-columns:minmax(0,1fr) auto;align-items:center}
.user-role-badge{padding:6px 10px;border-radius:8px;background:#f0edff;color:#6557bd;font-size:11px;white-space:nowrap}
.modal-overlay{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:24px;background:rgba(38,52,78,.36);backdrop-filter:blur(3px)}
.modal-card{position:relative;border:1px solid #dfe6f0;border-radius:16px;background:#fff;box-shadow:0 20px 60px rgba(48,65,102,.2)}
.permission-modal{width:min(860px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 32px));overflow:auto;padding:24px}
.permission-modal .modal-head{padding-right:34px}
.permission-modal .modal-head h3{margin:0;color:#2e4564;font-size:16px}
.modal-close{position:absolute;right:18px;top:15px;width:30px;height:30px;border:0;border-radius:8px;background:#f5f7fb;color:#7c8ba2;font-size:20px;line-height:1;cursor:pointer}
.modal-close:hover{background:#edf1f8;color:#4f6383}
.permission-section{padding:18px 0;border-top:1px solid #e8edf4}
.permission-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.permission-check{min-height:42px;background:#f9fbfe}
@media(max-width:1100px){.user-row{grid-template-columns:150px minmax(0,1fr) auto}.user-row-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.user-enabled{align-self:start}.user-create-form{grid-template-columns:repeat(2,minmax(0,1fr)) auto}.user-create-form button{grid-column:3;grid-row:1 / span 2}.permission-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.user-create-form{grid-template-columns:1fr 1fr}.user-create-form button{grid-column:1/-1;grid-row:auto}.user-row{grid-template-columns:1fr}.user-row-fields{grid-template-columns:1fr 1fr}.user-row-actions{flex-direction:row;min-width:0}.user-row-actions button{flex:1}.permission-grid{grid-template-columns:1fr 1fr}.permission-modal{padding:18px}}
@media(max-width:460px){.user-row-fields{grid-template-columns:1fr}.user-row-actions{flex-direction:column}.permission-grid{grid-template-columns:1fr}}

/* Template workspace: saved templates stay visible without opening case details. */
#templatesView{border-top:3px solid #8175df}
#templatesView>.section-head{padding-bottom:22px}
.template-workspace{display:grid;grid-template-columns:minmax(320px,.78fr) minmax(0,1.42fr);gap:16px;padding:16px 24px 24px}.template-source-panel,.template-result-panel{min-width:0;border:1px solid #e1e8f1;border-radius:14px;background:#fbfcff;padding:16px}.template-workspace-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.template-workspace-panel-head strong{display:block;color:#304969;font-size:14px}.template-workspace-panel-head small{display:block;margin-top:5px;color:#8a99ac;font-size:11px;line-height:1.5}.template-source-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.template-source-actions span{color:#8797aa;font-size:11px}.template-source-actions button{padding:8px 11px;font-size:11px}.template-source-tools{display:grid;grid-template-columns:minmax(0,1fr) 130px auto;align-items:center;gap:8px;margin-bottom:12px;padding:9px;border:1px solid #e8ecf4;border-radius:10px;background:#f6f8fd}.template-source-search{display:flex;align-items:center;gap:6px;min-width:0;height:32px;padding:0 9px;border:1px solid #e1e6f0;border-radius:8px;background:#fff;color:#9aa5b7}.template-source-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#4e5c73;font:inherit;font-size:11px}.template-source-tools select{height:32px;min-width:0;padding:0 8px;border:1px solid #e1e6f0;border-radius:8px;background:#fff;color:#5c6980;font-size:11px}.template-source-tool-buttons{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.template-source-tool-buttons button{height:32px;padding:0 9px;font-size:10px}.template-source-tool-buttons span{color:#8b98aa;font-size:10px}.template-source-list{display:grid;gap:8px;max-height:650px;overflow:auto;padding:2px}.template-source-card{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:start;gap:9px;padding:11px;border:1px solid #e2e8f1;border-radius:10px;background:#fff;cursor:pointer;user-select:none}.template-source-card:hover,.template-source-card.selected{border-color:#bfc5f0;background:#faf9ff}.template-source-card input{width:15px;height:15px;margin:2px 0;accent-color:#7067dd}.template-source-card strong{display:block;overflow:hidden;color:#3d5270;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.template-source-card small{display:block;margin-top:4px;color:#98a5b5;font-size:10px}.template-source-card p{display:-webkit-box;overflow:hidden;margin:6px 0 0;color:#74859b;font-size:11px;line-height:1.55;-webkit-box-orient:vertical;-webkit-line-clamp:2}.template-source-card>.pill{margin-top:1px}.template-workspace-template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:650px;overflow:auto;padding:2px}.template-workspace-card{min-width:0;padding:14px;border:1px solid #e1e8f1;border-radius:11px;background:#fff}.template-workspace-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.template-workspace-card-head h3{margin:0;color:#304969;font-size:13px}.template-workspace-card-head p{margin:5px 0 0;color:#75859d;font-size:11px;line-height:1.55}.template-workspace-card-head button{height:28px;padding:0 8px;font-size:10px;white-space:nowrap}.template-workspace-structure,.template-workspace-slots,.template-workspace-text{display:grid;gap:5px;margin-top:11px}.template-workspace-structure span,.template-workspace-slots span,.template-workspace-text span{color:#8998ac;font-size:10px}.template-workspace-structure strong{color:#5e6f88;font-size:11px;line-height:1.6}.template-workspace-slots>div{display:flex;flex-wrap:wrap;gap:4px}.template-workspace-slots em{padding:3px 6px;border-radius:5px;background:#f1efff;color:#6658be;font-size:10px;font-style:normal}.template-workspace-text pre{max-height:145px;margin:0;padding:9px;border:1px solid #e7ebf2;border-radius:7px;background:#fafbfe;color:#526681;font:11px/1.65 "Microsoft YaHei",sans-serif;white-space:pre-wrap;overflow:auto}.template-workspace-example{margin-top:9px;padding-top:8px;border-top:1px solid #edf0f5;color:#72839a;font-size:11px;line-height:1.65}.template-workspace-example summary{cursor:pointer;color:#667b99}.template-workspace-example p{margin:6px 0 0;white-space:pre-wrap}.template-workspace-meta{display:block;margin-top:10px;color:#9aa6b5;font-size:10px}.template-workspace-empty{padding:36px 12px;color:#93a0b0;font-size:11px;text-align:center}

@media(max-width:1000px){.template-workspace{grid-template-columns:1fr}.template-source-list,.template-workspace-template-list{max-height:none}.template-workspace-template-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.template-workspace{padding:12px 16px 16px}.template-workspace-panel-head{flex-direction:column}.template-source-actions{width:100%;justify-content:space-between}.template-source-tools{grid-template-columns:1fr}.template-source-tool-buttons{justify-content:space-between;flex-wrap:wrap}.template-workspace-template-list{grid-template-columns:1fr}}
.template-permission-hint{display:block;margin-top:7px;color:#b17827;font-size:10px;line-height:1.5}
.template-source-pagination{display:flex;align-items:center;gap:8px;margin-top:12px;padding:10px 2px 0;border-top:1px solid #e9edf4;color:#8491a5;font-size:11px}
.template-source-pagination>span:first-child{margin-right:auto;color:#687895;font-weight:600}
.template-source-pagination .pagination-button{height:30px;padding:0 11px;border:1px solid #dfe5ef;border-radius:8px;background:#fff;color:#62718a;font-size:11px;cursor:pointer}
.template-source-pagination .pagination-button:hover:not(:disabled){border-color:#b9b0f0;background:#faf9ff;color:#6658c9}
.template-source-pagination .pagination-button:disabled{opacity:.45;cursor:not-allowed}
.template-source-pagination .page-indicator{min-width:48px;text-align:center;color:#5e6f88;font-weight:600}
.template-source-pagination label{display:flex;align-items:center;gap:6px;color:#77869c;white-space:nowrap}
.template-source-pagination select{height:30px;padding:0 8px;border:1px solid #dfe5ef;border-radius:8px;background:#fff;color:#5f6e86;font-size:11px}
@media(max-width:620px){.template-source-pagination{align-items:stretch;flex-wrap:wrap;gap:7px}.template-source-pagination>span:first-child{width:100%;margin-right:0}.template-source-pagination .pagination-button{flex:1}.template-source-pagination .page-indicator{display:grid;place-items:center;min-width:42px}.template-source-pagination label{margin-left:auto}}

/* Template lab: a small, readable result window built from existing analysis fields. */
.template-lab-modal{width:min(1100px,calc(100vw - 32px));max-height:min(900px,calc(100vh - 32px));overflow:auto;padding:28px;background:#f8faff}
.template-lab-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:2px 35px 18px 2px;border-bottom:1px solid #e5ebf3}
.template-lab-head h2{margin:4px 0 5px;color:#2b4160;font-size:20px}
.template-lab-head p{margin:0;color:#8593a8;font-size:11px}
.template-lab-source{margin:16px 0 8px;color:#627691;font-size:12px;font-weight:600}
.template-lab-status{min-height:20px;margin-bottom:12px;color:#8795a9;font-size:11px}
.template-lab-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.template-lab-card{min-width:0;padding:16px;border:1px solid #dfe7f1;border-radius:13px;background:#fff;box-shadow:0 5px 14px rgba(69,91,133,.05)}
.template-lab-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.template-lab-card-head h3{margin:0;color:#304969;font-size:14px}
.template-lab-card-head p{margin:6px 0 0;color:#75859d;font-size:12px;line-height:1.7}
.template-lab-card-head button{flex:0 0 auto;height:30px;padding:0 9px;font-size:11px;white-space:nowrap}
.template-lab-structure,.template-lab-slots,.template-lab-text{display:grid;gap:6px;margin-top:14px}
.template-lab-structure>span,.template-lab-slots>span,.template-lab-text>span{color:#8998ac;font-size:10px}
.template-lab-structure strong{color:#5e6f88;font-size:12px;line-height:1.75}
.template-lab-slots>div{display:flex;flex-wrap:wrap;gap:5px}
.template-lab-slots em{padding:4px 7px;border-radius:6px;background:#f1efff;color:#6658be;font-size:10px;font-style:normal}
.template-lab-text pre{max-height:210px;margin:0;padding:11px;border:1px solid #e7ebf2;border-radius:8px;background:#fafbfe;color:#526681;font:12px/1.75 "Microsoft YaHei",sans-serif;white-space:pre-wrap;overflow:auto}
.template-slot-highlight{display:inline-block;margin:0 1px;padding:0 4px;border-radius:4px;background:#fff0bd;color:#a66b16;font-weight:700;font-style:normal}
.template-lab-example{margin-top:11px;border-top:1px solid #edf0f5;padding-top:9px;color:#72839a;font-size:12px;line-height:1.75}
.template-lab-example summary{cursor:pointer;color:#667b99}
.template-lab-example p{margin:8px 0 0;white-space:pre-wrap;color:#536985}
.template-lab-empty{grid-column:1/-1;padding:42px 20px;text-align:center;color:#8997aa}
.template-lab-history{margin-top:22px;border-top:1px solid #e5ebf3;padding-top:14px}.template-lab-history>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #e3e9f2;border-radius:9px;background:#fff;color:#526985;cursor:pointer;list-style:none}.template-lab-history>summary::-webkit-details-marker{display:none}.template-lab-history>summary::before{content:"＋";color:#7d72d8;font-size:16px}.template-lab-history[open]>summary::before{content:"−"}.template-lab-history>summary strong{font-size:13px;margin-right:auto}.template-lab-history>summary span{color:#98a4b5;font-size:11px}
.template-lab-history-list{display:grid;gap:7px}
.template-lab-history-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #e3e9f2;border-radius:9px;background:#fff;color:#5f7390;text-align:left;cursor:pointer}
.template-lab-history-item:hover{border-color:#c9c3f4;background:#fbfaff}.template-lab-history-item strong{font-size:11px;color:#526985}.template-lab-history-item span{font-size:11px;color:#8b99ab}.template-lab-history-empty{color:#9aa6b5;font-size:11px}
.template-lab-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:15px 0 12px;padding:10px 12px;border:1px solid #e3e9f2;border-radius:10px;background:#fff}.template-lab-toolbar .template-lab-source{margin:0 0 4px}.template-lab-toolbar .template-lab-status{min-height:0;margin:0}.template-lab-history-select{display:grid;gap:5px;min-width:270px;color:#8998ac;font-size:10px}.template-lab-history-select select{height:34px;border:1px solid #d8e2ef;border-radius:8px;background:#f8faff;color:#5e718d;padding:0 9px;font-size:11px;cursor:pointer}
.case-library-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:min(820px,100%)}.case-library-actions-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.case-library-actions-secondary{min-height:30px}.action-select{height:36px;padding:0 30px 0 11px;border:1px solid #d8e2ef;border-radius:10px;background:#f7f9fd;color:#5f718d;font-size:11px;font-weight:700;cursor:pointer}
@media(max-width:760px){.template-lab-modal{padding:18px}.template-lab-head{flex-direction:column;gap:10px}.template-lab-head .primary-button{width:100%}.template-lab-card{padding:16px}}
@media(max-width:760px){.template-lab-list{grid-template-columns:1fr}.template-lab-toolbar{align-items:stretch;flex-direction:column;gap:10px}.template-lab-history-select{min-width:0}.template-lab-history-select select{width:100%}}
@media(max-width:1100px){.section-head:has(#templateLabBtn){align-items:flex-start;flex-direction:column;gap:12px}.case-library-actions{align-items:flex-start;min-width:0;width:100%}.case-library-actions-row{justify-content:flex-start}}

/* Task detail: long prompts stay readable without stretching the whole workspace. */
.task-detail-grid>div.task-prompt-block{max-height:240px;overflow:auto;background:#f8fbff;border-color:#dce7f3;scrollbar-gutter:stable}
.task-detail-grid>div.task-prompt-block p{padding-right:8px;color:#657895;font-size:11px;line-height:1.7}
@media(max-width:620px){.task-detail-grid>div.task-prompt-block{max-height:220px}}

/* Timbre analysis: a separate, calm workspace for structured voice findings and reusable prompts. */
.timbre-create-panel{margin:0 24px 18px;padding:20px 22px;border:1px solid #dce7f3;border-radius:16px;background:linear-gradient(135deg,#f4f8ff 0%,#fbf7ff 54%,#f1faf6 100%);box-shadow:0 6px 18px rgba(75,101,145,.05)}
.timbre-create-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.timbre-create-head strong{display:block;color:#293d59;font-size:14px}.timbre-create-head small{display:block;margin-top:5px;color:#8392a7;font-size:11px}.timbre-server-note{padding:5px 8px;border-radius:7px;background:#eaf7f2;color:#4c8a78;font-size:10px;white-space:nowrap}
.timbre-create-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.timbre-create-grid label{display:grid;gap:6px;color:#71829a;font-size:11px}.timbre-create-grid input,.timbre-create-grid select{height:36px;border:1px solid #d8e3f0;border-radius:9px;background:#fff;color:#344a68;padding:0 10px;outline:none}.timbre-create-grid input:focus,.timbre-create-grid select:focus{border-color:#8f85df;box-shadow:0 0 0 3px rgba(115,103,222,.1)}
.timbre-create-actions{display:flex;align-items:center;gap:8px;margin-top:15px}.timbre-create-actions button,.timbre-file-button{height:34px;padding:0 12px;border-radius:9px;font-size:12px;display:inline-flex;align-items:center;justify-content:center}.timbre-file-button{cursor:pointer}.timbre-drop-zone{margin-top:14px;padding:14px;border:1px dashed #bdcde2;border-radius:11px;background:rgba(255,255,255,.62);text-align:center}.timbre-drop-zone strong{display:block;color:#596e8b;font-size:12px}.timbre-drop-zone span{display:block;margin-top:4px;color:#94a1b3;font-size:10px}.timbre-drop-zone.dragging{border-color:#8274dc;background:#f1edff}
.timbre-list-toolbar{display:flex;align-items:center;gap:12px;margin:0 24px;padding:11px 2px;border-bottom:1px solid #e5ebf2;color:#70819a;font-size:11px}.timbre-list-toolbar label{display:flex;align-items:center;gap:6px;color:#566b89}.timbre-list-toolbar input{accent-color:#7569d8}.timbre-list-toolbar span{margin-right:auto}.timbre-list-toolbar select{height:30px;border:1px solid #d9e3ef;border-radius:8px;padding:0 8px;background:#fff;color:#5d708e;font-size:11px}
.timbre-list{display:grid;gap:14px;padding:18px 24px 28px}.timbre-card{padding:18px 20px;border:1px solid #dfe7f1;border-radius:15px;background:#fff;box-shadow:0 5px 14px rgba(68,88,129,.05)}.timbre-card:hover{box-shadow:0 9px 20px rgba(68,88,129,.09)}.timbre-card-head{display:flex;align-items:flex-start;gap:12px}.timbre-card-head>div:nth-child(2){min-width:0;flex:1}.timbre-card-head strong{display:block;overflow:hidden;color:#263d5d;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.timbre-card-head small{display:block;margin-top:5px;color:#8a98aa;font-size:10px}.timbre-card-head>.pill{flex:0 0 auto}.timbre-check{display:flex;align-items:center;gap:5px;color:#7789a2;font-size:10px;white-space:nowrap}.timbre-check input{accent-color:#7569d8}.timbre-card-meta{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;color:#8493a7;font-size:10px}.timbre-card-meta span{padding:5px 8px;border-radius:7px;background:#f4f7fb}.timbre-error{margin:10px 0;padding:9px 10px;border:1px solid #f0d4d7;border-radius:8px;background:#fff3f3;color:#b56873;font-size:11px;line-height:1.6}.timbre-result-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.timbre-result-field{min-width:0;padding:11px 12px;border:1px solid #e2eaf2;border-radius:10px;background:linear-gradient(135deg,#fafcff 0%,#f5f8fc 100%)}.timbre-result-field.timbre-overview{grid-column:1/-1;background:linear-gradient(135deg,#fffaf1 0%,#fffefd 100%);border-color:#f0e1c8}.timbre-result-field label{display:block;margin-bottom:6px;color:#8493a8;font-size:10px}.timbre-result-field p{min-height:18px;margin:0;color:#4a607e;font-size:11px;line-height:1.6;overflow-wrap:anywhere}.timbre-tags{display:flex;flex-wrap:wrap;gap:5px}.timbre-tags span,.timbre-tags em{padding:4px 7px;border-radius:6px;background:#edf4ff;color:#58739b;font-size:10px;font-style:normal}.timbre-tags.caution span{background:#fff3e5;color:#a67942}.timbre-prompt-box{display:flex;align-items:flex-start;gap:14px;margin-top:12px;padding:14px;border:1px solid #ded7f4;border-radius:11px;background:linear-gradient(135deg,#f7f3ff 0%,#f3f8ff 100%)}.timbre-prompt-box>div{min-width:0;flex:1}.timbre-prompt-box label{display:block;margin-bottom:6px;color:#7665bb;font-size:10px;font-weight:700}.timbre-prompt-box p{margin:0;color:#4f6083;font-size:11px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.timbre-prompt-box .ghost-button{flex:0 0 auto;height:30px;padding:0 9px;font-size:11px}.timbre-card-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid #edf0f5}.timbre-card-actions button{height:30px;padding:0 10px;border-radius:8px;font-size:11px}.timbre-empty{padding:60px 20px;text-align:center;color:#8492a6}.timbre-empty strong{display:block;color:#546b89;font-size:14px}.timbre-empty p{margin:8px 0 0;font-size:11px}
@media(max-width:1050px){.timbre-result-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.timbre-create-panel{margin:0 14px 14px;padding:16px}.timbre-create-head{align-items:flex-start;flex-direction:column}.timbre-create-grid{grid-template-columns:1fr}.timbre-create-actions{flex-wrap:wrap}.timbre-create-actions button,.timbre-file-button{flex:1}.timbre-list-toolbar{margin:0 14px;flex-wrap:wrap}.timbre-list-toolbar span{margin-right:0}.timbre-list{padding:14px}.timbre-card{padding:15px}.timbre-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.timbre-result-field.timbre-overview{grid-column:1/-1}.timbre-prompt-box{flex-direction:column}.timbre-prompt-box .ghost-button{width:100%}}

/* Analysis task bulk controls: keep the existing two-column workspace, add only a compact action rail. */
.task-batch-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.task-batch-toolbar>span{color:#8492a7;font-size:10px;white-space:nowrap}.task-batch-toolbar>span+span{padding-left:5px;border-left:1px solid #dfe6ef}.task-batch-toolbar button{height:28px;padding:0 9px;border-radius:8px;font-size:10px}.task-batch-toolbar button:disabled{cursor:not-allowed;opacity:.48;transform:none}.task-select-header{display:flex;align-items:center;gap:5px;color:#6b7f9b;font-size:10px;white-space:nowrap}.task-select-cell{display:grid;place-items:center;align-self:start;padding-top:4px}.task-select-header input,.task-select-cell input{accent-color:#7569d8;cursor:pointer}.task-list-panel .task-list-head,.task-list-panel .task-row{grid-template-columns:34px minmax(210px,1.8fr) 90px minmax(130px,1fr) 128px minmax(150px,auto)}
.task-menu-bar{display:grid;grid-template-columns:34px minmax(210px,1.8fr) 90px minmax(130px,1fr) 128px minmax(150px,auto);align-items:center;gap:10px;min-height:48px;margin:0 12px 10px;padding:9px 14px;border:1px solid #dce5f2;border-radius:10px;background:#eaf0fb;color:#6d7e99;font-size:10px}.task-menu-bar .task-batch-toolbar{grid-column:1/-1;justify-content:flex-end;padding-top:7px;border-top:1px solid #dfe6ef}.task-menu-bar .task-select-header{grid-column:1/span 2}.task-menu-bar>span{white-space:nowrap}.task-menu-bar .task-batch-toolbar>span:first-child{margin-left:auto}
@media(max-width:1050px){.task-list-panel .task-list-head,.task-list-panel .task-row{grid-template-columns:30px minmax(180px,1.5fr) 82px minmax(120px,1fr) 112px minmax(130px,auto)}}
@media(max-width:620px){.task-batch-toolbar{width:100%;justify-content:flex-start}.task-batch-toolbar button{flex:1;min-width:0}.task-menu-bar{display:flex;flex-wrap:wrap;gap:8px;margin:0 8px 10px;padding:10px}.task-menu-bar .task-select-header{width:100%;order:0}.task-menu-bar>span{padding:4px 7px;border-radius:6px;background:#f4f6fb}.task-menu-bar .task-batch-toolbar{width:100%;order:5;padding-top:8px}.task-list-panel .task-list-head{display:none}.task-list-panel .task-row{grid-template-columns:28px minmax(0,1fr) auto;gap:10px}.task-list-panel .task-select-cell{grid-column:1;grid-row:1;padding-top:3px}.task-list-panel .task-primary{grid-column:2}.task-list-panel .task-state{grid-column:3;grid-row:1}.task-list-panel .task-progress-cell{grid-column:2/-1}.task-list-panel .task-row time{grid-column:2}.task-list-panel .task-row-actions{grid-column:3;grid-row:3}}

/* Task menu: use the same independent action-card hierarchy as the template workspace. */
.task-menu-bar{display:block;min-height:0;margin:0 12px 14px;padding:16px;border:1px solid #dce5f2;border-radius:15px;background:#fff;box-shadow:0 5px 16px rgba(68,88,129,.05);color:#6d7e99}
.task-menu-bar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.task-menu-bar-head strong{display:block;color:#304969;font-size:13px}.task-menu-bar-head small{display:block;margin-top:5px;color:#8a99ac;font-size:10px;line-height:1.5}.task-menu-bar-head .task-batch-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;padding:0;border:0}.task-menu-bar-head .task-batch-toolbar>span:first-child{margin-left:0}.task-menu-bar-options{display:flex;align-items:center;gap:12px;margin-top:14px;padding-top:11px;border-top:1px solid #edf0f5}.task-menu-bar-options>span{color:#9aa6b5;font-size:10px}.task-menu-bar .task-select-header{grid-column:auto;color:#5e7190;font-size:10px}.task-menu-bar .task-batch-toolbar button{height:30px;border-radius:9px}
@media(max-width:760px){.task-menu-bar-head{flex-direction:column}.task-menu-bar-head .task-batch-toolbar{width:100%;justify-content:flex-start}.task-menu-bar-options{align-items:flex-start;flex-direction:column;gap:6px}}

/* 分析任务：筛选、记录清理与左侧拖动选择 */
.task-filter-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) 150px auto;gap:8px;margin-top:13px;padding:10px;border:1px solid #e5eaf3;border-radius:11px;background:#f7f9fd}.task-filter-search{display:flex;align-items:center;min-width:0;height:34px;padding:0 10px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:#8a97aa}.task-filter-search span{margin-right:7px;font-size:16px}.task-filter-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#33415a;font-size:11px}.task-filter-toolbar select{height:34px;padding:0 10px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:#52627b;font-size:11px}.task-filter-toolbar>.ghost-button{height:34px;padding:0 11px}.task-cleanup-menu{position:relative}.task-cleanup-menu>summary{display:flex;align-items:center;height:30px;padding:0 10px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#68778f;font-size:10px;font-weight:700;cursor:pointer;list-style:none}.task-cleanup-menu>summary::-webkit-details-marker{display:none}.task-cleanup-menu[open]>summary{border-color:#cfc8fa;background:#f3f0ff;color:#6659cc}.task-cleanup-menu>div{position:absolute;z-index:12;top:36px;right:0;display:grid;gap:7px;width:220px;padding:10px;border:1px solid #e0e5ee;border-radius:11px;background:#fff;box-shadow:0 14px 34px rgba(55,68,105,.16)}.task-cleanup-menu>div button{width:100%;height:32px}.task-cleanup-menu>div small{color:#98a2b2;font-size:9px;line-height:1.5}.task-list-panel .task-row{min-height:72px;margin-bottom:8px;padding-top:9px;padding-bottom:9px}.task-list-panel .task-select-cell{align-self:stretch;min-height:52px;padding-top:7px;border-radius:8px;background:#f3f5fa;transition:background .15s,box-shadow .15s;touch-action:none;user-select:none}.task-list-panel .task-select-cell:hover{background:#e9e6ff;box-shadow:inset 0 0 0 1px #cfc8fa}.task-list-panel .task-row.box-selected{border-color:#bdb4fa;background:#faf9ff;box-shadow:0 5px 14px rgba(103,87,221,.11)}.task-list-panel .task-row.box-selected .task-select-cell{background:#e7e2ff;box-shadow:inset 0 0 0 1px #aea3f5}.task-filter-empty{pointer-events:auto}.task-menu-bar-options{justify-content:space-between}
@media(max-width:760px){.task-filter-toolbar{grid-template-columns:1fr 1fr}.task-filter-search{grid-column:1/-1}.task-cleanup-menu>div{left:0;right:auto}.task-menu-bar-options{justify-content:flex-start}.task-list-panel .task-select-cell{min-height:46px}}

/* Extended category palette: dictionary order keeps labels stable and avoids frequent color collisions. */
.game-tone-6{background:#fff3e8;color:#9b6b3f;border-color:#f1dfca}.game-tone-7{background:#fceff3;color:#9c6273;border-color:#efdbe1}.game-tone-8{background:#edf8e9;color:#5e8255;border-color:#dcecd6}.game-tone-9{background:#fff8dc;color:#8f7a3e;border-color:#eee4ba}.game-tone-10{background:#eaf7fb;color:#4c7f91;border-color:#d4eaf1}.game-tone-11{background:#f7eef8;color:#806586;border-color:#eadbec}
.case-tone-6{background:#e9f7f5;color:#4a837a;border-color:#d3ece7}.case-tone-7{background:#fff1f4;color:#9d6271;border-color:#efd9df}.case-tone-8{background:#eef7e9;color:#638254;border-color:#dcebd4}.case-tone-9{background:#fff7dc;color:#92783a;border-color:#efe2b7}.case-tone-10{background:#eaf5fb;color:#557e94;border-color:#d6e8f1}.case-tone-11{background:#f7eef7;color:#836683;border-color:#eadbea}

/* COS cleanup console: destructive actions are shown only after live COS verification. */
.cos-cleanup-panel{overflow:hidden;border:1px solid #dfe7f2;border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(67,86,120,.05)}
.cos-cleanup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:19px 20px;border-bottom:1px solid #edf1f6;background:linear-gradient(120deg,#fff 0%,#f7fafc 62%,#fff6f5 100%)}
.cos-cleanup-head h3{margin:0 0 6px;color:#243b5b;font-size:14px}.cos-cleanup-head p{margin:0;color:#8290a5;font-size:11px;line-height:1.65}
.cos-cleanup-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.cos-cleanup-actions button{height:34px;padding:0 11px;white-space:nowrap}
.cos-cleanup-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid #edf1f6;background:#fbfcff;color:#7b899d;font-size:11px}
.cos-cleanup-toolbar{display:flex;align-items:center;gap:14px;padding:11px 20px;border-bottom:1px solid #edf1f6;color:#65758d;font-size:11px}.cos-cleanup-toolbar label{display:flex;align-items:center;gap:7px;font-weight:700;cursor:pointer}.cos-cleanup-toolbar input{accent-color:#6d65d8}.cos-cleanup-toolbar span{margin-right:auto}.cos-cleanup-toolbar small{color:#97a3b4}
.cos-cleanup-details{margin-top:12px}.cos-cleanup-table{padding:0 12px 12px}.cos-cleanup-row{display:grid;grid-template-columns:44px minmax(190px,1.2fr) minmax(190px,1fr) minmax(180px,1fr) 110px;gap:12px;align-items:center;min-height:48px;padding:9px 10px;border-bottom:1px solid #eef2f6;color:#62728a;font-size:10px}.cos-cleanup-row:last-child{border-bottom:0}.cos-cleanup-row-head{position:sticky;top:0;z-index:1;min-height:38px;background:#f7f9fd;color:#8795aa;font-weight:700}.cos-cleanup-row.is-ready{background:#fbfffd}.cos-cleanup-row input{width:15px;height:15px;accent-color:#6d65d8}.cos-cleanup-state{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:0 7px;border-radius:6px;font-size:9px;white-space:nowrap}.cos-cleanup-state.is-ready{background:#e8f7ef;color:#238962}.cos-cleanup-state.is-clean{background:#edf1f6;color:#6f7d90}.cos-cleanup-state.is-blocked{background:#fff1f1;color:#ba6771}.is-ok-text{color:#428675}.is-bad-text{color:#a56e75}.cos-cleanup-empty{padding:35px 12px;color:#929eae;text-align:center;font-size:11px}

/* Final phone layout: bottom navigation, touch-friendly controls and card-first case browsing. */
@media(max-width:680px){
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-bottom:76px;background:#f4f6fa}
  .app-shell{display:block;min-height:100vh}
  .sidebar{inset:auto 0 0 0;z-index:70;width:100%;height:68px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));border:0;border-top:1px solid #dce3ee;background:rgba(255,255,255,.98);box-shadow:0 -7px 22px rgba(53,67,99,.12)}
  .sidebar .brand,.sidebar-bottom{display:none}
  .sidebar nav{display:flex;align-items:stretch;gap:4px;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain}.sidebar nav::-webkit-scrollbar{display:none}
  .nav-item{flex:0 0 66px;min-width:66px;height:54px;padding:5px 3px;border:0;border-radius:8px;display:flex;flex-direction:column;justify-content:center;gap:3px;font-size:9px!important;line-height:1.05;text-align:center;white-space:nowrap}
  .nav-item span{font-size:18px}.nav-item.active{box-shadow:inset 0 -3px #7569e6}
  .main-content{margin-left:0!important;width:100%!important;min-width:0;max-width:100vw;padding:10px 9px calc(28px + env(safe-area-inset-bottom))!important;overflow:hidden}
  .main-content>*,.topbar>*,.stats-grid>*,.content-card>*,.section-head>*,.filters>*,.filter-controls>*{min-width:0;max-width:100%}
  .topbar{min-height:0;margin-bottom:12px;padding:13px 13px!important;border-radius:12px;align-items:flex-start;flex-direction:column;gap:10px;overflow:visible}
  .topbar::before{border-radius:12px 0 0 12px}.topbar .eyebrow{font-size:8px}.topbar h1{font-size:20px;letter-spacing:0}
  .topbar,.top-actions,.stats-grid,.content-card,.section-head,.filters,.filter-controls{width:100%;max-width:100%}
  .top-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:5px;gap:6px;border-radius:10px}
  .top-actions .sync-status,.top-actions .current-user{display:none}.top-actions button{width:100%;min-width:0;max-width:100%;height:36px!important;padding:0 5px!important;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.stat-card{width:auto;min-width:0;max-width:100%;padding:12px 13px;overflow:hidden}.stat-card strong{font-size:22px}.stat-card small,.stat-card span{font-size:9px;overflow-wrap:anywhere}
  .content-card{border-radius:12px;overflow:hidden}.content-card>.section-head,.section-head{align-items:flex-start;flex-direction:column;padding:15px 14px 12px}.section-head h2{font-size:16px}.section-head p{font-size:10px;line-height:1.55}
  .section-actions,.case-library-actions{align-items:stretch;width:100%;min-width:0}.case-library-actions-row,.section-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch;gap:7px;width:100%}.case-library-actions-row>* ,.section-actions>*{min-width:0;width:100%;max-width:none}.view-switcher{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);width:100%}.view-button{width:100%;min-width:0}.saved-view-select,.action-select{max-width:none;width:100%}
  .filters{gap:9px;padding:12px 14px 14px!important}.filters .search-box{height:42px}.filter-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.filter-controls select,.filter-controls button{min-width:0!important;width:100%!important}.filter-advanced-trigger,.filter-reset{grid-column:auto!important}.advanced-filter-panel{grid-template-columns:1fr!important}
  #tableView,#wideTableView{display:none!important}#caseGrid{display:grid!important;grid-template-columns:1fr;gap:10px;padding:12px 14px}.case-grid.hidden{display:grid!important}.case-card{border:1px solid #e3e8f1;border-radius:10px;box-shadow:0 5px 14px rgba(60,76,102,.06)}.case-card-media{min-height:180px}.case-card-body{padding:13px}.case-card h3{font-size:14px}.case-card p{font-size:11px;line-height:1.6}.case-card-meta{flex-wrap:wrap}
  .pagination-bar,.task-pagination-bar{align-items:stretch;flex-direction:column;gap:10px;padding:12px 14px}.pagination-actions,.task-pagination-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}.pagination-actions label,.task-pagination-actions label{grid-column:1/-1;justify-content:space-between}.pagination-actions select,.task-pagination-actions select{min-width:100px}.pagination-button{width:100%;padding:0 5px}.page-indicator{display:grid;place-items:center;min-width:0}
  .detail-overlay,.upload-overlay,.modal-overlay{align-items:stretch;padding:0}.detail-modal,.upload-modal,.modal-card,.template-lab-modal{width:100%!important;max-width:none;max-height:100dvh!important;height:100dvh;border-radius:0!important;padding:18px 14px calc(20px + env(safe-area-inset-bottom));overflow:auto}.detail-modal>.close-button{position:fixed;right:12px;top:10px}.detail-header{grid-template-columns:minmax(0,1fr);padding:42px 0 14px}.detail-header>.thumb{display:none}.detail-title{padding:0}.detail-title h2{font-size:18px}.detail-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%}.detail-grid{grid-template-columns:1fr;gap:9px}.detail-block,.detail-block.full{grid-column:auto;padding:12px}.detail-video-section{scroll-margin-top:12px}.media-player video{width:100%;max-height:calc(100dvh - 150px);background:#171923}.media-actions{align-items:flex-start;flex-direction:column;gap:6px}.media-actions span{overflow-wrap:anywhere}.edit-grid,.upload-meta-grid{grid-template-columns:1fr}.edit-field.full-field,.upload-title-field,.upload-topic-field{grid-column:auto}.edit-actions,.edit-actions-sticky{position:static;align-items:stretch;flex-direction:column}.edit-actions>div:last-child{display:grid;grid-template-columns:1fr 1fr;width:100%}.edit-actions button{width:100%}
  .cos-console{padding:12px;gap:12px}.cos-page-head{padding:16px 14px!important}.cos-head-status{display:grid;grid-template-columns:1fr;width:100%;justify-content:stretch}.cos-head-status>*{width:100%;text-align:center}.cos-connection{padding:16px}.cos-paths{display:grid;grid-template-columns:1fr 1fr;width:100%}.cos-paths span{min-width:0}.cos-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cos-stat{padding:13px}.cos-stat strong{font-size:22px}.cos-progress-panel{padding:15px}.cos-progress-top{align-items:flex-start;flex-direction:column}.cos-results-head,.cos-cleanup-head{align-items:stretch;flex-direction:column;padding:15px 14px}.cos-results-head button{width:100%}.cos-cleanup-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.cos-cleanup-actions button:first-child{grid-column:1/-1}.cos-cleanup-summary{padding:10px 14px}.cos-cleanup-toolbar{align-items:flex-start;flex-wrap:wrap;padding:11px 14px}.cos-cleanup-toolbar span{margin-right:0}.cos-cleanup-toolbar small{width:100%}.cos-cleanup-table{padding:0 8px 8px}.cos-cleanup-row-head{display:none}.cos-cleanup-row{grid-template-columns:26px minmax(0,1fr);gap:7px 9px;margin:8px 0;padding:11px;border:1px solid #e4e9f1;border-radius:9px}.cos-cleanup-row>span:nth-child(1){grid-column:1;grid-row:1}.cos-cleanup-row>span:nth-child(2){grid-column:2;grid-row:1}.cos-cleanup-row>span:nth-child(n+3){grid-column:2}.cos-cleanup-state{justify-content:flex-start}.cos-row{grid-template-columns:minmax(105px,1fr) 58px 58px 75px;gap:5px}.cos-row-status{white-space:normal}.cos-details{margin-left:10px;margin-right:10px}
  .settings-layout{padding:12px 14px 18px}.settings-layout>.setting-panel{padding:15px}.form-row,.runtime-settings-grid,.backup-settings-grid,.user-create-form,.user-row-fields{grid-template-columns:1fr!important}.setting-panel .panel-title{align-items:flex-start;flex-direction:column}.setting-panel-actions{display:grid;grid-template-columns:1fr 1fr}.setting-panel-actions button{width:100%}.user-row,.user-row-readonly{grid-template-columns:1fr}.user-row-actions{display:grid;grid-template-columns:1fr 1fr}.user-create-form button{grid-column:auto!important}.permission-grid{grid-template-columns:1fr}
  .report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.report-grid{grid-template-columns:1fr}.duplicate-list,.recycle-list,.audit-list,.backup-list{padding:12px 14px 16px}.recycle-row,.backup-row{align-items:stretch;flex-direction:column}.recycle-actions,.backup-row-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.audit-row{grid-template-columns:1fr}.task-workspace{padding:12px 10px 16px}.task-menu-bar{margin:0 0 10px}.task-menu-bar-head .task-batch-toolbar{display:grid;grid-template-columns:1fr 1fr}.task-batch-toolbar button{width:100%}.task-list-panel .task-row{grid-template-columns:26px minmax(0,1fr);gap:8px}.task-list-panel .task-state,.task-list-panel .task-row-actions{grid-column:2}.task-list-panel .task-row-actions{display:grid;grid-template-columns:1fr 1fr}.timbre-result-grid{grid-template-columns:1fr}.timbre-result-field.timbre-overview{grid-column:auto}.timbre-card-head{flex-wrap:wrap}.timbre-card-actions{display:grid;grid-template-columns:1fr 1fr}.template-workspace{padding:12px}.template-source-actions,.template-source-tool-buttons{display:grid;grid-template-columns:1fr 1fr;width:100%}.template-source-actions span,.template-source-tool-buttons span{grid-column:1/-1}.template-source-card{grid-template-columns:18px minmax(0,1fr)}.template-source-card>.pill{grid-column:2}.scroll-top-button{right:12px;bottom:82px}
}
@media(max-width:360px){.top-actions{grid-template-columns:1fr 1fr}.top-actions .primary-button{grid-column:1/-1}.stats-grid{grid-template-columns:1fr}}

/* 通用模板生成数量：案例选择范围与模板输出数量分开控制 */
.template-count-control{display:inline-flex;align-items:center;gap:5px;color:#687895;font-size:10px;white-space:nowrap}
.template-count-control input{width:42px;height:30px;box-sizing:border-box;padding:0 6px;border:1px solid #dfe5ef;border-radius:8px;background:#fff;color:#526681;text-align:center;font:inherit;outline:none}
.template-count-control input:focus{border-color:#8175df;box-shadow:0 0 0 2px rgba(129,117,223,.12)}

/* 抖音解析：独立的预览与确认工作区 */
.douyin-page{--douyin-border:#e2e7f3}.douyin-submit-panel,.douyin-rule-panel,.douyin-jobs-panel,.douyin-preview-panel{margin:16px 0;padding:22px;border:1px solid var(--douyin-border);border-radius:18px;background:#fff}.douyin-submit-panel h3,.douyin-rule-panel h3,.douyin-jobs-panel h3,.douyin-preview-panel h3{margin:5px 0 6px;color:#172b4d}.douyin-submit-panel p,.douyin-rule-panel p,.douyin-jobs-panel p,.douyin-preview-panel p{margin:0;color:#7c8ca8;font-size:13px}.douyin-submit-panel textarea{display:block;width:100%;min-height:94px;margin:18px 0 14px;padding:13px 15px;border:1px solid var(--douyin-border);border-radius:12px;resize:vertical;font:inherit;color:#253858;box-sizing:border-box}.douyin-submit-actions,.douyin-page .section-subhead,.douyin-preview-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.douyin-rule-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}.douyin-rule-list span{display:grid;grid-template-columns:1fr auto;gap:4px 8px;padding:11px 13px;border-radius:12px;background:#f6f8ff}.douyin-rule-list b{color:#344b72;font-size:13px}.douyin-rule-list em{color:#6b63d9;font-style:normal;font-weight:700;font-size:12px}.douyin-rule-list small{grid-column:1/-1;color:#8996ad;line-height:1.5}.douyin-job-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}.douyin-job-card{position:relative;display:grid;gap:5px;padding:14px 48px 14px 15px;text-align:left;border:1px solid var(--douyin-border);border-radius:13px;background:#fff;color:#263b61;cursor:pointer}.douyin-job-card:hover,.douyin-job-card.active{border-color:#8175e8;box-shadow:0 5px 18px rgba(101,89,210,.12)}.douyin-job-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.douyin-job-card small{color:#8996ad}.douyin-job-card i{position:absolute;top:15px;right:14px;color:#6b63d9;font-style:normal;font-weight:700}.douyin-job-status{width:max-content;padding:3px 7px;border-radius:999px;background:#f0edff;color:#6256d5;font-size:11px}.douyin-job-status.failed{background:#fff0f0;color:#d05b69}.douyin-job-status.imported{background:#e9f8f0;color:#279362}.douyin-preview-list{display:grid;gap:14px;margin-top:16px}.douyin-preview-card{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;padding:15px;border:1px solid var(--douyin-border);border-radius:15px;background:#fbfcff}.douyin-preview-card.is-imported{opacity:.72}.douyin-preview-media{min-height:155px;overflow:hidden;border-radius:11px;background:#edf1f8;display:grid;place-items:center;color:#8793a8}.douyin-preview-media video{width:100%;height:100%;max-height:260px;object-fit:contain;background:#111}.douyin-preview-content{display:grid;gap:9px;align-content:start}.douyin-preview-content label{display:grid;gap:5px;color:#71819c;font-size:12px}.douyin-preview-content input{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid var(--douyin-border);border-radius:9px;background:#fff;color:#263b61;font:inherit}.douyin-score{color:#6b63d9;font-weight:700}.douyin-preview-meta{display:flex;flex-wrap:wrap;gap:6px 15px;color:#8996ad;font-size:12px}.douyin-evidence{color:#8996ad;line-height:1.45}.douyin-empty{padding:30px;text-align:center;color:#8996ad;border:1px dashed var(--douyin-border);border-radius:12px}
@media(max-width:800px){.douyin-rule-list,.douyin-job-list{grid-template-columns:1fr}.douyin-preview-card{grid-template-columns:1fr}.douyin-preview-media{min-height:220px}.douyin-submit-actions,.douyin-page .section-subhead{align-items:stretch;flex-direction:column}.douyin-submit-actions .primary-button,.douyin-page .section-subhead .primary-button{width:100%}}

/* 抖音解析任务：筛选、清理和单条删除集中在任务工具栏，长列表保持在独立滚动区。 */
.douyin-cookie-panel{margin:16px 0;padding:0;border:1px solid #dfe6f2;border-radius:16px;background:#fff;box-shadow:0 5px 16px rgba(68,88,129,.04)}.douyin-cookie-panel>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 20px;cursor:pointer;list-style:none}.douyin-cookie-panel>summary::-webkit-details-marker{display:none}.douyin-cookie-panel>summary>span{display:grid;gap:5px}.douyin-cookie-panel>summary b{color:#263d5d;font-size:14px}.douyin-cookie-panel>summary small{color:#8997aa;font-size:11px}.douyin-cookie-panel>summary em{padding:5px 9px;border-radius:8px;background:#f0edff;color:#6659d1;font-size:11px;font-style:normal}.douyin-cookie-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 20px;border-top:1px solid #edf0f5;border-bottom:1px solid #edf0f5;background:#fbfcff;color:#8290a4;font-size:11px;line-height:1.5}.douyin-cookie-toolbar button{height:31px;padding:0 11px;border-radius:8px;white-space:nowrap}.douyin-cookie-profiles{display:grid;gap:9px;padding:14px 20px}.douyin-cookie-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;border:1px solid #e2e8f1;border-radius:12px;background:#fff}.douyin-cookie-card.active{border-color:#9b91ec;background:#fbfaff;box-shadow:0 4px 12px rgba(104,91,213,.08)}.douyin-cookie-card-main{display:grid;gap:5px;min-width:0}.douyin-cookie-card-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.douyin-cookie-card-title b{color:#334b6c;font-size:13px}.douyin-cookie-card-title .pill{padding:3px 6px;background:#eeeaff;color:#685bd3;font-size:10px}.douyin-cookie-card-main>small{overflow:hidden;color:#8b98ab;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.douyin-cookie-card-main>em{color:#ad6c76;font-size:10px;font-style:normal;line-height:1.45}.douyin-cookie-state{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#f1f3f7;color:#738197;font-size:10px}.douyin-cookie-state.valid{background:#e8f7ef;color:#2d9168}.douyin-cookie-state.invalid,.douyin-cookie-state.error{background:#fff0f1;color:#c4616b}.douyin-cookie-state.checking{background:#fff6e8;color:#ad7a40}.douyin-cookie-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.douyin-cookie-card-actions button{height:28px;padding:0 8px;border-radius:7px;font-size:10px}.douyin-cookie-empty{padding:17px;border:1px dashed #dce4ef;border-radius:10px;color:#8d9aac;font-size:11px;line-height:1.6;text-align:center}.douyin-cookie-editor{display:grid;gap:10px;margin:0 20px 16px;padding:15px;border:1px solid #dcd6f4;border-radius:12px;background:#faf8ff}.douyin-cookie-editor-head{display:flex;align-items:center;justify-content:space-between;color:#574e9d}.douyin-cookie-editor-head button{height:27px;padding:0 8px}.douyin-cookie-editor label{display:grid;gap:5px;color:#6f7e96;font-size:11px}.douyin-cookie-editor input,.douyin-cookie-editor textarea{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #dce3ef;border-radius:8px;background:#fff;color:#324967;font:inherit}.douyin-cookie-editor textarea{resize:vertical;line-height:1.5}.douyin-cookie-editor>small{color:#8b98aa;font-size:10px;line-height:1.55}.douyin-cookie-editor>.primary-button{justify-self:start;height:31px;padding:0 11px;border-radius:8px;font-size:11px}
@media(max-width:680px){.douyin-cookie-panel>summary{align-items:flex-start;flex-direction:column;padding:15px 14px}.douyin-cookie-toolbar{align-items:stretch;flex-direction:column;padding:11px 14px}.douyin-cookie-toolbar button{width:100%}.douyin-cookie-profiles{padding:12px 14px}.douyin-cookie-card{grid-template-columns:1fr}.douyin-cookie-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.douyin-cookie-card-actions button{width:100%}.douyin-cookie-editor{margin:0 14px 14px}}
.douyin-job-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;padding:11px 13px;border:1px solid #e2e7f3;border-radius:12px;background:#f8faff;color:#71819c;font-size:12px}.douyin-job-toolbar label{display:flex;align-items:center;gap:7px;font-weight:700}.douyin-job-toolbar select{height:30px;padding:0 28px 0 9px;border:1px solid #dfe6f1;border-radius:8px;background:#fff;color:#405578}.douyin-job-toolbar-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-left:auto}.douyin-job-toolbar-actions button{height:30px;padding:0 10px;border-radius:8px;font-size:11px}.douyin-job-list{max-height:430px;overflow:auto;padding:2px 4px 2px 1px}.douyin-job-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0;text-align:initial;cursor:default}.douyin-job-select{position:relative;display:grid;gap:5px;min-width:0;padding:14px 48px 14px 15px;border:0;background:transparent;color:#263b61;text-align:left;cursor:pointer}.douyin-job-select strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.douyin-job-select small{color:#8996ad}.douyin-job-select i{position:absolute;top:15px;right:14px;color:#6b63d9;font-style:normal;font-weight:700}.douyin-job-delete{align-self:center;height:28px;margin-right:10px;padding:0 9px;border:1px solid #e5cfd3;border-radius:8px;background:#fff7f8;color:#b66b74;font-size:11px;cursor:pointer}.douyin-job-delete:hover{border-color:#d88f98;background:#fff0f2}.douyin-error-panel{padding:18px;border:1px solid #f1d4d8;border-radius:12px;background:#fff6f7;color:#915862}.douyin-error-panel strong{display:block;margin-bottom:7px;color:#b34e5a}.douyin-error-panel p{margin:0 0 8px;color:#915862;line-height:1.6}.douyin-error-panel small{color:#a87980;line-height:1.55}@media(max-width:800px){.douyin-job-toolbar-actions{width:100%;margin-left:0}.douyin-job-toolbar-actions button{flex:1}.douyin-job-card{grid-template-columns:minmax(0,1fr) auto}}
.douyin-job-order{display:inline-flex;align-items:center;justify-content:center;min-width:26px;margin-right:6px;padding:2px 5px;border-radius:6px;background:#f0edff;color:#6b63d9;font-size:10px;font-style:normal;font-weight:700}.douyin-thumb-note{display:block;padding:5px 8px;color:#7a86a0;font-size:10px;text-align:center;background:#f5f7fb}.douyin-item-label{color:#8996ad;font-size:11px}.douyin-source-text{padding:9px 10px;border:1px solid #e5e9f2;border-radius:9px;background:#f8faff}.douyin-source-text b{display:block;margin-bottom:4px;color:#6d7b94;font-size:11px}.douyin-source-text p{margin:0;color:#516586;font-size:12px;line-height:1.55}
.douyin-job-list{max-height:320px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.douyin-job-select{gap:3px;padding:10px 42px 10px 11px}.douyin-job-card strong{font-size:12px}.douyin-job-card small{font-size:10px}.douyin-job-select i{top:11px;right:10px;font-size:11px}.douyin-job-delete{height:25px;margin-right:7px;padding:0 7px;font-size:10px}
.douyin-job-card{grid-template-columns:auto minmax(0,1fr) auto}.douyin-job-check{display:grid;place-items:center;padding-left:10px}.douyin-job-check input{width:15px;height:15px;accent-color:#6b63d9}.douyin-job-select{padding-left:4px}
.douyin-import-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.douyin-import-actions .check-field{white-space:nowrap}.douyin-submit-note{color:#8794aa;font-size:12px}
.douyin-preview-list{max-height:650px;overflow:auto;padding:2px 6px 220px 2px;scroll-padding-bottom:220px}
.douyin-preview-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.douyin-preview-types input{background:#fdfdff}.douyin-preview-types input::placeholder{color:#a0aabc}
@media(max-width:800px){.douyin-job-list{grid-template-columns:1fr}}
@media(max-width:560px){.douyin-preview-types{grid-template-columns:1fr}}

/* 抖音解析：强化操作层级、批量确认分组和真实导入进度。 */
.douyin-submit-panel{position:relative;overflow:hidden;border-color:#cfc8ff;background:linear-gradient(135deg,#fbfaff 0%,#f4f7ff 56%,#f4fbff 100%);box-shadow:0 10px 28px rgba(92,78,196,.09)}.douyin-submit-panel:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(180deg,#7667ec,#5ca6ef)}.douyin-submit-panel .cos-eyebrow{color:#7467dd;font-weight:800;letter-spacing:.16em}.douyin-submit-panel h3{font-size:18px}.douyin-submit-panel textarea{border-color:#d8d4f5;background:rgba(255,255,255,.88);box-shadow:inset 0 1px 2px rgba(64,55,134,.04)}.douyin-submit-panel textarea:focus{outline:0;border-color:#8175e8;box-shadow:0 0 0 4px rgba(112,99,225,.11)}.douyin-submit-panel .primary-button{min-width:116px;box-shadow:0 8px 20px rgba(102,89,210,.22)}
.douyin-preview-titlebar{padding-bottom:15px;border-bottom:1px solid #edf0f7}.douyin-preview-toolbar{display:flex;align-items:center;gap:10px;margin:13px 0 0;padding:10px 12px;border:1px solid #e0e5f2;border-radius:11px;background:linear-gradient(90deg,#f7f5ff,#f7fbff);color:#71809a}.douyin-preview-toolbar>div{display:flex;gap:7px}.douyin-preview-toolbar button{height:30px;padding:0 10px;border-radius:8px}.douyin-preview-toolbar>span{padding:5px 9px;border-radius:8px;background:#ece8ff;color:#6255cf;font-weight:700;font-size:11px}.douyin-preview-toolbar>small{margin-left:auto;color:#8a97aa;font-size:10px}
.douyin-preview-group{overflow:hidden;border:1px solid #dfe5f1;border-radius:14px;background:#fff}.douyin-preview-group[open]{box-shadow:0 7px 20px rgba(68,82,124,.06)}.douyin-preview-group>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;cursor:pointer;list-style:none;background:linear-gradient(90deg,#f4f1ff,#f5faff)}.douyin-preview-group>summary::-webkit-details-marker{display:none}.douyin-preview-group>summary>span{display:grid;gap:4px;min-width:0}.douyin-preview-group>summary b{color:#4d438f;font-size:13px}.douyin-preview-group>summary a,.douyin-item-origin a,.douyin-import-progress-job a{overflow:hidden;color:#63779a;font-size:10px;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.douyin-preview-group>summary a:hover,.douyin-item-origin a:hover,.douyin-import-progress-job a:hover{color:#6758d3;text-decoration:underline}.douyin-preview-group>summary em{flex:none;padding:5px 8px;border-radius:8px;background:#e9e5ff;color:#6659d1;font-size:10px;font-style:normal;font-weight:700}.douyin-preview-group-list{display:grid;gap:10px;padding:12px}
.douyin-preview-card{grid-template-columns:50px 210px minmax(0,1fr);gap:13px;padding:12px}.douyin-preview-check-zone{display:flex!important;align-items:center;justify-content:center;align-self:stretch;gap:5px;min-height:54px;border:1px solid #ded9fa;border-radius:10px;background:#f5f2ff;color:#675bd0!important;font-size:10px!important;font-weight:700;cursor:crosshair;writing-mode:vertical-rl;touch-action:none;user-select:none}.douyin-preview-check-zone:has(input:checked){border-color:#887be9;background:#e9e4ff;box-shadow:inset 0 0 0 1px rgba(103,88,210,.08)}.douyin-preview-check-zone input{width:16px;height:16px;accent-color:#6f62dc}.douyin-preview-media{min-height:150px;touch-action:pan-y;user-select:none}.douyin-preview-media video{max-height:235px}.douyin-item-origin{display:grid;gap:3px;min-width:0}.douyin-item-origin b{color:#53658a;font-size:11px}.douyin-item-label{padding:4px 7px;border-radius:7px;background:#edf7f3;color:#318365;font-weight:700}
.douyin-import-progress{margin-top:12px;padding:14px;border:1px solid #d9d3f6;border-radius:13px;background:linear-gradient(145deg,#fbfaff,#f6f9ff);box-shadow:0 6px 18px rgba(83,70,173,.08)}.douyin-import-progress-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.douyin-import-progress-head b{color:#413879;font-size:13px}.douyin-import-progress-head p{margin:4px 0 0!important;color:#7d89a1!important;font-size:10px!important}.douyin-import-progress-head strong{color:#6859d2;font-size:18px}.douyin-import-progress-track,.douyin-import-progress-job>i{display:block;overflow:hidden;height:7px;margin-top:10px;border-radius:999px;background:#e6e9f2}.douyin-import-progress-track>i,.douyin-import-progress-job>i>em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7565e7,#5d9beb);transition:width .3s ease}.douyin-import-progress-summary{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}.douyin-import-progress-summary span{padding:6px 9px;border-radius:8px;background:#fff;color:#71809a;font-size:10px}.douyin-import-progress-summary span.active{background:#eaf8f1;color:#2e8c66}.douyin-import-progress-summary span.bad{background:#fff0f1;color:#bd5e69}.douyin-import-progress-jobs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.douyin-import-progress-job{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:9px 10px;border:1px solid #e2e6f0;border-radius:9px;background:#fff}.douyin-import-progress-job>div{display:grid;gap:2px;min-width:0}.douyin-import-progress-job b{color:#526887;font-size:10px}.douyin-import-progress-job small{color:#8a96a8;font-size:9px}.douyin-import-progress-job>strong{color:#6a5bd3;font-size:11px}.douyin-import-progress-job>i{grid-column:1/-1;height:4px;margin-top:3px}.douyin-import-progress-job.is-completed{border-color:#caeadb;background:#f7fffb}.douyin-import-progress-job.is-completed>strong{color:#31916b}.douyin-import-progress-job.is-failed{border-color:#f0d1d5;background:#fff8f8}.douyin-import-progress-job.is-failed>strong{color:#bc5e69}.douyin-import-progress-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:11px}.douyin-import-progress-actions button{height:30px}
.douyin-import-progress-details{margin-top:9px;border:1px solid #e0e3f0;border-radius:9px;background:rgba(255,255,255,.65)}.douyin-import-progress-details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;cursor:pointer;list-style:none;color:#5c6f8f;font-size:10px;font-weight:700}.douyin-import-progress-details>summary::-webkit-details-marker{display:none}.douyin-import-progress-details>summary:before{content:"＋";color:#6b5fd2}.douyin-import-progress-details[open]>summary:before{content:"－"}.douyin-import-progress-details>summary>span{margin-right:auto}.douyin-import-progress-details>summary>em{padding:3px 6px;border-radius:6px;background:#efecff;color:#6658cd;font-size:9px;font-style:normal}.douyin-import-progress-details .douyin-import-progress-jobs{max-height:225px;margin:0;padding:7px;overflow:auto;border-top:1px solid #e7e9f2}
.douyin-job-status.ready,.douyin-job-status.partial{background:#eeeaff;color:#6256d5}.douyin-job-status.running,.douyin-job-status.importing{background:#e9f2ff;color:#3474b9}.douyin-job-status.queued{background:#fff5e6;color:#a87432}.douyin-job-status.cancelled{background:#f1f2f5;color:#7d8796}
@media(max-width:900px){.douyin-preview-card{grid-template-columns:42px minmax(150px,190px) minmax(0,1fr)}.douyin-import-progress-jobs{grid-template-columns:1fr}}
@media(max-width:700px){.douyin-preview-toolbar{align-items:stretch;flex-direction:column}.douyin-preview-toolbar>small{margin-left:0}.douyin-preview-card{grid-template-columns:38px minmax(0,1fr)}.douyin-preview-check-zone{grid-row:1/3}.douyin-preview-media{grid-column:2}.douyin-preview-content{grid-column:2}.douyin-preview-group>summary{align-items:flex-start;flex-direction:column}.douyin-preview-group>summary em{align-self:flex-start}}

/* 抖音解析：本批次并发控制、紧凑核对卡片和自定义分类选择器。 */
.douyin-concurrency-control{display:flex;align-items:center;gap:7px;margin-left:auto;padding:5px 8px 5px 11px;border:1px solid #d8d4f5;border-radius:10px;background:rgba(255,255,255,.9);color:#56698c;font-size:11px;font-weight:700;white-space:nowrap}.douyin-concurrency-control input{width:56px;height:30px;padding:0 5px;border:1px solid #cfc9f2;border-radius:7px;background:#f8f7ff;color:#5749c3;font:700 13px/1 inherit;text-align:center}.douyin-concurrency-control small{color:#918eae;font-size:9px;font-weight:500}
.douyin-preview-list{gap:9px}.douyin-preview-group{position:relative;overflow:visible}.douyin-preview-group>summary{padding:8px 11px}.douyin-preview-group>summary>span{display:flex;align-items:center;gap:9px;min-width:0}.douyin-preview-group>summary b{flex:none;font-size:12px}.douyin-preview-group>summary a{min-width:0;max-width:720px}.douyin-preview-group-list{gap:7px;padding:8px}
.douyin-bulk-type-editor{display:grid;grid-template-columns:205px minmax(0,1fr) auto;align-items:stretch;gap:14px;margin-top:12px;padding:12px 14px;border:1px solid #d8d2f4;border-radius:13px;background:linear-gradient(110deg,#faf8ff 0%,#f6f9ff 64%,#f5fbff 100%);box-shadow:0 5px 16px rgba(82,71,171,.06)}.douyin-bulk-type-editor>div:first-child{display:grid;align-content:center;gap:4px;padding:2px 0 2px 11px;border-left:3px solid #8175e8}.douyin-bulk-type-editor b{color:#4b4188;font-size:11px;line-height:1.4}.douyin-bulk-type-editor small{color:#8995aa;font-size:9px;line-height:1.5}.douyin-bulk-type-fields{display:grid;grid-template-columns:1.25fr 1fr 1fr;align-items:end;gap:9px}.douyin-bulk-type-fields .douyin-preview-field{padding:0}.douyin-bulk-type-fields .douyin-preview-field>span{color:#697795;font-size:9px;font-weight:700}.douyin-bulk-type-fields input{height:32px!important;border-color:#d6dcef!important;background:rgba(255,255,255,.9)}.douyin-bulk-type-editor>.secondary-button{align-self:end;height:32px;padding:0 13px;white-space:nowrap;border-color:#bcb4ee;background:#7568df;color:#fff;box-shadow:0 5px 12px rgba(101,88,208,.18)}.douyin-bulk-type-editor>.secondary-button:hover{border-color:#6658d2;background:#6658d2;color:#fff}
.douyin-preview-card{grid-template-columns:34px 132px minmax(0,1fr);gap:9px;padding:8px;border-radius:11px}.douyin-preview-check-zone{min-height:0;border-radius:8px;font-size:9px!important}.douyin-preview-check-zone input{width:14px;height:14px}.douyin-preview-media{display:grid;grid-template-rows:minmax(0,1fr) auto;height:148px;min-height:0;border-radius:8px}.douyin-preview-media video{width:100%;height:100%;max-height:124px}.douyin-thumb-note{padding:3px 5px;font-size:8px;white-space:nowrap}.douyin-preview-content{gap:6px}.douyin-preview-head{gap:8px;min-height:25px}.douyin-item-origin{display:flex;align-items:center;gap:8px}.douyin-item-origin b{flex:none}.douyin-item-origin a{min-width:0}.douyin-item-label{flex:none;padding:3px 6px;font-size:9px}
.douyin-preview-fields{display:grid;grid-template-columns:minmax(170px,1.35fr) minmax(125px,1fr) minmax(115px,.8fr) minmax(115px,.8fr) minmax(150px,1fr);gap:6px}.douyin-preview-field{display:grid;gap:3px;min-width:0;color:#71819c;font-size:10px}.douyin-preview-field>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.douyin-preview-field input{height:31px;padding:5px 8px!important;border-radius:7px!important;font-size:11px!important}.douyin-type-picker{position:relative;min-width:0}.douyin-type-picker>input{padding-right:31px!important}.douyin-type-toggle{position:absolute;top:3px;right:3px;width:25px;height:25px;padding:0;border:0;border-radius:6px;background:#f0edff;color:#6558d0;font-size:15px;cursor:pointer}.douyin-type-toggle:hover{background:#e5e0ff}.douyin-type-menu{position:absolute;z-index:45;top:calc(100% + 4px);left:0;right:0;display:grid;max-height:190px;padding:5px;overflow:auto;border:1px solid #d9d4f3;border-radius:9px;background:#fff;box-shadow:0 12px 26px rgba(47,43,91,.18)}.douyin-type-menu.is-viewport-menu{position:fixed;z-index:10000;right:auto;bottom:auto;overscroll-behavior:contain}.douyin-type-option{display:grid;grid-template-columns:minmax(0,1fr) 25px;align-items:center;gap:3px}.douyin-type-menu button{min-height:29px;padding:5px 8px;border:0;border-radius:6px;background:transparent;color:#354c6f;font-size:11px;text-align:left;cursor:pointer}.douyin-type-menu button:hover{background:#efecff;color:#5b4bc7}.douyin-type-menu .douyin-type-delete{width:25px;min-height:25px;padding:0;color:#bd6b76;text-align:center}.douyin-type-menu .douyin-type-delete:hover{background:#fff0f2;color:#a94856}.douyin-type-empty{padding:8px;color:#8b97aa;font-size:9px;line-height:1.4;text-align:center}
.douyin-source-text{padding:0;border:0;border-radius:7px;background:#f7f8fc}.douyin-source-text>summary{padding:6px 9px;color:#687996;font-size:10px;font-weight:700;cursor:pointer}.douyin-source-text>p{max-height:72px;padding:0 9px 8px;overflow:auto;font-size:10px!important;line-height:1.45!important}.douyin-preview-footer{display:flex;align-items:center;gap:10px;min-width:0}.douyin-preview-meta{flex:none;font-size:9px}.douyin-evidence{min-width:0;overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1250px){.douyin-preview-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.douyin-field-title,.douyin-field-tags{grid-column:span 2}.douyin-preview-card{grid-template-columns:34px 118px minmax(0,1fr)}.douyin-preview-media{height:165px}.douyin-preview-media video{max-height:141px}}
@media(max-width:800px){.douyin-submit-actions{display:grid;grid-template-columns:1fr}.douyin-concurrency-control{width:max-content;margin-left:0}.douyin-bulk-type-editor{grid-template-columns:1fr}.douyin-bulk-type-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.douyin-preview-card{grid-template-columns:34px 105px minmax(0,1fr)}.douyin-preview-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.douyin-field-title,.douyin-field-tags{grid-column:1/-1}.douyin-preview-footer{align-items:flex-start;flex-direction:column;gap:4px}.douyin-evidence{white-space:normal}.douyin-preview-group>summary>span{display:grid;gap:3px}}
@media(max-width:620px){.douyin-bulk-type-fields{grid-template-columns:1fr}.douyin-preview-card{grid-template-columns:32px minmax(0,1fr)}.douyin-preview-check-zone{grid-row:1/3}.douyin-preview-media{grid-column:2;height:190px}.douyin-preview-content{grid-column:2}.douyin-preview-fields{grid-template-columns:1fr}.douyin-field-title,.douyin-field-tags{grid-column:auto}}

/* 分类下拉中的独立关键字搜索框。 */
.douyin-type-search-input{position:sticky;top:-5px;z-index:1;width:100%;height:29px;margin:-1px 0 3px;padding:5px 8px;border:1px solid #d8d2f4;border-radius:7px;background:#fff;color:#354c6f;font-size:10px;outline:none;box-sizing:border-box}.douyin-type-search-input:focus{border-color:#8c80ea;box-shadow:0 0 0 2px rgba(117,104,223,.12)}

/* COS 明细采用分页与紧凑行，避免几十条媒体记录把页面拉得过长。 */
.cos-pagination{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:9px 10px;border-top:1px solid #edf0f5;background:#fbfcfe;color:#8290a5;font-size:10px}
.cos-pagination .pagination-button{height:27px;padding:0 9px;border:1px solid #dce4ef;border-radius:7px;background:#fff;color:#64748b;font-size:10px;cursor:pointer}
.cos-pagination .pagination-button:disabled{opacity:.45;cursor:not-allowed}
.cos-pagination>span{min-width:72px;text-align:center;color:#687895;font-weight:600}
.cos-cleanup-details{margin-top:10px}
.cos-cleanup-table{overflow:hidden;border:1px solid #e7ebf2;border-radius:10px;background:#fff}
.cos-cleanup-row{min-height:44px!important;padding:7px 10px!important;font-size:10px!important}
.cos-cleanup-row-head{min-height:34px!important;padding-top:8px!important;padding-bottom:8px!important;background:#f7f9fc!important;color:#8190a6!important;font-weight:700!important}
.cos-cleanup-row .cos-case-name{font-weight:600;color:#455a78}
.cos-cleanup-row.is-ready{background:#fbfffd}
.task-list-panel .task-select-cell{cursor:pointer}
@media(max-width:620px){.cos-pagination{justify-content:flex-start;flex-wrap:wrap}.cos-pagination>span{margin-right:auto}}

/* 批量分类编辑区：限制控件最大宽度，避免大屏上横向拉伸过长。 */
.douyin-bulk-type-fields{width:100%;max-width:920px;justify-self:end;grid-template-columns:minmax(220px,1.35fr) minmax(170px,.9fr) minmax(170px,.9fr);gap:10px}
.douyin-bulk-type-fields input,.douyin-bulk-type-fields .douyin-type-picker>input{background:#fff!important;border-color:#d9dff0!important;box-shadow:0 1px 2px rgba(55,65,105,.04)!important}
.douyin-bulk-type-fields input:hover,.douyin-bulk-type-fields .douyin-type-picker>input:hover{border-color:#bfc7e3!important}
@media(max-width:800px){.douyin-bulk-type-fields{width:100%;max-width:none}}

/* 文案工坊：方向多选、模板类型提示和更充分的模板列表空间。 */
.creative-template-list{height:clamp(360px,52vh,560px);max-height:none;overscroll-behavior:contain;user-select:none}
.case-game-name-filter{width:170px;min-width:150px;height:38px;padding:0 12px;border:1px solid #d8def0;border-radius:10px;background:#fff;color:#25345b;font:inherit;outline:none;transition:border-color .2s,box-shadow .2s}
.case-game-name-filter:focus{border-color:#786ee8;box-shadow:0 0 0 3px rgba(120,110,232,.14)}
.creative-template-option{position:relative;min-height:56px;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.creative-template-option:hover{border-color:#bdb4f1;background:#fcfbff}
.creative-template-option.selected{box-shadow:0 0 0 2px rgba(125,112,231,.12)}
.creative-template-type-badge{display:inline-flex;align-items:center;width:max-content;margin-bottom:4px;padding:3px 7px;border-radius:999px;background:#f0edff;color:#6759cb;font-size:9px;font-style:normal;font-weight:700;line-height:1.2}
.creative-direction-panel{margin-top:12px;padding:11px 12px;border:1px solid #e0e5f1;border-radius:11px;background:linear-gradient(135deg,#fbfbff,#f8fbff)}
.creative-direction-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.creative-direction-head strong{display:block;color:#425574;font-size:11px}.creative-direction-head small{display:block;margin-top:3px;color:#8a99ac;font-size:9px}.creative-direction-head>span{color:#7568d5;font-size:10px;font-weight:700;white-space:nowrap}
.creative-direction-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.creative-direction-option{display:flex;align-items:flex-start;gap:6px;min-width:0;padding:7px 8px;border:1px solid #e3e7f0;border-radius:8px;background:#fff;cursor:pointer}.creative-direction-option:has(input:checked){border-color:#aaa0ef;background:#faf9ff}.creative-direction-option input{margin-top:2px;accent-color:#7167da}.creative-direction-option b{display:block;color:#4a5d7a;font-size:10px}.creative-direction-option small{display:block;margin-top:2px;color:#8b98a9;font-size:9px;line-height:1.35}
@media(max-width:620px){.creative-template-list{height:380px}.creative-direction-list{grid-template-columns:1fr}}
.creative-template-list{gap:10px;padding:4px 5px 6px;background:#f7f9fd;border:1px solid #e3e8f2;border-radius:12px}
.creative-template-list{grid-auto-rows:max-content!important;align-content:start!important}
.creative-template-option{display:grid!important;grid-template-columns:18px minmax(0,1fr)!important;align-items:start;min-height:128px!important;height:auto!important;overflow:visible!important;padding:12px 13px;gap:10px;line-height:1.45;box-shadow:0 2px 6px rgba(59,76,112,.04);box-sizing:border-box}
.creative-template-option input{flex:0 0 auto;width:15px;height:15px;margin-top:3px}
.creative-template-copy{display:flex!important;flex-direction:column;gap:5px;min-width:0;width:100%;height:auto!important;overflow:visible!important}
.creative-template-option .creative-template-type-badge{margin:0;width:max-content}
.creative-template-option strong{font-size:12px;line-height:1.35;color:#2f486a}
.creative-template-summary{margin:0!important;color:#71839c!important;font-size:10px!important;line-height:1.55!important;white-space:normal;overflow-wrap:anywhere}
.creative-template-structure,.creative-template-slots{padding-top:7px;border-top:1px solid #edf0f6;color:#657792;font-size:10px;line-height:1.55}
.creative-template-structure>b,.creative-template-slots>b{display:block;margin-bottom:4px;color:#526987;font-size:9px;font-weight:700}
.creative-template-structure ol{display:grid;gap:2px;margin:0;padding-left:18px;color:#6d7f96}
.creative-template-structure li{padding-left:2px;overflow-wrap:anywhere}
.creative-template-slots{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.creative-template-slots>b{margin:0 3px 0 0}
.creative-template-slots span{padding:3px 6px;border-radius:999px;background:#f0edff;color:#6559c4;font-size:9px}
.creative-template-example{padding-top:7px;border-top:1px solid #edf0f6;color:#71839c;font-size:10px}
.creative-template-example summary{cursor:pointer;color:#6b5fd0;font-weight:700}
.creative-template-example p{margin:6px 0 0;padding:7px 8px;border-radius:7px;background:#fffdf4;color:#78653a;line-height:1.55;overflow-wrap:anywhere}
.creative-template-example mark{padding:1px 3px;border-radius:3px;background:#fff0b8;color:#765a12}
.creative-template-copy .creative-template-overview,.creative-template-copy .creative-template-replace,.creative-template-copy .creative-template-preview{margin-top:6px;gap:4px}
.creative-template-copy .creative-template-overview>span,.creative-template-copy .creative-template-replace>span,.creative-template-copy .creative-template-preview>span{font-size:9px;color:#8998ac}
.creative-template-copy .creative-template-overview strong{font-size:10px;line-height:1.55;color:#62758f;font-weight:600;overflow-wrap:anywhere}
.creative-template-copy .creative-template-replace>div{gap:4px}
.creative-template-copy .creative-template-replace em{padding:3px 6px;border-radius:5px;background:#f1efff;color:#6658be;font-size:9px;font-style:normal}
.creative-template-copy .creative-template-preview pre{max-height:112px;margin:0;padding:8px;border:1px solid #e7ebf2;border-radius:8px;background:#fafbfe;color:#526681;font:10px/1.65 "Microsoft YaHei",sans-serif;white-space:pre-wrap;overflow:auto}
.creative-template-headline{display:flex!important;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.creative-template-headline>span:first-child{display:grid;gap:5px;min-width:0}
.creative-template-source-btn{flex:0 0 auto;height:27px;padding:0 8px;font-size:10px;white-space:nowrap}
.creative-template-source-modal{width:min(720px,calc(100vw - 28px));max-height:min(760px,calc(100vh - 28px));overflow:auto}
.creative-template-source-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid #e7ebf2}
.creative-template-source-head h2{margin:5px 0 0;color:#304969;font-size:18px}
.creative-template-source-head p{margin:5px 0 0;color:#7e8da2;font-size:11px}
.creative-template-source-count{padding:5px 8px;border-radius:999px;background:#f1efff;color:#6658be;font-size:10px;font-weight:700;white-space:nowrap}
.creative-template-source-meta{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0;padding:10px;border:1px solid #e3e8f2;border-radius:9px;background:#f8faff;color:#657792;font-size:10px}
.creative-template-source-list{display:grid;gap:8px}
.creative-template-source-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:11px 12px;border:1px solid #e1e7f0;border-radius:9px;background:#fff}
.creative-template-source-item strong{min-width:0;color:#3d5270;font-size:12px;overflow-wrap:anywhere}
.creative-template-source-item small{grid-column:1/-1;color:#8391a4;font-size:10px}
.creative-template-source-item>span{grid-column:2;grid-row:1;padding:3px 6px;border-radius:5px;background:#effbf6;color:#16845d;font-size:9px;white-space:nowrap}
.creative-template-source-empty{padding:28px 10px;color:#8a98aa;text-align:center;font-size:11px}
.douyin-bulk-type-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.douyin-bulk-type-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.douyin-bulk-type-fields{grid-template-columns:1fr}}
.template-workspace-card.selected{border-color:#8b80ef;background:#faf9ff;box-shadow:0 0 0 2px rgba(112,103,221,.10)}.template-workspace-card-title{display:flex;align-items:flex-start;gap:8px;min-width:0}.template-workspace-select{display:flex;align-items:center;gap:4px;flex:0 0 auto;margin-top:1px;color:#756bd8;font-size:10px;cursor:pointer}.template-workspace-select input{width:15px;height:15px;margin:0;accent-color:#7067dd}.template-workspace-card-title>div:last-child{min-width:0}.template-workspace-card-actions{display:flex;gap:6px;flex:0 0 auto}.template-workspace-card-actions button{white-space:nowrap}.template-result-panel .template-source-actions{align-items:center}.template-result-panel .template-source-actions span{white-space:nowrap}
.template-workspace-card{cursor:pointer;user-select:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.template-workspace-card:hover{border-color:#b8b0f0;background:#fcfbff}.template-workspace-card-actions button,.template-workspace-card input,.template-workspace-card label,.template-workspace-card details{cursor:pointer}.template-workspace-card-actions .danger-button{color:#b45f6b;border-color:#f0d6db;background:#fff8f9}.template-workspace-card-actions .danger-button:hover{background:#fff0f2;border-color:#dfabb4}.template-result-panel #templateWorkspaceDeleteBtn{height:32px;padding:0 10px;white-space:nowrap}.case-library-actions #generateCaseThumbnailBtn.hidden{display:inline-flex!important}
.template-workspace>.template-result-panel{align-self:start;height:fit-content;min-height:0}.template-workspace-template-list{min-height:0;height:auto;align-content:start}
.template-workspace-kind-panel{margin-top:12px;padding:10px;border:1px solid #e5e7f4;border-radius:12px;background:linear-gradient(145deg,#fcfcff,#f9fbff)}.template-workspace-kind-panel:first-of-type{margin-top:0}.template-workspace-kind-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 8px;color:#4c5d7e}.template-workspace-kind-head strong{font-size:12px}.template-workspace-kind-head span{padding:4px 8px;border-radius:999px;background:#efecff;color:#6557cf;font-size:10px;font-weight:700}.template-workspace-derived-panel{border-color:#eadfbe;background:linear-gradient(145deg,#fffdf7,#fbfcff)}.template-workspace-derived-panel .template-workspace-kind-head span{background:#fff2d4;color:#ad741d}
.template-workspace-filter-bar{display:grid;grid-template-columns:minmax(190px,1fr) 130px 112px 130px auto;align-items:center;gap:8px;margin:0 0 12px;padding:9px;border:1px solid #e8ecf4;border-radius:10px;background:#f6f8fd}.template-workspace-filter-search{display:flex;align-items:center;gap:6px;min-width:0;height:32px;padding:0 9px;border:1px solid #e1e6f0;border-radius:8px;background:#fff;color:#9aa5b7}.template-workspace-filter-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#4e5c73;font:inherit;font-size:11px}.template-workspace-filter-bar select{height:32px;min-width:0;padding:0 8px;border:1px solid #e1e6f0;border-radius:8px;background:#fff;color:#5c6980;font-size:11px}.template-workspace-filter-bar>span{justify-self:end;color:#8b98aa;font-size:10px;white-space:nowrap}.template-single-source-hint{padding:5px 8px;border-radius:999px;background:#eefaf5;color:#23835c;font-size:10px;white-space:nowrap}.template-workspace-source-link{display:inline-flex;align-items:center;justify-content:center;width:max-content;margin-top:6px;padding:3px 7px;border:1px solid #d9d4fb;border-radius:6px;background:#f6f4ff;color:#675bd0;font:10px/1.2 inherit;cursor:pointer}.template-workspace-source-link:hover{background:#eeeaff}.template-workspace-source-legacy{display:inline-block;margin-top:5px;color:#9aa6b5;font-size:10px}.template-workspace-category-badge{padding:3px 6px;border-radius:999px;background:#f0efff;color:#6658c6;font-size:10px}.template-workspace-meta{display:flex!important;align-items:center;flex-wrap:wrap;gap:6px}.template-workspace-meta>span:last-child{margin-left:auto;color:#9aa6b5}
@media(max-width:760px){.template-workspace-filter-bar{grid-template-columns:1fr 1fr}.template-workspace-filter-search{grid-column:1/-1}.template-workspace-filter-bar>span{justify-self:start}}
@media(max-width:460px){.template-workspace-filter-bar{grid-template-columns:1fr}.template-workspace-filter-search{grid-column:auto}.template-workspace-filter-bar select{width:100%}}
.douyin-bulk-type-editor{grid-template-columns:minmax(180px,220px) minmax(0,1fr) 104px;align-items:center;gap:10px;padding:10px 12px;border-radius:12px}
.douyin-bulk-type-fields{grid-template-columns:minmax(220px,1.3fr) minmax(150px,1fr) minmax(150px,1fr);gap:8px;min-width:0}
.douyin-bulk-type-fields .douyin-preview-field,.douyin-bulk-type-fields .douyin-type-picker{width:100%;min-width:0}
.douyin-bulk-type-fields input,.douyin-bulk-type-fields .douyin-type-picker>input{width:100%!important;box-sizing:border-box;height:32px!important;border:1px solid #d8dff0!important;border-radius:8px!important;box-shadow:none!important;outline:none}
.douyin-bulk-type-fields input:focus,.douyin-bulk-type-fields .douyin-type-picker>input:focus{border-color:#8c80ea!important;box-shadow:0 0 0 3px rgba(117,104,223,.12)!important}
.douyin-bulk-type-editor>.secondary-button{align-self:center;justify-self:stretch;width:100%;height:32px;margin:0}
.douyin-import-progress-actions{align-items:center;justify-content:flex-end;min-height:30px;margin:10px 0 0;padding-top:10px;border-top:1px solid #e9e9f5}
@media(max-width:800px){.douyin-bulk-type-editor{grid-template-columns:1fr}.douyin-bulk-type-editor>.secondary-button{justify-self:start;width:auto}}
.template-lab-boundaries,.template-workspace-boundaries{display:grid;gap:6px;margin:9px 0}.template-lab-boundary,.template-workspace-boundary{padding:7px 9px;border-radius:8px;background:#f7f8ff;border:1px solid #e8e9f8;font-size:11px;line-height:1.5}.template-lab-boundary span,.template-workspace-boundary span{display:block;margin-bottom:2px;font-size:10px;font-weight:700;color:#64748b}.template-lab-boundary p,.template-workspace-boundary p{margin:0;color:#4e6380}.template-lab-direct,.template-workspace-direct{background:#effbf6;border-color:#d2f0e1}.template-lab-direct span,.template-workspace-direct span{color:#16845d}.template-lab-adapt,.template-workspace-adapt{background:#fff8ed;border-color:#f4e1b8}.template-lab-adapt span,.template-workspace-adapt span{color:#ad751b}.template-lab-unsuitable,.template-workspace-unsuitable{background:#fff4f5;border-color:#f1d6da}.template-lab-unsuitable span,.template-workspace-unsuitable span{color:#b45e6d}.template-lab-scope,.template-workspace-scope{background:#f3f1ff;border-color:#ddd8fb}.template-lab-scope span,.template-workspace-scope span{color:#6958c9}

/* 抖音导入记录：完成后清理按钮紧贴内容显示，清理后不留下撑高的空白区域。 */
#douyinImportProgress{height:auto!important;min-height:0!important}
.douyin-import-progress-actions{display:flex!important;align-items:center;justify-content:flex-end;min-height:0!important;height:auto!important;margin:8px 0 0!important;padding:8px 0 0!important;border-top:1px solid #e9e9f5}
.douyin-import-progress-actions.hidden{display:none!important}

/* 品牌菜单：使用 brand-assets 中的正式图标，保持浅色页面的清爽层级。 */
.brand{align-items:center!important;gap:10px!important;padding:0 8px 28px!important}
.brand-mark,.login-card .brand-mark{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:11px!important;background:#fff!important;border:1px solid #dce6f2!important;box-shadow:0 5px 14px rgba(70,92,135,.10)!important;overflow:hidden}
.brand-logo-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px}
.brand strong{font-size:15px!important;letter-spacing:-.04em!important;color:#24324a!important}
.brand span{font-family:Inter,"Segoe UI",sans-serif!important;font-size:8px!important;line-height:12px!important;letter-spacing:.16em!important;color:#7b87a4!important}
.sidebar{background:linear-gradient(180deg,#fff 0%,#f8fbff 100%)!important;border-right-color:#e1e8f2!important;box-shadow:5px 0 24px rgba(50,74,118,.06)!important}
.sidebar nav{gap:6px!important}
.nav-item{min-height:42px!important;padding:8px 10px!important;border:1px solid transparent!important;border-radius:12px!important;color:#6f7d96!important;font-size:13px!important;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important}
.nav-item span{width:24px!important;height:24px!important;border-radius:8px!important;background:#f1f4f8!important;color:#73819a!important;font-size:14px!important;line-height:24px!important;flex:0 0 24px!important}
.nav-item:hover{background:#f6f8ff!important;border-color:#e3e7f4!important;color:#5d67a7!important;transform:translateX(1px)}
.nav-item.active{background:linear-gradient(100deg,#f3fbff 0%,#f2edff 100%)!important;border-color:transparent!important;border-left:3px solid #45c9f1!important;color:#695fd1!important;box-shadow:0 7px 16px rgba(113,101,208,.10)!important;padding-left:7px!important}
.nav-item.active span{background:#fff!important;color:#6d62da!important;box-shadow:0 3px 8px rgba(96,88,207,.12)!important}
.comfortable-table td.topic-col,.wide-table td.topic-col{max-width:290px;overflow:hidden}
.comfortable-table .topic-line,.wide-table .topic-line{display:inline-block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;-webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;vertical-align:middle}
.sidebar nav .nav-item:nth-of-type(5),.sidebar nav .nav-item:nth-of-type(7),.sidebar nav .nav-item:nth-of-type(10),.sidebar nav .nav-item:nth-of-type(12){margin-top:10px!important}
.sidebar nav .nav-item:nth-of-type(5)::before,.sidebar nav .nav-item:nth-of-type(7)::before,.sidebar nav .nav-item:nth-of-type(10)::before,.sidebar nav .nav-item:nth-of-type(12)::before{content:"";position:absolute;left:10px;right:10px;top:-7px;height:1px;background:#e8edf5}
.sidebar nav .nav-item{position:relative}
.login-card .brand-mark{margin:0 auto 12px!important}
@media(max-width:850px){.brand-mark,.login-card .brand-mark{width:34px!important;height:34px!important}.nav-item{min-height:54px!important}.nav-item span{width:24px!important;height:24px!important}.sidebar nav .nav-item::before{display:none!important}}
/* 菜单栏统一为品牌导航样式：白色圆角图标底、浅紫选中块、左侧蓝紫高亮线。 */
.sidebar .nav-item {
  position: relative!important;
  display: flex!important;
  align-items: center!important;
  gap: 11px!important;
  min-height: 44px!important;
  padding: 8px 12px!important;
  border: 1px solid transparent!important;
  border-radius: 12px!important;
  background: transparent!important;
  color: #6f7d96!important;
  font-size: 13px!important;
  line-height: 1!important;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease!important;
}
.sidebar .nav-item .nav-icon {
  display: inline-flex!important;
  flex: 0 0 27px!important;
  align-items: center!important;
  justify-content: center!important;
  width: 27px!important;
  height: 27px!important;
  padding: 0!important;
  border: 1px solid #e7eaf2!important;
  border-radius: 9px!important;
  background: #f3f5f9!important;
  color: #7e8aa3!important;
  font-size: 14px!important;
  line-height: 1!important;
  box-shadow: none!important;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease!important;
}
.sidebar .nav-item:hover {
  background: #f7f5ff!important;
  border-color: #e4defb!important;
  color: #625bd0!important;
}
.sidebar .nav-item:hover .nav-icon {
  background: #fff!important;
  border-color: #e1def7!important;
  color: #6f65d7!important;
  box-shadow: 0 3px 9px rgba(91, 85, 190, .10)!important;
}
.sidebar .nav-item.active {
  background: linear-gradient(105deg, #f1fbff 0%, #f1edff 100%)!important;
  border-color: #dedcff!important;
  border-left: 3px solid #55c7f0!important;
  color: #625bd0!important;
  box-shadow: 0 7px 17px rgba(103, 94, 205, .11)!important;
  padding-left: 10px!important;
}
.sidebar .nav-item.active .nav-icon {
  background: #fff!important;
  border-color: #eeeaff!important;
  color: #665dda!important;
  box-shadow: 0 3px 9px rgba(91, 85, 190, .13)!important;
}
.brand strong{white-space:nowrap!important;color:#24324a!important;font-size:14px!important;letter-spacing:-.03em!important}
.brand span{color:#7b87a4!important;letter-spacing:.14em!important}
.topbar{position:relative!important;overflow:hidden!important;background:linear-gradient(108deg,#f0edff 0%,#edf0ff 52%,#e5f8f4 100%)!important;border-color:#dfe1f5!important}
.topbar::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:18px 0 0 18px;background:linear-gradient(180deg,#6e62e4,#53c8ef)!important}
.topbar h1{color:#24324a!important;letter-spacing:-.04em!important}
.topbar .eyebrow{color:#665bd5!important}
@media(max-width:850px){
  .sidebar .nav-item{min-height:54px!important;padding:5px 3px!important;border-radius:9px!important;gap:3px!important}
  .sidebar .nav-item .nav-icon{flex-basis:27px!important;width:27px!important;height:27px!important}
  .sidebar .nav-item.active{border-left:0!important;border-bottom:3px solid #55c7f0!important;padding-left:3px!important}
}
/* 模板生成改为服务器后台任务后的紧凑状态区 */
.template-background-jobs {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid #dfe5f2;
  border-top: 3px solid #7869e8;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbfcff 0%, #f5f7ff 100%);
  box-shadow: 0 8px 24px rgba(67, 77, 132, .06);
}
.template-background-jobs-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.template-background-jobs-head > div { display:flex; align-items:baseline; gap:12px; min-width:0; }
.template-background-jobs-head strong { color:#182b52; font-size:16px; }
.template-background-jobs-head span { color:#8090ad; font-size:12px; }
.template-background-jobs-count { color:#6558d9 !important; white-space:nowrap; }
.template-background-jobs-list { display:grid; gap:8px; }
.template-background-job { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:11px 13px; border:1px solid #e1e6f3; border-radius:10px; background:#fff; }
.template-background-job.processing { border-color:#cbc5ff; background:#fcfbff; }
.template-background-job.failed { border-color:#f2cccc; background:#fffafa; }
.template-background-job.completed { border-color:#cfe9dd; background:#fbfffd; }
.template-background-job-main { min-width:0; flex:1; }
.template-background-job-title { display:flex; align-items:center; gap:8px; }
.template-background-job-title strong { color:#26395f; font-size:13px; }
.template-background-job-group-badge { padding:3px 7px; border-radius:999px; color:#5f56c9; background:#f0edff; font-size:10px; white-space:nowrap; }
.template-job-kind { padding:3px 7px; border-radius:999px; color:#6259d6; background:#efedff; font-size:11px; white-space:nowrap; }
.template-background-job p { margin:5px 0 5px; overflow:hidden; color:#8290aa; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.template-job-error { display:block; margin-bottom:5px; overflow:hidden; color:#d66a6a; text-overflow:ellipsis; white-space:nowrap; }
.template-job-progress { height:5px; overflow:hidden; border-radius:99px; background:#e9edf6; }
.template-job-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7869e8,#5ca8e8); transition:width .25s ease; }
.template-background-job-meta { display:flex; align-items:center; gap:10px; min-width:130px; justify-content:flex-end; }
.template-background-job-meta b { color:#665cda; font-size:13px; }
.template-background-job-meta small { color:#9aa6bc; white-space:nowrap; }
.template-background-job-meta .compact { padding:5px 9px; }
.template-background-jobs-empty { padding:10px 0 2px; color:#97a3b9; font-size:12px; }
@media (max-width: 760px) {
  .template-background-jobs-head, .template-background-jobs-head > div, .template-background-job { align-items:flex-start; flex-direction:column; }
  .template-background-job-meta { width:100%; justify-content:flex-start; }
}

/* 通用模板共享：明确区分我的模板、共享给我和全部可见 */
.template-workspace-actions { flex-wrap:wrap; }
.template-workspace-share-select { min-width:118px; }
.template-workspace-access { display:flex; align-items:center; gap:8px; margin:8px 0 2px; color:#8a96ad; font-size:12px; }
.template-workspace-share-badge { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; color:#5f56c9; background:#f0edff; border:1px solid #e4dfff; white-space:nowrap; }
.template-workspace-card.shared { border-color:#bfe4ef; background:linear-gradient(135deg,#fbffff 0%,#f7fbff 100%); }
.template-workspace-card.shared .template-workspace-share-badge { color:#198aa4; background:#eafaff; border-color:#cbeef7; }
.template-share-overlay { z-index:1200; }
.template-share-modal { width:min(560px,calc(100vw - 32px)); max-height:min(760px,calc(100vh - 32px)); overflow:auto; }
.template-share-modal .edit-hero { margin-bottom:18px; }
.template-share-grid { display:grid; gap:16px; }
.template-share-field, .template-share-field-label { display:grid; gap:7px; color:#52617c; font-size:13px; }
.template-share-field > span, .template-share-field-label > span { color:#26395f; font-weight:700; }
.template-share-field small, .template-share-field-label small { color:#93a0b8; font-weight:400; }
.template-share-field select { width:100%; min-height:40px; }
.template-share-users { max-height:260px; overflow:auto; display:grid; gap:7px; padding:8px; border:1px solid #e0e6f2; border-radius:12px; background:#fbfcff; }
.template-share-user { display:flex; align-items:center; gap:10px; padding:10px 11px; border:1px solid #e7ebf4; border-radius:10px; background:#fff; cursor:pointer; }
.template-share-user:hover { border-color:#c9c2fb; background:#faf9ff; }
.template-share-user input { width:16px; height:16px; accent-color:#7165df; }
.template-share-user span { display:grid; gap:3px; min-width:0; }
.template-share-user strong { color:#2a3d62; font-size:13px; }
.template-share-user small { color:#8b98af; font-size:11px; }
.template-share-empty { padding:20px 8px; color:#9aa6bb; text-align:center; }
@media (max-width: 760px) {
  .template-workspace-actions { width:100%; justify-content:flex-start; }
  .template-workspace-share-select { min-width:0; flex:1; }
}

/* 移动端最终收口：统一避免横向溢出、双栏挤压、按钮错位和下拉框被任务区遮挡 */
@media (max-width: 680px) {
  html, body { width:100%; max-width:100%; overflow-x:hidden; }
  .app-shell { display:block!important; width:100%!important; min-width:0!important; }
  .main-content { width:100%!important; max-width:100%!important; min-width:0!important; margin:0!important; padding:10px 10px 78px!important; }
  .main-content > *, .content-card, .section-card, .page-section { width:100%!important; max-width:100%!important; min-width:0!important; box-sizing:border-box; }

  .sidebar { position:fixed!important; z-index:1200!important; inset:auto 0 0 0!important; width:100%!important; height:64px!important; min-height:64px!important; padding:5px 6px!important; border:0!important; border-top:1px solid #e0e6f3!important; border-right:0!important; border-radius:16px 16px 0 0!important; box-shadow:0 -8px 24px rgba(55,72,115,.12)!important; }
  .sidebar .brand, .sidebar-bottom { display:none!important; }
  .sidebar nav { display:flex!important; align-items:stretch!important; width:100%!important; height:100%!important; gap:4px!important; overflow-x:auto!important; overflow-y:hidden!important; scrollbar-width:none; }
  .sidebar nav::-webkit-scrollbar { display:none; }
  .sidebar .nav-item { flex:0 0 76px!important; width:76px!important; min-width:76px!important; min-height:52px!important; height:52px!important; margin:0!important; padding:4px 3px!important; display:flex!important; flex-direction:column!important; justify-content:center!important; gap:3px!important; border:1px solid transparent!important; border-radius:10px!important; font-size:10px!important; line-height:1.1!important; text-align:center!important; transform:none!important; }
  .sidebar .nav-item::before { display:none!important; }
  .sidebar .nav-item .nav-icon { flex:0 0 25px!important; width:25px!important; height:25px!important; border-radius:8px!important; font-size:13px!important; }
  .sidebar .nav-item.active { border:1px solid #dedcff!important; border-bottom:3px solid #55c7f0!important; padding:3px!important; box-shadow:0 3px 10px rgba(103,94,205,.11)!important; }

  .topbar { display:flex!important; flex-direction:column!important; align-items:stretch!important; gap:10px!important; width:100%!important; min-width:0!important; padding:13px!important; border-radius:14px!important; }
  .topbar h1, .topbar .eyebrow { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .top-actions { display:flex!important; flex-wrap:wrap!important; align-items:center!important; justify-content:flex-start!important; width:100%!important; min-width:0!important; gap:6px!important; }
  .top-actions > * { flex:1 1 auto; min-width:0!important; max-width:100%!important; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px!important; }
  .stat-card { min-width:0!important; padding:11px!important; }
  .stat-card strong { font-size:24px!important; }

  .section-head, .section-actions, .case-library-actions, .case-library-actions-row, .template-workspace-actions { display:flex!important; flex-wrap:wrap!important; align-items:center!important; width:100%!important; min-width:0!important; gap:7px!important; }
  .section-actions > *, .case-library-actions > *, .case-library-actions-row > *, .template-workspace-actions > * { min-width:0!important; max-width:100%!important; }
  .comfortable-table, .wide-table, .table-wrap { display:block!important; width:100%!important; max-width:100%!important; overflow-x:auto!important; overflow-y:hidden!important; -webkit-overflow-scrolling:touch; }
  .comfortable-table table, .wide-table table { min-width:760px!important; }
  .filters, .filter-controls, .advanced-filter-panel { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; gap:8px!important; }
  .filters > *, .filter-controls > *, .advanced-filter-panel > * { width:100%!important; min-width:0!important; }

  .template-workspace { display:block!important; width:100%!important; min-width:0!important; padding:10px!important; }
  .template-source-panel, .template-result-panel { width:100%!important; min-width:0!important; margin:0 0 10px!important; overflow:visible!important; }
  .template-workspace-panel-head, .template-workspace-kind-head { display:flex!important; flex-wrap:wrap!important; align-items:center!important; gap:8px!important; }
  .template-workspace-panel-head > *, .template-workspace-kind-head > * { min-width:0!important; max-width:100%!important; }
  .template-source-tools { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; }
  .template-source-list, .template-workspace-template-list { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; max-height:none!important; overflow:visible!important; }
  .template-workspace-card { width:100%!important; min-width:0!important; box-sizing:border-box; }
  .template-workspace-card-head, .template-workspace-card-title, .template-workspace-card-actions { display:flex!important; flex-wrap:wrap!important; align-items:center!important; min-width:0!important; gap:6px!important; }
  .template-workspace-card-title > div:last-child { min-width:0!important; max-width:100%; overflow:hidden; }
  .template-workspace-card-actions > * { flex:1 1 auto; min-width:0!important; }

  .creative-studio-grid { display:block!important; width:100%!important; min-width:0!important; padding:0!important; }
  .creative-input-panel, .creative-settings-panel, .creative-results-panel { width:100%!important; min-width:0!important; margin:0 0 10px!important; }
  .creative-results-actions { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; }
  .creative-result-list { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; }
  .creative-result-card { min-width:0!important; overflow:hidden!important; }

  .task-workspace { display:block!important; width:100%!important; min-width:0!important; padding:0!important; }
  .task-list-panel, .task-insight-panel { width:100%!important; min-width:0!important; margin:0 0 10px!important; }
  .task-menu-bar-head { display:flex!important; flex-wrap:wrap!important; gap:7px!important; }
  .task-batch-toolbar, .task-filter-toolbar { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; width:100%!important; min-width:0!important; gap:7px!important; }
  .task-filter-search { grid-column:1/-1!important; width:100%!important; }
  .task-list { width:100%!important; max-height:none!important; overflow:visible!important; }
  .task-list-head, .task-row { grid-template-columns:minmax(0,1fr) auto!important; min-width:0!important; }
  .task-row .task-progress, .task-row .task-time { grid-column:1/-1!important; }

  .douyin-rule-list, .douyin-job-list { grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; }
  .douyin-preview-card, .douyin-preview-fields, .douyin-bulk-type-fields { grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; }
  .douyin-preview-toolbar, .douyin-submit-actions { display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; min-width:0!important; gap:8px!important; }
  .douyin-import-progress-actions { justify-content:flex-start!important; flex-wrap:wrap!important; }
  .douyin-import-progress-actions > * { max-width:100%!important; }
  .pagination-bar, .template-source-pagination, .task-pagination-bar, .cos-pagination { display:flex!important; flex-wrap:wrap!important; align-items:center!important; justify-content:flex-start!important; gap:6px!important; width:100%!important; min-width:0!important; }
  select, input, textarea, button { max-width:100%; }
}

@media (max-width:380px) {
  .main-content { padding-left:7px!important; padding-right:7px!important; }
  .stats-grid { grid-template-columns:minmax(0,1fr)!important; }
  .task-batch-toolbar, .task-filter-toolbar { grid-template-columns:minmax(0,1fr)!important; }
  .top-actions { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  .sidebar .nav-item { flex-basis:70px!important; width:70px!important; min-width:70px!important; }
}

/* 已保存通用模板：移动端双列卡片与分页，长正文只在卡片内滚动。 */
@media (max-width:680px) {
  .template-workspace-template-list {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  .template-workspace-card {
    min-width:0!important;
    width:100%!important;
    padding:9px!important;
    border-radius:11px!important;
    overflow:hidden!important;
  }
  .template-workspace-card-head,
  .template-workspace-card-title,
  .template-workspace-card-actions {
    display:flex!important;
    min-width:0!important;
    flex-wrap:wrap!important;
    gap:5px!important;
  }
  .template-workspace-card-title { align-items:flex-start!important; }
  .template-workspace-card-title > div:last-child { width:100%!important; }
  .template-workspace-card-title h3 { font-size:12px!important; line-height:1.4!important; max-height:34px!important; overflow:hidden!important; }
  .template-workspace-card-title p { font-size:10px!important; line-height:1.45!important; -webkit-line-clamp:2!important; max-height:29px!important; }
  .template-workspace-card-actions > * { flex:1 1 calc(50% - 5px)!important; min-width:0!important; padding:6px 4px!important; font-size:10px!important; white-space:nowrap!important; overflow:hidden!important; text-overflow:ellipsis!important; }
  .template-workspace-card-actions > :first-child { flex-basis:100%!important; }
  .template-workspace-access { display:block!important; margin:6px 0!important; padding:0!important; font-size:10px!important; }
  .template-workspace-access > span:not(.template-workspace-share-badge) { display:none!important; }
  .template-workspace-share-badge { max-width:100%!important; overflow:hidden!important; text-overflow:ellipsis!important; }
  .template-workspace-structure strong { display:-webkit-box!important; -webkit-box-orient:vertical!important; -webkit-line-clamp:2!important; overflow:hidden!important; font-size:10px!important; line-height:1.45!important; }
  .template-workspace-slots { max-height:49px!important; overflow:hidden!important; }
  .template-workspace-slots em { font-size:9px!important; padding:3px 5px!important; }
  .template-workspace-card .template-workspace-text pre { max-height:92px!important; min-height:56px!important; padding:7px!important; font-size:9px!important; line-height:1.5!important; }
  .template-workspace-card .template-workspace-example[open] { max-height:130px!important; }
  .template-workspace-card .template-workspace-example p { max-height:88px!important; font-size:9px!important; line-height:1.5!important; }
  .template-workspace-meta { display:block!important; overflow:hidden!important; text-overflow:ellipsis!important; white-space:nowrap!important; font-size:9px!important; }
  .template-workspace-pagination { display:flex!important; flex-wrap:wrap!important; align-items:center!important; justify-content:center!important; gap:5px!important; width:100%!important; margin:8px 0 2px!important; padding:7px 0 0!important; border-top:1px solid #e8ebf3!important; color:#8390a5!important; font-size:10px!important; }
  .template-workspace-pagination .pagination-button { min-width:54px!important; height:29px!important; padding:0 7px!important; font-size:10px!important; }
}

/* 手机底部菜单统一图标槽位和文字槽位，避免不同字数造成上下错位。 */
@media (max-width:680px) {
  .sidebar nav .nav-item {
    display:grid!important;
    grid-template-rows:25px 18px!important;
    align-content:center!important;
    justify-items:center!important;
    align-items:center!important;
    gap:3px!important;
    line-height:18px!important;
  }
  .sidebar nav .nav-item .nav-icon {
    display:grid!important;
    place-items:center!important;
    line-height:25px!important;
  }
  .sidebar nav .nav-item .nav-label {
    display:block!important;
    width:100%!important;
    height:18px!important;
    min-width:0!important;
    overflow:hidden!important;
    text-align:center!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:18px!important;
  }
}
.template-source-generation-summary{display:block;min-width:0;font-size:12px;color:#7785a6;white-space:normal;overflow-wrap:anywhere;line-height:1.5;margin-left:0}
.template-source-generation-filter{min-width:132px}
.template-source-generation-pill{white-space:nowrap;border:1px solid transparent}
.template-source-generation-pill.generated{color:#187b63;background:#e8f8f1;border-color:#b8ead7}
.template-source-generation-pill.generating{color:#8a6412;background:#fff5d9;border-color:#f3d98d}
.template-source-generation-pill.ungenerated{color:#6d7891;background:#f3f5fa;border-color:#dfe4ef}
.template-card-summary-compact{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:38px}
.template-card-access-compact{gap:8px!important;padding:6px 10px!important;min-height:30px}
.template-card-access-compact .template-workspace-share-badge{padding:3px 8px!important;font-size:11px!important}
.template-card-access-compact>span:not(.template-workspace-share-badge){font-size:11px;color:#7b88a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:900px){.template-source-generation-summary{width:100%;margin-left:0}.template-card-access-compact>span:not(.template-workspace-share-badge){white-space:normal}}

@media (min-width:681px){
  .template-source-tools > .template-source-generation-summary{grid-column:1 / -1;width:100%;}
}

/* Mobile compact pass: keep controls grouped, prevent empty-state overlap, and fit narrow phones. */
.empty-state{position:relative;inset:auto;min-height:260px;padding:42px 16px;box-sizing:border-box}
@media (max-width:680px){
  .empty-state{min-height:220px;padding:34px 14px}
  .empty-state p{max-width:30rem;line-height:1.55}
  .top-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;gap:6px!important;width:100%!important;padding:5px!important}
  .top-actions button{width:100%!important;min-width:0!important;height:36px!important;padding:0 5px!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
  .section-actions,.case-library-actions,.case-library-actions-row{width:100%!important;min-width:0!important}
  .case-library-actions-row,.section-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .case-library-actions-row>* ,.section-actions>*{width:100%!important;min-width:0!important}
  .view-switcher{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .filters{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .filters .search-box{grid-column:1/-1!important;width:100%!important}
  .filter-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .filter-controls>*{width:100%!important;min-width:0!important}
  .advanced-filter-panel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .advanced-filter-panel>*{width:100%!important;min-width:0!important}
  .pagination-bar{min-width:0!important}
}
@media (max-width:380px){
  .top-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .top-actions .primary-button{grid-column:1/-1!important}
  .stats-grid{grid-template-columns:1fr!important}
  .filter-controls,.advanced-filter-panel{grid-template-columns:minmax(0,1fr)!important}
}

/* Mobile generation controls and bottom navigation: keep every item the same size. */
@media (max-width:680px){
  .creative-generation-settings{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    align-items:stretch!important;
  }
  .creative-generation-settings label{
    min-width:0!important;
    min-height:58px!important;
    gap:5px!important;
  }
  .creative-generation-settings input,
  .creative-generation-settings select{
    width:100%!important;
    min-width:0!important;
    height:38px!important;
    padding:0 8px!important;
  }
  .sidebar nav .nav-item{
    flex:0 0 72px!important;
    width:72px!important;
    min-width:72px!important;
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;
    padding:4px 3px!important;
    gap:3px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
  .sidebar nav .nav-item .nav-icon{
    flex:0 0 25px!important;
    width:25px!important;
    height:25px!important;
    line-height:25px!important;
  }
  .template-source-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  .template-source-card{
    min-width:0!important;
    min-height:142px!important;
    padding:9px!important;
    grid-template-columns:16px minmax(0,1fr)!important;
    gap:6px!important;
  }
  .template-source-card input{width:15px!important;height:15px!important}
  .template-source-card>div{min-width:0!important}
  .template-source-card strong{font-size:11px!important;line-height:1.4!important}
  .template-source-card small{font-size:9px!important;line-height:1.4!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-source-card p{margin-top:5px!important;font-size:10px!important;line-height:1.45!important;-webkit-line-clamp:3!important}
  .template-source-card>.pill{grid-column:2!important;justify-self:start!important;margin-top:5px!important;font-size:9px!important;padding:4px 6px!important}
  .template-workspace-card .template-workspace-text pre{
    max-height:118px!important;
    overflow:auto!important;
    font-size:10px!important;
    line-height:1.55!important;
  }
  .template-workspace-card .template-workspace-example{
    max-width:100%!important;
    min-width:0!important;
  }
  .template-workspace-card .template-workspace-example[open]{
    max-height:190px!important;
    overflow:auto!important;
  }
  .template-workspace-card .template-workspace-example summary{
    position:sticky!important;
    top:0!important;
    z-index:1!important;
    padding:3px 0!important;
    background:#fff!important;
  }
  .template-workspace-card .template-workspace-example p{
    max-height:145px!important;
    overflow:auto!important;
    font-size:10px!important;
    line-height:1.55!important;
  }
}

/* 已保存模板移动端双列与分页最终覆盖规则 v9。 */
@media (max-width:680px){
  .template-workspace-template-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;min-width:0!important}
  .template-workspace-card{min-width:0!important;width:100%!important;padding:9px!important;border-radius:11px!important;overflow:hidden!important}
  .template-workspace-card-head,.template-workspace-card-title,.template-workspace-card-actions{display:flex!important;min-width:0!important;flex-wrap:wrap!important;gap:5px!important}
  .template-workspace-card-title{align-items:flex-start!important}.template-workspace-card-title>div:last-child{width:100%!important}
  .template-workspace-card-title h3{font-size:12px!important;line-height:1.4!important;max-height:34px!important;overflow:hidden!important}
  .template-workspace-card-title p{font-size:10px!important;line-height:1.45!important;-webkit-line-clamp:2!important;max-height:29px!important}
  .template-workspace-card-actions>*{flex:1 1 calc(50% - 5px)!important;min-width:0!important;padding:6px 4px!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-card-actions>:first-child{flex-basis:100%!important}.template-workspace-access{display:block!important;margin:6px 0!important;padding:0!important;font-size:10px!important}
  .template-workspace-access>span:not(.template-workspace-share-badge){display:none!important}.template-workspace-share-badge{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .template-workspace-structure strong{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;font-size:10px!important;line-height:1.45!important}
  .template-workspace-slots{max-height:49px!important;overflow:hidden!important}.template-workspace-slots em{font-size:9px!important;padding:3px 5px!important}
  .template-workspace-card .template-workspace-text pre{max-height:92px!important;min-height:56px!important;padding:7px!important;font-size:9px!important;line-height:1.5!important}
  .template-workspace-card .template-workspace-example[open]{max-height:130px!important}.template-workspace-card .template-workspace-example p{max-height:88px!important;font-size:9px!important;line-height:1.5!important}
  .template-workspace-meta{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:9px!important}
  .template-workspace-pagination{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto auto!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:normal!important;gap:6px!important;width:100%!important;margin:8px 0 2px!important;padding:9px 2px 2px!important;border-top:1px solid #e8ebf3!important;color:#8390a5!important;font-size:10px!important}
  .template-workspace-pagination>span:first-child{margin-right:0!important;white-space:nowrap!important;color:#61718b!important}
  .template-workspace-pagination .pagination-button{min-width:52px!important;height:29px!important;padding:0 7px!important;font-size:10px!important}
  .template-workspace-pagination .page-indicator{min-width:48px!important;height:29px!important;font-size:10px!important}
}

/* 模板工作台按面板实际宽度响应，避免缩放后标题和操作按钮互相挤压；手机端继续使用上面的原有规则。 */
@media (min-width:681px){
  .template-source-panel,
  .template-result-panel{container-type:inline-size}
  .template-source-panel > .template-workspace-panel-head{min-width:0}
  .template-source-panel > .template-workspace-panel-head > div:first-child{min-width:0;overflow-wrap:anywhere}
  .template-workspace-card{container-type:inline-size}
  .template-workspace-card-title{min-width:0}
  /* 浏览器缩放时，左侧面板会先于整页断点变窄；提前分行，避免标题被挤成竖排。 */
  @container (max-width:860px){
    .template-source-panel > .template-workspace-panel-head{flex-wrap:wrap}
    .template-source-panel > .template-workspace-panel-head > div:first-child{flex:1 1 100%;width:100%}
    .template-source-panel > .template-workspace-panel-head > .template-source-actions{flex:1 1 100%;width:100%;justify-content:flex-start;flex-wrap:wrap;white-space:normal;padding-left:0}
    .template-source-panel .template-append-target-control{flex:1 1 100%;max-width:none}
    .template-source-panel .template-append-target-control select{flex:1 1 auto}
  }
  @container (max-width:520px){
    .template-workspace-card-head{display:block}
    .template-workspace-card-title{width:100%}
    .template-workspace-card-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:5px;margin-top:9px;min-width:0}
    .template-workspace-card-actions>*{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  }
}

/* 手机底部菜单最终对齐：固定图标与文字两行高度，长菜单名不再改变基线。 */
@media (max-width:680px){
  .template-history-merge-list{grid-template-columns:1fr;max-height:260px}.template-history-merge-actions{align-items:stretch;flex-wrap:wrap}.template-history-merge-actions label{flex:1 1 100%;min-width:0}.template-history-merge-actions button{flex:1 1 auto}
  .template-source-actions .template-append-target-control{grid-column:1/-1;width:100%;max-width:none}
  .template-source-actions .template-append-target-control select{flex:1 1 auto;width:auto}
  .sidebar nav .nav-item{
    display:grid!important;
    grid-template-rows:25px 18px!important;
    align-content:center!important;
    justify-items:center!important;
    align-items:center!important;
    gap:3px!important;
    line-height:18px!important;
  }
  .sidebar nav .nav-item .nav-icon{
    display:grid!important;
    place-items:center!important;
    line-height:25px!important;
  }
  .sidebar nav .nav-item .nav-label{
    display:block!important;
    width:100%!important;
    height:18px!important;
    min-width:0!important;
    overflow:hidden!important;
    text-align:center!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:18px!important;
  }
}
.page-indicator .page-jump-input,
.template-workspace-pagination .page-jump-input {
  box-sizing: border-box;
  width: 44px;
  height: 29px;
  padding: 0 4px;
  border: 1px solid #dfe4ed;
  border-radius: 7px;
  background: #fff;
  color: #52617d;
  font: inherit;
  line-height: 27px;
  text-align: center;
  outline: none;
}
.page-indicator .page-jump-input:focus,
.template-workspace-pagination .page-jump-input:focus {
  border-color: #7b72e9;
  box-shadow: 0 0 0 3px rgba(123,114,233,.13);
}
.page-indicator .page-jump-total,
.template-workspace-pagination .page-jump-total {
  color: #68758d;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .page-indicator .page-jump-input,
  .template-workspace-pagination .page-jump-input {
    width: 40px;
    height: 28px;
  }
}
.page-indicator,
.template-workspace-pagination .page-indicator {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 70px !important;
  white-space: nowrap;
  flex: 0 0 auto;
}
.page-indicator .page-jump-total,
.template-workspace-pagination .page-jump-total {
  display: inline-block;
  line-height: 29px;
}
@media (max-width: 620px) {
  .page-indicator,
  .template-workspace-pagination .page-indicator {
    min-width: 66px !important;
  }
}
.creative-template-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 230px;
  min-width: 180px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  background: #fff;
  color: #9aa5b7;
}
.creative-template-search span {
  margin-left: 0 !important;
  color: #9aa5b7;
  font-size: 14px;
}
.creative-template-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #4e5c73;
  font: inherit;
  font-size: 11px;
}
.creative-template-tools {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(106px, 132px)) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  margin-bottom: 10px;
  border: 1px solid #e3e8f2;
  border-radius: 12px;
  background: #f7f9fd;
}
.creative-template-tools > select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #fff;
  color: #5f6f89;
  font: inherit;
  font-size: 11px;
  outline: 0;
}
.creative-template-tools > select:focus {
  border-color: #aaa0ef;
  box-shadow: 0 0 0 2px rgba(125,112,231,.1);
}
.creative-template-tools > button {
  white-space: nowrap;
  min-width: max-content;
}
.creative-template-tools > span {
  margin-left: 0 !important;
  white-space: nowrap;
  color: #7c8ca5;
  font-size: 10px;
}
@media (max-width: 620px) {
  .creative-template-search {
    flex-basis: 100%;
    min-width: 0;
  }
  .creative-template-tools {
    align-items: stretch;
  }
  .creative-template-tools button {
    flex: 1 1 auto;
  }
}
@media (max-width: 1080px) and (min-width: 621px) {
  .creative-template-tools {
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, 1fr));
  }
  .creative-template-tools > button,
  .creative-template-tools > span {
    justify-self: start;
  }
}
@media (max-width: 620px) {
  .creative-template-tools {
    display: flex !important;
    flex-wrap: wrap;
  }
  .creative-template-tools > select,
  .creative-template-tools > button {
    flex: 1 1 calc(50% - 4px);
  }
  .creative-template-tools > span {
    flex: 1 1 100%;
  }
}
/* 已保存模板：固定显示模板类别；自定义分类仍可独立修改。 */
.template-workspace-source-link{height:22px!important;min-height:22px!important;margin-top:0!important;padding:0 6px!important;border-radius:5px!important;font-size:9px!important;font-weight:600!important;line-height:1!important}
.template-workspace-source-link{border:1px solid #e1ddfb!important;background:#f8f7ff!important;color:#7167c9!important;box-shadow:none!important}
.template-workspace-source-link:hover{background:#efedff!important;border-color:#cfc8f7!important;color:#5c50bb!important}
.template-workspace-source-game{display:inline-flex!important;align-items:center;gap:3px;color:#91a0b7!important;font-size:10px!important;font-weight:600!important;white-space:nowrap}
.template-workspace-source-game-name{color:#667ca8!important;font-weight:700!important}
.template-workspace-source-case{max-width:42%;overflow:hidden;color:#7f8da5!important;font-size:10px!important;white-space:nowrap;text-overflow:ellipsis}
.template-workspace-source-legacy-label{color:#a1acbc!important;font-size:10px!important;white-space:nowrap}
.template-workspace-example-actions{display:flex;justify-content:flex-end;margin:4px 0 2px}
.template-workspace-example-actions .compact{height:24px!important;min-height:24px!important;padding:0 8px!important;border-radius:6px!important;font-size:10px!important;line-height:1!important}
@media(max-width:680px){.template-workspace-source-case{max-width:100%;flex:1 1 100%;order:3}.template-workspace-meta .template-workspace-source-link{order:2}}
@media(min-width:761px){.template-workspace-filter-bar{grid-template-columns:minmax(180px,1fr) 118px 104px 118px 118px auto!important}.template-workspace-filter-bar select{padding-left:6px;padding-right:6px!important}}
.template-workspace-kind-badge{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#f0efff;color:#6557cf;font-size:10px;font-weight:700;white-space:nowrap}
.template-workspace-kind-badge.derived{background:#fff2d4;color:#ad741d}
@media(max-width:680px){.template-workspace-access>.template-workspace-kind-badge{display:inline-flex!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}}
.template-workspace-game{display:flex;align-items:center;gap:5px;min-width:0;margin-top:4px;color:#8795ab;font-size:10px;line-height:1.35}
.template-workspace-game span{flex:none;color:#8795ab}
.template-workspace-game strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4e6287;font-size:11px;font-weight:700}
@media(max-width:680px){.template-workspace-game{max-width:100%;font-size:9px}.template-workspace-game strong{font-size:10px}}

/* Douyin preview: open remote media in a small centered dialog instead of loading it inside every card. */
.douyin-video-overlay{position:fixed;inset:0;z-index:45;display:grid;place-items:center;padding:22px;background:rgba(38,52,78,.42);backdrop-filter:blur(4px)}
.douyin-video-modal{width:min(720px,calc(100vw - 44px));padding:13px;border:1px solid #dfe5f1;border-radius:16px;background:#fff;box-shadow:0 20px 60px rgba(48,65,102,.24)}
.douyin-video-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 10px;color:#334b6c;font-size:13px}
.douyin-video-modal-head .modal-close{width:30px;height:30px;padding:0;border:1px solid #e1e7f0;border-radius:9px;background:#fff;color:#8b98ab;font-size:20px;line-height:1;cursor:pointer}
.douyin-video-modal-head .modal-close:hover{border-color:#c7c0f2;background:#f7f5ff;color:#6659d1}
.douyin-video-modal video{display:block;width:100%;max-height:min(70vh,560px);border-radius:11px;background:#151722;object-fit:contain}
.douyin-preview-media{position:relative}
.douyin-preview-play{position:absolute;left:50%;top:calc((100% - 20px)/2);transform:translate(-50%,-50%);display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:0;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:rgba(91,81,174,.85);color:#fff;box-shadow:0 3px 12px rgba(22,23,45,.24);cursor:pointer;transition:background .15s,transform .15s}
.douyin-preview-play:focus-visible{outline:3px solid #b9b2ff;outline-offset:3px}
.douyin-preview-play:hover{background:#6759d5;transform:translate(-50%,-50%) scale(1.03)}
.douyin-preview-play svg{display:block;pointer-events:none}
@media(max-width:620px){.douyin-video-overlay{padding:12px}.douyin-video-modal{width:calc(100vw - 24px);padding:10px}.douyin-video-modal video{max-height:68vh}}
.template-workspace-select-all{height:28px!important;min-height:28px!important;padding:0 9px!important;border-radius:7px!important;font-size:10px!important;line-height:1!important;white-space:nowrap!important}
.front-clip-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) 160px 150px 150px auto;align-items:center;gap:8px;margin:0 0 14px;padding:10px;border:1px solid #e6eaf3;border-radius:12px;background:#f7f9fd}.front-clip-toolbar .search-box{height:34px}.front-clip-toolbar select{height:34px;padding:0 9px;border:1px solid #dfe5ef;border-radius:8px;background:#fff;color:#5e6c84;font-size:11px}.front-clip-toolbar>span{justify-self:end;color:#8592a6;font-size:11px;white-space:nowrap}.front-clip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.front-clip-card{min-width:0;overflow:hidden;border:1px solid #e0e6f0;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(60,79,119,.06)}.front-clip-media{aspect-ratio:16/9;background:#1c2435}.front-clip-media video{display:block;width:100%;height:100%;object-fit:contain}.front-clip-body{padding:13px}.front-clip-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.front-clip-card-head strong{display:block;overflow:hidden;color:#30486b;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.front-clip-card-head small{display:block;margin-top:5px;color:#7569df;font-size:11px;font-weight:700}.front-clip-duration{flex:0 0 auto;padding:4px 7px;border-radius:7px;background:#f0edff;color:#665bd0;font-size:10px;font-weight:700}.front-clip-source{margin:11px 0 0;color:#687792;font-size:11px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.front-clip-meta{display:flex;justify-content:space-between;gap:8px;margin-top:8px;color:#96a1b2;font-size:10px}.front-clip-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px;min-height:22px}.front-clip-tags span{padding:4px 7px;border-radius:6px;background:#f0efff;color:#6658c6;font-size:10px}.front-clip-tags em{color:#a2aaba;font-size:10px;font-style:normal}.front-clip-actions{display:flex;gap:6px;margin-top:12px;padding-top:10px;border-top:1px solid #edf0f5}.front-clip-actions button{height:28px;padding:0 8px;border-radius:7px;font-size:10px}.front-clip-empty{grid-column:1/-1;padding:70px 20px;border:1px dashed #d9e0ec;border-radius:12px;color:#8795aa;text-align:center}.front-clip-empty strong{display:block;color:#5d6e88;font-size:14px}.front-clip-empty p{margin:8px 0 0;font-size:11px}.front-clip-editor-overlay{z-index:40}.front-clip-editor{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:18px;border:1px solid #dfe5f0;border-radius:16px;background:#fff;box-shadow:0 22px 60px rgba(39,55,91,.22)}.front-clip-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.front-clip-editor-head strong{display:block;color:#30486b;font-size:15px}.front-clip-editor-head small{display:block;margin-top:5px;color:#8794a8;font-size:11px}.front-clip-editor-video{display:block;width:100%;max-height:390px;border-radius:10px;background:#141a29}.front-clip-timeline{margin-top:13px;padding:12px;border:1px solid #e4e7f0;border-radius:11px;background:#f8f9fd}.front-clip-time-row{display:flex;align-items:end;gap:10px}.front-clip-time-row label{display:grid;gap:5px;color:#6d7b91;font-size:10px}.front-clip-time-row input{width:110px;height:31px;padding:0 8px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#394d6a;font-size:11px}.front-clip-time-row>span{margin-left:auto;color:#8b98aa;font-size:10px}.front-clip-time-row b{color:#665bd0}.front-clip-range{position:relative;height:30px;margin:10px 5px 0}.front-clip-range input{position:absolute;inset:0;width:100%;margin:0;pointer-events:none;appearance:none;background:transparent}.front-clip-range input::-webkit-slider-runnable-track{height:5px;border-radius:5px;background:#dfe4f2}.front-clip-range input::-webkit-slider-thumb{width:17px;height:17px;margin-top:-6px;border:2px solid #fff;border-radius:50%;background:#7569df;box-shadow:0 2px 5px rgba(68,75,132,.3);pointer-events:auto;appearance:none}.front-clip-selection-hint{color:#8996a9;font-size:10px;line-height:1.5}.front-clip-form{display:grid;grid-template-columns:1.4fr 1.4fr 150px;gap:10px;margin-top:13px}.front-clip-form label{display:grid;gap:5px;color:#6d7b91;font-size:10px}.front-clip-form input,.front-clip-form select{height:32px;padding:0 9px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#394d6a;font-size:11px}.front-clip-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.front-clip-editor-actions button{height:32px;padding:0 12px;border-radius:8px;font-size:11px}.front-clip-case-action{margin-left:5px}.front-clip-card-foot{display:flex;align-items:center;gap:6px}
@media(max-width:950px){.front-clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.front-clip-toolbar{grid-template-columns:1fr 1fr}.front-clip-toolbar .search-box{grid-column:1/-1}.front-clip-toolbar>span{justify-self:start}}
@media(max-width:620px){.front-clip-grid{grid-template-columns:1fr}.front-clip-form{grid-template-columns:1fr}.front-clip-time-row{flex-wrap:wrap}.front-clip-time-row>span{margin-left:0}.front-clip-editor-actions{flex-wrap:wrap}.front-clip-editor-actions button{flex:1}}
.front-clip-import-zone{display:flex;align-items:center;gap:12px;margin:12px 0 14px;padding:14px 16px;border:1px dashed #cfd7ea;border-radius:12px;background:linear-gradient(135deg,#fbfcff,#f6f5ff);color:#74829a;cursor:pointer;transition:border-color .18s,background .18s,box-shadow .18s}.front-clip-import-zone:hover,.front-clip-import-zone.is-dragging{border-color:#8175e8;background:#f1efff;box-shadow:0 8px 20px rgba(111,98,220,.1)}.front-clip-import-zone.is-uploading{opacity:.7;pointer-events:none}.front-clip-import-zone strong{display:block;color:#4d5d7d;font-size:12px}.front-clip-import-zone p{margin:4px 0 0;color:#9aa5b7;font-size:10px}.front-clip-import-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e9e6ff;color:#7064dc;font-size:18px}.front-clip-import-zone .secondary-button{margin-left:auto;flex:0 0 auto;height:30px;padding:0 11px;font-size:11px}
.front-clip-range input[data-front-clip-start-range]{z-index:2}.front-clip-range input[data-front-clip-end-range]{z-index:1}.front-clip-range input{touch-action:none}
.front-clip-range input[data-front-clip-start-range]::-webkit-slider-thumb{background:#7569df}.front-clip-range input[data-front-clip-end-range]::-webkit-slider-thumb{background:#e46b9a}.front-clip-range input[data-front-clip-start-range]::-moz-range-thumb{background:#7569df}.front-clip-range input[data-front-clip-end-range]::-moz-range-thumb{background:#e46b9a}
.front-clip-range::before{content:"";position:absolute;left:0;right:0;top:12px;height:5px;border-radius:5px;background:#dfe4f2;pointer-events:none;z-index:0}.front-clip-range input::-webkit-slider-runnable-track{background:transparent!important}.front-clip-range input::-moz-range-track{background:transparent!important}.front-clip-range input[data-front-clip-start-range]{z-index:3}.front-clip-range input[data-front-clip-end-range]{z-index:2}
.front-clip-toolbar .search-box{display:flex;align-items:center;width:100%;min-width:0;overflow:hidden;box-sizing:border-box;border:1px solid #e0e6f0!important;background:#fff!important;box-shadow:none!important;padding:0 10px!important}.front-clip-toolbar .search-box>span{flex:0 0 auto}.front-clip-toolbar .search-box input{flex:1 1 auto;min-width:0;width:0!important;height:100%;margin:0!important;box-sizing:border-box;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;appearance:none}
.front-clip-category{display:inline-flex;margin-top:7px;padding:3px 7px;border-radius:6px;background:#edf0ff;color:#655bd2;font-size:9px;font-weight:700}.front-clip-category.shooting{background:#ffe9f1;color:#c24d79}
.front-clip-visibility-note{margin:8px 0 0;color:#8794a8;font-size:10px;line-height:1.5}
.front-clip-form{grid-template-columns:1fr 1fr}
@media(max-width:620px){.front-clip-form{grid-template-columns:1fr}}
.front-clip-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.front-clip-card{border-radius:10px;box-shadow:0 3px 10px rgba(60,79,119,.05)}.front-clip-body{padding:10px}.front-clip-card-head strong{font-size:11px}.front-clip-card-head small{margin-top:3px;font-size:10px}.front-clip-duration{padding:3px 5px;font-size:9px}.front-clip-source{margin-top:7px;font-size:10px}.front-clip-meta{margin-top:5px;font-size:9px}.front-clip-tags{gap:3px;margin-top:6px;min-height:18px}.front-clip-tags span{padding:3px 5px;font-size:9px}.front-clip-actions{gap:4px;margin-top:8px;padding-top:7px}.front-clip-actions button{height:24px;padding:0 6px;font-size:9px}.batch-front-clip-modal{width:min(600px,calc(100vw - 32px))}.batch-front-clip-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 0}.batch-front-clip-form label{display:grid;gap:5px;color:#6d7b91;font-size:11px}.batch-front-clip-form input,.batch-front-clip-form select{height:34px;padding:0 9px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#394d6a;font-size:12px}.batch-front-clip-progress{margin:2px 0 12px;padding:9px 10px;border-radius:8px;background:#f1efff;color:#665bd0;font-size:11px}@media(max-width:1180px){.front-clip-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:950px){.front-clip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.front-clip-grid{grid-template-columns:1fr}.batch-front-clip-form{grid-template-columns:1fr}}
.front-clip-source-overlay{z-index:42}.front-clip-source-modal{width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:16px;border:1px solid #dfe5f0;border-radius:14px;background:#fff;box-shadow:0 22px 60px rgba(39,55,91,.22)}.front-clip-source-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.front-clip-source-head strong{display:block;color:#30486b;font-size:15px}.front-clip-source-head small{display:block;margin-top:4px;color:#8794a8;font-size:11px}.front-clip-source-head button{width:28px;height:28px;padding:0}.front-clip-source-modal>video{display:block;width:100%;max-height:420px;border-radius:10px;background:#141a29}.front-clip-source-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.front-clip-source-fields>div{padding:10px 11px;border:1px solid #e5e9f1;border-radius:9px;background:#fafbfe}.front-clip-source-fields .full{grid-column:1/-1}.front-clip-source-fields label{display:block;margin-bottom:5px;color:#8a96a9;font-size:10px}.front-clip-source-fields strong{color:#405573;font-size:12px}.front-clip-source-fields p{margin:0;color:#5f6f88;font-size:11px;line-height:1.7;white-space:pre-wrap}@media(max-width:620px){.front-clip-source-fields{grid-template-columns:1fr}.front-clip-source-fields .full{grid-column:auto}}
.front-clip-meta-overlay{z-index:44}.front-clip-meta-modal{width:min(520px,calc(100vw - 32px));padding:18px;border:1px solid #dfe5f0;border-radius:14px;background:#fff;box-shadow:0 22px 60px rgba(39,55,91,.22)}.front-clip-meta-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.front-clip-meta-head strong{display:block;color:#30486b;font-size:15px}.front-clip-meta-head small{display:block;margin-top:5px;color:#8794a8;font-size:11px}.front-clip-meta-head button{width:28px;height:28px;padding:0}.front-clip-meta-form{display:grid;grid-template-columns:1fr 1fr;gap:11px}.front-clip-meta-form label{display:grid;gap:5px;color:#6d7b91;font-size:11px}.front-clip-meta-form label.full{grid-column:1/-1}.front-clip-meta-form input,.front-clip-meta-form select{height:34px;padding:0 9px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#394d6a;font-size:12px}.front-clip-meta-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.front-clip-meta-actions button{height:32px;padding:0 13px;border-radius:8px;font-size:11px}@media(max-width:620px){.front-clip-meta-form{grid-template-columns:1fr}.front-clip-meta-form label.full{grid-column:auto}}
