/* Dense layouts retain readable data and keep wide records in a local scroll area. */
.work-image-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid var(--line);font-size:12px}
.work-image-toolbar label{display:flex;align-items:center;gap:6px;white-space:nowrap}
.work-image-toolbar select,.work-image-toolbar button{min-height:30px;padding:4px 7px;font-size:12px;white-space:nowrap}
.work-image-toolbar [role=status]{font-size:11px}
#content .work-image-paper{width:max-content;margin:0;padding:0;border-radius:0;overflow:visible;box-shadow:none}
.work-image-caption{display:flex;flex-direction:column;gap:4px;padding:10px 12px;white-space:nowrap;font-size:14px}
.work-image-caption span{font-size:12px;color:var(--theme-muted)}
#content .work-image-paper table{width:max-content;min-width:0}
body #content .work-image-paper table td{max-width:none!important;overflow:visible!important;text-overflow:clip}
#content .work-image-cards td::before{display:none!important;content:none!important}
#app .work-image-cell-label{display:block;font-size:11px;color:var(--theme-muted)!important;margin-bottom:6px}
@media(max-width:760px){.work-image-toolbar{padding:6px 8px;gap:5px}.work-image-toolbar select,.work-image-toolbar button{font-size:11px;padding:4px 5px}.work-image-toolbar [role=status]{flex-basis:100%;font-size:10px}}
.work-mobile-only{display:none}
body[data-density=compact] main{padding:14px 14px 22px;max-width:none}
body[data-density=compact] .topbar{height:52px;padding:0 18px}
body[data-density=compact] .page-heading{margin-bottom:12px;gap:12px}
body[data-density=compact] .page-heading h1{font-size:25px;margin-bottom:4px}
body[data-density=compact] .filter-panel{padding:11px 14px;margin-bottom:11px}
body[data-density=compact] .filters,body[data-density=compact] .work-fields{gap:8px 10px}
body[data-density=compact] .field{gap:4px;font-size:13px}
body[data-density=compact] .filters input,body[data-density=compact] .filters select,body[data-density=compact] .work-fields input,body[data-density=compact] .work-fields select{min-height:34px;padding:5px 8px}
body[data-density=compact] .period-shortcuts{margin-bottom:8px;gap:5px}
body[data-density=compact] .period-shortcuts button{min-height:30px;padding:4px 9px}
body[data-density=compact] .work-settings,body[data-density=compact] .work-notes{padding:10px 14px;margin-bottom:11px}
body[data-density=compact] .work-hint{margin-top:6px;font-size:11px;line-height:1.5}
body[data-density=compact] .work-caption{margin:10px 0 5px}
body[data-density=compact] .analysis-toolbar{margin:10px 0}
body[data-density=compact] .metrics{gap:8px;margin-bottom:12px}
body[data-density=compact] .metrics article{padding:11px 14px}
body[data-density=compact] .metrics article>span{font-size:13px}
body[data-density=compact] .metrics strong{font-size:30px;line-height:1.25;margin:5px 0}
body[data-density=compact] .metrics p{margin:4px 0 0}
body[data-density=compact] #content .table-scroll{overflow:auto;max-width:100%;overscroll-behavior-x:contain}
body[data-density=compact] #content table{font-size:14px;white-space:nowrap}
body[data-density=compact] #content table th{font-size:13px;padding:7px 10px;white-space:nowrap;line-height:1.4}
body[data-density=compact] #content table td{font-size:14px;padding:6px 10px;white-space:nowrap;line-height:1.5;max-width:400px;overflow:hidden;text-overflow:ellipsis}
body[data-density=compact] #content table td small{display:inline;margin:0 0 0 7px;font-size:12px;white-space:nowrap;max-width:none}
body[data-density=compact] #content table td button,body[data-density=compact] #content table td .download-link{min-height:28px;padding:3px 7px;font-size:12px;white-space:nowrap}
body[data-density=compact] .pagination{padding:7px 12px;font-size:12px}
body[data-density=compact] .pagination button{min-height:30px;padding:4px 8px;font-size:12px}
body[data-density=compact] .analysis-tabs button{min-height:32px;padding:5px 10px;font-size:13px}
body[data-density=compact] .sidebar{padding-top:18px}
body[data-density=compact] .sidebar .brand{padding-bottom:16px}
@media(min-width:761px){
 body[data-density=comfortable] #content table td{font-size:14px;padding:14px 16px}
 body[data-density=comfortable] #content table th{font-size:13px}
}
@media(max-width:760px){
 /* One navigation strip and one account strip replace the tall mobile masthead. */
 .sidebar,body[data-density=compact] .sidebar{padding:2px 8px 0}
 .sidebar .brand{display:none}
 .sidebar nav{gap:2px;align-items:center}
 .sidebar nav .nav-item{min-height:32px;padding:5px 9px;font-size:12px;white-space:nowrap}
 .topbar,body[data-density=compact] .topbar{height:35px;padding:0 9px;gap:6px}
 .breadcrumb{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
 .user-tools{gap:5px;flex-shrink:0}
 .user-tools .avatar,.user-tools small{display:none}
 .user-tools>div b{font-size:11px;max-width:65px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
 .user-tools button{font-size:11px;padding:4px 6px;min-height:28px;white-space:nowrap}
 main,body[data-density=compact] main,body[data-density=compact] main:has(.analysis-filter){padding:9px 9px 14px}
 .page-heading,body[data-density=compact] .page-heading{gap:5px;margin-bottom:8px;align-items:center}
 .page-heading>div:first-child{min-width:0}
 .page-heading .eyebrow,.page-heading p{display:none}
 .page-heading h1,body[data-density=compact] .page-heading h1{font-size:18px;line-height:1.25;margin:0;white-space:nowrap}
 .heading-actions{flex-wrap:nowrap;gap:4px}
 .heading-actions button{min-height:30px;font-size:11px;padding:4px 6px;white-space:nowrap}
 .work-mobile-only{display:block}
 .work-filter-toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:4px!important;margin:0!important;overflow:visible}
 .work-filter-toolbar button{min-height:31px!important;font-size:11px;padding:4px 6px!important;white-space:nowrap}
 .work-filter-toolbar button:first-child{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis}
 .work-filter:not(.filters-open) #work-form,.work-filter:not(.filters-open)>.work-hint{display:none}
 .work-filter.filters-open #work-form{margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}
 .work-settings summary span{display:inline;margin:0 0 0 7px;font-size:10px}
 body[data-density=compact] .filter-panel{padding:8px 9px;margin-bottom:8px}
 body[data-density=compact] .work-settings,body[data-density=compact] .work-notes{padding:8px 10px;margin-bottom:8px}
 body[data-density=compact] .filters .field,body[data-density=compact] .work-fields .field{gap:3px;font-size:11px}
 body[data-density=compact] .filters input,body[data-density=compact] .filters select{min-height:34px;padding:4px 7px;font-size:16px}
 body[data-density=compact] .work-caption{flex-wrap:nowrap;gap:8px;overflow:auto;white-space:nowrap;font-size:10px;line-height:1.5;margin:7px 0 4px}
 body[data-density=compact] .work-caption>*{flex-shrink:0}
 body[data-density=compact] .work-caption+.work-hint{white-space:nowrap;overflow:auto;font-size:10px;line-height:1.4;margin:0 0 6px}
 body[data-density=compact] .analysis-metrics{display:flex!important;overflow:auto!important;gap:0;margin:7px 0}
 body[data-density=compact] .analysis-metrics article{flex:1;min-width:max-content!important;padding:7px 9px;border-right:1px solid var(--line)}
 body[data-density=compact] .analysis-metrics article>span{font-size:10px;white-space:nowrap;min-height:0;line-height:1.4}
 body[data-density=compact] .analysis-metrics strong,body[data-density=compact] .analysis-metrics .metric-mobile{font-size:20px;line-height:1.25;margin:3px 0;white-space:nowrap}
 body[data-density=compact] .analysis-toolbar{margin:7px 0}
 body[data-density=compact] .analysis-tabs{flex-wrap:nowrap;overflow:auto}
 body[data-density=compact] .analysis-tabs button{min-height:30px;padding:4px 8px;font-size:11px;white-space:nowrap}
 body[data-density=compact] #content .table-scroll{overflow:auto;max-width:100%}
 body[data-density=compact] #content table,body[data-density=compact] #content .compact-detail-table{display:table!important;width:100%;min-width:100%;white-space:nowrap;table-layout:auto}
 body[data-density=compact] #content table thead{display:table-header-group!important}
 body[data-density=compact] #content table tbody{display:table-row-group!important}
 body[data-density=compact] #content table tr{display:table-row!important;padding:0;border:0}
 body[data-density=compact] #content table th,body[data-density=compact] #content table td,body[data-density=compact] #content table .detail-cell{display:table-cell!important;padding:5px 8px!important;font-size:13px!important;line-height:1.45;white-space:nowrap!important;max-width:340px;min-width:0;border-bottom:1px solid var(--line);overflow:hidden;text-overflow:ellipsis}
 body[data-density=compact] #content table th{font-size:11px!important;padding:7px 8px!important}
 body[data-density=compact] #content table td::before{display:none!important}
 body[data-density=compact] #content table td b{font-size:13px!important;white-space:nowrap}
 body[data-density=compact] #content table td small{display:inline!important;font-size:11px!important;margin-left:6px;white-space:nowrap!important}
 body[data-density=compact] #content table td button,body[data-density=compact] #content table .row-actions button{display:inline-flex;align-items:center;min-height:29px!important;padding:3px 6px!important;font-size:11px!important}
 body[data-density=compact] #content table .row-actions{flex-wrap:nowrap}
 body[data-density=compact] .table-sort-mobile{padding:5px 8px;gap:6px}
 body[data-density=compact] .table-sort-mobile select,body[data-density=compact] .table-sort-mobile button{min-height:28px;padding:3px 6px;font-size:11px}
 body[data-density=compact] .table-sort-mobile label{font-size:10px}
 body[data-density=compact] .pagination{padding:6px 8px;gap:6px;white-space:nowrap}
 body[data-density=compact] .pagination button{font-size:11px;min-height:29px;padding:3px 7px}
 body[data-density=compact] footer{padding:12px 9px;font-size:10px}
}
.work-week-short,.official-mobile-bar{display:none}
@media(max-width:760px){
 .heading-actions{flex-direction:row!important;align-items:center;flex-shrink:0}
 body[data-density=compact] .work-detail-filter .filters{flex-wrap:nowrap;overflow:auto;gap:8px}
 body[data-density=compact] .work-detail-filter .field{flex:0 0 134px!important;width:134px!important}
 body[data-density=compact] .work-detail-filter .field:nth-last-child(-n+2){flex-basis:110px!important;width:110px!important}
 body[data-density=compact] .work-week-full{display:none}
 body[data-density=compact] .work-week-short{display:inline;white-space:nowrap}
 body[data-density=compact] .official-mobile-bar{display:flex;align-items:center;justify-content:space-between;gap:8px}
 body[data-density=compact] .official-mobile-bar button{min-height:30px;padding:4px 8px;font-size:12px}
 body[data-density=compact] .official-filter:not(.filters-open) #query-form{display:none}
 body[data-density=compact] .official-filter.filters-open #query-form{margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}
}

.work-query-status{padding:10px 14px;margin:0 0 12px;border-left:3px solid var(--theme-accent-text)}
.work-progress-top{display:flex;align-items:center;gap:10px;white-space:nowrap;font-size:13px}
.work-progress-top b{flex:1}.work-progress-top button{padding:4px 9px;min-height:30px}
#work-progress{margin:6px 0 2px;font-size:14px}#work-progress-detail{margin:0;font-size:12px;overflow-wrap:anywhere}
#work-progress-detail:empty{display:none}#work-progress-bar{display:block;width:100%;height:6px;margin-top:8px;accent-color:var(--theme-accent-text)}
.work-query-status[data-status=complete]{border-left-color:var(--theme-success)}.work-query-status[data-status=error]{border-left-color:var(--theme-danger)}
@media(max-width:760px){.work-query-status{padding:8px 10px;margin-bottom:8px}#work-progress{font-size:13px}#work-progress-detail{font-size:12px}.work-progress-top{gap:8px;font-size:12px}}

@media(min-width:761px){.workspace main,.workspace footer{max-width:none;width:100%}.workspace main{padding-left:14px;padding-right:14px}.workspace .topbar{padding-left:14px;padding-right:14px}}

.pagination{flex-wrap:wrap;gap:8px 12px}.pagination .page-size-control{display:flex;align-items:center;gap:5px;white-space:nowrap;margin-left:auto;font-size:12px}
.pagination [data-page-size]{width:94px;min-height:30px;padding:4px 7px;font-size:12px}
@media(max-width:760px){.pagination{column-gap:6px}.pagination .page-size-control{font-size:11px;gap:3px}.pagination [data-page-size]{width:73px;min-height:29px;padding:3px 4px;font-size:11px}}

/* Account batches keep selection visible without expanding table rows. */
.users-bulk-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--line)}
.users-bulk-bar b{margin-right:auto;font-size:13px}
.users-table input[type=checkbox]{width:17px;height:17px;min-height:0;cursor:pointer;vertical-align:middle;accent-color:var(--accent)}
.users-table th:first-child,.users-table td:first-child{width:38px;min-width:38px;text-align:center}
.batch-users-form textarea{width:100%;min-height:140px;resize:vertical;white-space:pre;overflow:auto;font-family:inherit;font-size:13px}
.batch-help{font-size:12px;color:var(--muted);line-height:1.65;margin:10px 0}
#batch-preview{font-size:13px;margin:12px 0}
@media(max-width:760px){.users-bulk-bar{gap:7px;padding:8px}.users-bulk-bar b{flex-basis:100%}.users-bulk-bar button{min-height:34px}.batch-users-form textarea{min-height:110px}}

body #content .work-filter-toolbar button[aria-pressed=true],body #content .work-filter-toolbar button.primary:not(:disabled){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent-text)!important;font-weight:600}

.work-image-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%}
.work-room-link{display:none!important}
.work-scroll-hint{margin:0;padding:6px 9px;color:var(--theme-muted);font-size:11px}
@media(max-width:760px){
 .work-desktop-only{display:none!important}
 .work-filter-toolbar button:first-child{order:3;flex:1;text-align:center}
 .work-filter-toolbar [data-work=query]{order:4;min-width:64px}
 .work-filter-toolbar button{min-height:38px!important;font-size:12px!important}
 .work-mobile-context{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--theme-muted);margin:8px 0 5px;white-space:nowrap}
 .work-filter:not(.filters-open) #work-form{display:block}
 .work-filter #work-form{margin:0!important;padding:0!important;border:0!important}
 .work-filter #work-form .work-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .work-filter #work-form .field{width:auto!important;min-width:0!important;max-width:100%;margin:0}
 .work-filter #work-form .room-select{grid-column:1/-1}
 .work-filter #work-form .room-select>span{display:none}
 .work-filter #work-form .room-select select{appearance:none;min-height:40px;padding-right:22px;font-size:14px;width:100%;text-overflow:ellipsis}
 .work-filter:not(.filters-open) #work-form .field:not(.room-select),.work-filter:not(.filters-open) #work-form [type=submit]{display:none}
 .work-filter.filters-open #work-form [type=submit]{grid-column:1/-1;min-height:38px}
 .work-query-status[data-status=complete]{display:none}
 .work-caption>span,.work-caption+.work-hint{display:none!important}
 .work-tabs .analysis-tabs{display:grid!important;grid-template-columns:repeat(3,1fr);gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden}
 .work-tabs .analysis-tabs button{border-radius:0;min-height:38px!important;font-size:13px!important}
 .work-tabs .analysis-tabs button.selected{border-bottom:0}
 .work-detail-toggle,.work-tools-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:38px;border:0;background:transparent!important;font-size:13px;padding:6px 9px;text-align:left}
 .work-detail-toggle span,.work-tools-toggle span{font-size:11px;color:var(--theme-muted)}
 .work-detail-filter .filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible!important;padding-top:6px}
 body[data-density=compact] .work-detail-filter .field,body[data-density=compact] .work-detail-filter .field:nth-last-child(-n+2){width:auto!important;min-width:0!important}
 .work-detail-filter .field:has([name=work_people_search]){grid-column:1/-1;grid-row:1}
 .work-detail-filter:not(.details-open) .field:not(:has([name=work_people_search])){display:none}
 .work-detail-filter .field:has([name=work_people_search])>span{display:none}
 .work-detail-filter .field input,.work-detail-filter .field select{width:100%;min-height:38px!important}
 .work-image-toolbar{padding:0;gap:0}
 .work-image-actions{display:none;gap:7px;padding:4px 9px 9px}
 .work-image-toolbar.tools-open .work-image-actions{display:flex}
 .work-image-actions label{width:100%;order:-1;justify-content:space-between;font-size:12px}
 .work-image-actions select{min-height:36px;font-size:13px;flex:1;max-width:220px}
 .work-image-actions button{display:block;min-height:38px;font-size:12px;flex:1}
 .work-image-actions [data-work-image-status]{line-height:1.5}
 .work-results .work-room-link{display:inline-flex!important;padding:0!important;min-height:30px!important;border:0;background:transparent!important;color:var(--theme-accent-text);font-weight:600}
 .work-room-link span{margin-left:8px}
 .work-results td:has(.work-room-link)>.work-room-name{display:none!important}
 body[data-density] #content .work-results:not(.work-image-paper).work-single-week .work-table th:first-child,body[data-density] #content .work-results:not(.work-image-paper).work-single-week .work-table td:first-child{display:none!important}
 body[data-density] #content .work-results:not(.work-image-paper).work-people-table.work-single-room .work-table th:nth-child(2),body[data-density] #content .work-results:not(.work-image-paper).work-people-table.work-single-room .work-table td:nth-child(2){display:none!important}
 body[data-density=compact] #content .work-results .table-scroll table td:is([data-label="主播"],[data-label="直播间 / 靓号"]) small{display:block!important;margin:1px 0 0!important;font-size:10px!important}
 body[data-density=compact] #content .work-results .table-scroll table td{padding-top:3px!important;padding-bottom:3px!important}
 .work-results .table-scroll{background:linear-gradient(90deg,var(--theme-surface) 30%,transparent),linear-gradient(270deg,var(--theme-surface) 30%,transparent),linear-gradient(90deg,#0002,transparent),linear-gradient(270deg,#0002,transparent);background-position:left center,right center,left center,right center;background-repeat:no-repeat;background-size:24px 100%,24px 100%,8px 100%,8px 100%;background-attachment:local,local,scroll,scroll}
 .work-results .table-sort-mobile{border-top:1px solid var(--line)}
 .work-results .table-sort-mobile select,.work-results .table-sort-mobile button{min-height:36px!important;font-size:12px!important}
 .work-results .pagination{align-items:center;row-gap:8px!important}
 .work-results .pagination>div{display:flex;width:100%;gap:8px}
 .work-results .pagination>div button{flex:1;min-height:36px!important}
}

@media(max-width:760px){
 body #content .work-tabs .analysis-tabs button.selected,body #content .work-tabs .analysis-tabs button.selected *{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;font-weight:600}
 .work-filter .room-select{position:relative}.work-filter .room-select::after{content:'⌄';position:absolute;right:10px;top:9px;pointer-events:none;font-size:14px}
 body:has(#query-queue) #content{padding-bottom:85px}
}


/* Freeze titles and the row identity only in the interactive table, not in PNGs. */
#content .work-table-scroll{position:relative;isolation:isolate;max-height:68vh;max-height:68dvh;scroll-padding-top:38px}
#content .work-table-scroll .work-table{border-collapse:separate;border-spacing:0}
#content .work-table-scroll .work-table th{position:sticky;top:0;z-index:3;background:var(--theme-soft)!important;box-shadow:0 1px 0 var(--theme-border)}
#content .work-table-scroll .work-identity{position:sticky;left:0;z-index:2;background:var(--theme-surface)!important;box-shadow:1px 0 0 var(--theme-border),4px 0 7px #0001}
#content .work-table-scroll th.work-identity{z-index:4;background:var(--theme-soft)!important;box-shadow:1px 1px 0 var(--theme-border),4px 0 7px #0001}
#content .work-table-scroll tbody tr:hover .work-identity{background:var(--theme-soft)!important}
@media(max-width:760px){
 body[data-density=compact] #content .work-table-scroll .work-identity{min-width:112px;max-width:42vw}
 body[data-density=compact] #content .work-table-scroll .work-identity :is(b,small,button){max-width:calc(42vw - 16px)!important;overflow:hidden;text-overflow:ellipsis}
 body[data-density=compact] #content .work-table-scroll .work-identity b{display:block}
 body[data-density=comfortable] #content .work-table-scroll{max-height:none}
 body[data-density=comfortable] #content .work-scroll-hint{display:none}
 body[data-density=comfortable] #content .work-table-scroll :is(th,.work-identity){position:static;box-shadow:none}
}
