/* Shared size and scroll rules. Specific tables and Kanban columns may scroll;
   ordinary panels, filters and forms grow with their content. */
.order-job-description>.order-description-input{display:block;width:100%;box-sizing:border-box;min-height:120px;max-height:480px;resize:vertical;overflow-y:auto;font:inherit;line-height:1.6;background:var(--input);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:12px}
.order-job-description>.order-description-save-status{font-size:12px;margin:6px 0;min-height:18px}
.order-job-description>.details-actions:has(>button[hidden]):not(:has(>button:not([hidden]))){display:none}
.customer-mobile-back{display:none}
@media(max-width:700px), (max-height:500px) and (pointer:coarse){
 .responsive-dialog .date-input-frame,.responsive-dialog.resource-dialog .resource-block-form .date-input-frame{padding-block:0}
 .responsive-dialog .date-input-frame>input[type=date],.responsive-dialog.resource-dialog .resource-block-form .date-input-frame>input[type=date]{min-height:44px}
 .responsive-dialog>.completion-heading{display:flex;flex-direction:row;align-items:center;gap:12px;flex-shrink:0}
 .responsive-dialog>.completion-heading>h2{order:1;flex:1;min-width:0;margin:0;font-size:18px;overflow-wrap:anywhere}
 .responsive-dialog>.completion-heading>.dialog-back{order:0;flex:0 0 44px;width:44px;min-height:44px}
 .mobile-action-dialog .mobile-task-panel{display:grid;position:static;inset:auto;width:100%;min-width:0;max-width:none;max-height:none;margin:0;padding:0;border:0;box-shadow:none;overflow:visible;gap:10px;background:transparent}
 .mobile-action-dialog .mobile-task-panel :is(button,a,select,summary){min-height:44px;box-sizing:border-box;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .mobile-action-dialog .mobile-task-panel>button{width:100%;text-align:left}
 .mobile-action-dialog .mobile-task-panel .hidden{display:none!important}
 .mobile-action-dialog .user-menu-panel a{display:flex;align-items:center}
 .mobile-action-dialog .user-menu-panel :is(nav,section){min-width:0}
}
@media(max-width:700px){
 .customer-directory :is(button,summary){min-height:44px}
 #app-view .order-detail :is(.production-deadline-reset,.order-installation-plan){min-height:44px;padding-block:9px}
 .customer-directory-detail-mode>.customer-lookup{display:none}
 .customer-mobile-back{display:inline-flex;align-items:center;min-height:44px;justify-self:start;margin-bottom:12px}
 .customer-detail :is(.customer-main-links,.customer-contact)>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%;overflow-wrap:anywhere}
 #app-view #content .order-detail .order-header-actions .order-header-pack-menu{bottom:auto}
 #app-view #content .order-detail :is(.production-operation-heading,.installation-operation-heading,.order-supplies-heading,.details-actions){flex-wrap:wrap}
 #app-view #content :is(input,select,textarea){box-sizing:border-box;min-width:0;max-width:100%}
 #app-view #content :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px}
 #app-view #content :is(.plan-toolbar,.comments-toolbar,.list-controls,.workflow-modes){max-width:100%;min-width:0;flex-wrap:wrap}
 #app-view #content :is(.plan-toolbar,.comments-toolbar,.list-controls,.workflow-modes) button{min-height:44px;max-width:100%;white-space:normal}
}
#content,#content>*,.workflow-tools,.workflow-results,
.responsive-dialog .live-dialog-content,.responsive-dialog form,
.responsive-dialog label,.responsive-dialog .work-field{min-width:0;box-sizing:border-box}
#content :is(.panel,.source-grid,.info-grid,.report-body,.report-groups,.mk-dashboard,.order-detail){min-width:0}
.responsive-dialog[open]{overflow:hidden;box-sizing:border-box}
.responsive-dialog>.live-dialog-content{flex:1 1 auto;min-height:0;overflow:auto;scrollbar-gutter:auto;padding-inline-end:14px;padding-bottom:16px}
.responsive-dialog :is(form,.work-field,.plan-field-date,.completion-time-fields,.completion-photo-fields)>*{min-width:0;max-width:100%}
.responsive-dialog :is(input,select,textarea){box-sizing:border-box;min-width:0;max-width:100%}
.responsive-dialog :is(.details-actions,.hour-shortcuts){display:flex;flex-wrap:wrap;gap:10px}
.responsive-dialog .details-actions>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;flex-shrink:0}
.responsive-dialog .completion-buttons{position:static}
.responsive-dialog :is(.customer-file-list,.customer-file-selection){max-height:none;overflow:visible}
.responsive-dialog.resource-dialog>.live-dialog-content{scrollbar-gutter:auto}
.responsive-dialog .work-photo{max-height:calc(var(--task-height,100dvh) - 230px)}

/* Lists grow naturally. Flex must never compress separate order cards together. */
.orders>.order-view-card.order{flex:0 0 auto;height:auto;min-height:116px;max-height:none;overflow:visible}
.orders>.order-view-card.order .order-view-card-main{height:auto;max-height:none;overflow:visible}
.orders>.order-view-card.order .order-view-card-heading{height:auto;min-height:22px;flex-wrap:wrap;overflow:visible}
.orders>.order-view-card.order .order-view-customer{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.orders>.order-view-card.order .order-view-title{height:auto;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;line-height:1.45;overflow:hidden}
.orders>.order-view-card.order .order-view-meta{height:auto;flex-wrap:wrap;line-height:1.5;overflow:visible}
.orders>.order-view-card.order :is(.order-view-labels,.order-view-warnings){height:auto;flex-wrap:wrap;overflow:visible}
.orders>.order-view-card.order .order-view-card-aside{height:auto;max-height:none;overflow:visible}

@media screen and (min-width:901px){
 main.container:has(#app-view:not(.hidden)){padding-inline:clamp(18px,1.5vw,32px)}
 #app-view>#content{scrollbar-gutter:auto;padding-inline-end:12px;scroll-padding-block:16px}
 #app-view>#content.workflow-page{overflow:auto!important}
 .workflow-tools{max-height:none;overflow:visible;gap:10px 16px;padding:6px 2px 14px}
 .workflow-page>.workflow-results.orders{flex:0 0 auto;overflow:visible}
 .workflow-page>.production-board-viewport{flex:1 0 auto;min-height:280px;overflow-x:auto;overflow-y:hidden}
 #content>.order-list-tools{max-height:none;overflow:visible}
 #content>:is(.plan-toolbar,.comments-toolbar),#content .mk-heading,
 #content>.panel:has(>.finance-period){position:static;max-height:none;overflow:visible}
 #app-view #content .list-controls{gap:10px 14px;align-items:end}
 #app-view #content .list-controls label{flex:1 1 170px;max-width:280px;gap:5px}
 #app-view #content .list-controls .list-search{flex:2 1 240px;max-width:none}
 #app-view #content .list-controls :is(input,select){min-height:40px;padding:8px 11px}
 #app-view #content .plan-toolbar{gap:10px 14px;align-items:center;padding-block:6px 12px}
 #app-view #content .plan-toolbar .plan-period{flex:1 0 100%;margin:0 0 2px;line-height:1.5}
 #app-view #content .details-actions{gap:10px;flex-wrap:wrap}
 .info-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
 .plan-master-scroll{min-height:0;max-height:none;overflow:visible;scrollbar-gutter:auto}
 .plan-master-week{width:100%;min-width:0}
 .responsive-dialog[open]{width:min(840px,calc(100vw - 64px));max-width:calc(100vw - 64px);max-height:min(90dvh,calc(var(--task-height,100dvh) - 48px));padding:24px}
 .responsive-dialog.plan-dialog{width:min(880px,calc(100vw - 64px));max-width:880px}
 .responsive-dialog.resource-dialog{width:min(720px,calc(100vw - 64px));max-width:720px}
 .responsive-dialog:has(.completion-time-fields){width:min(960px,calc(100vw - 64px))}
 .responsive-dialog.live-job-dialog,.responsive-dialog.customer-files-dialog{width:min(960px,calc(100vw - 64px));max-width:960px}
 .responsive-dialog>.live-dialog-content{padding-top:18px;padding-bottom:12px;padding-inline-end:16px}
 .responsive-dialog :is(.work-form,.plan-form,.live-job-form){gap:16px;margin-top:12px}
 .responsive-dialog label{line-height:1.5}
 .responsive-dialog :is(input,select){min-height:44px}
 .responsive-dialog>.completion-heading{padding-bottom:12px}
 .responsive-dialog .completion-time-fields{column-gap:18px}
 .responsive-dialog .completion-buttons{padding-top:16px}
 main.container:has(#app-view:not(.hidden))>.bottom-nav{width:calc(100% + 2 * clamp(18px,1.5vw,32px));margin-inline:calc(-1 * clamp(18px,1.5vw,32px))}
}
/* Filter rows remain separate from modes when the workspace is too narrow for
   a readable search field and two selects on the same row. */
@media screen and (min-width:1400px){
 .workflow-tools{grid-template-columns:minmax(0,1fr) auto;gap:10px 16px}
 .workflow-tools>.workflow-title{grid-column:1;grid-row:1;padding:0;align-self:center}
 .workflow-tools>.workflow-modes{grid-column:2;grid-row:1;align-self:center}
 #app-view #content .workflow-tools>.list-controls{grid-column:1/-1;grid-row:2}
 #app-view #content .workflow-tools>.list-result{grid-column:1/-1;grid-row:3}
}
@media(max-width:700px){
 .orders>.order-view-card.order{grid-template-rows:auto auto;gap:8px;min-height:0;padding:12px}
 .orders>.order-view-card.order .order-view-card-main{gap:4px}
 .orders>.order-view-card.order .order-view-card-aside{flex-wrap:wrap;align-items:center;gap:6px 10px;padding-top:6px}
 .orders>.order-view-card.order .order-view-status{max-width:100%;font-size:11px;white-space:normal}
 .orders>.order-view-card.order .order-view-meta{font-size:11px;gap:3px 10px}
 .orders>.order-view-card.order .order-view-labels{gap:4px}
 .responsive-dialog>.live-dialog-content{padding-top:12px;padding-bottom:max(16px,env(safe-area-inset-bottom));padding-inline-end:max(16px,env(safe-area-inset-right))}
 .responsive-dialog :is(.work-form,.plan-form,.live-job-form){gap:10px}
 .responsive-dialog .completion-buttons{display:flex;gap:8px}
 .responsive-dialog .completion-buttons>button{flex:1 1 130px;width:auto;min-height:44px}
 .responsive-dialog .dialog-content-title{font-size:20px;margin-bottom:12px}
 .responsive-dialog .plan-field-description textarea{min-height:80px}
 .plan-toolbar:not(:has(.plan-calendar-filter)) .plan-week-span{grid-column:1/-1;width:100%}
}
/* Existing report-specific rules must use the same scroll owner as other tasks. */
.responsive-dialog .work-form:has(>.completion-time-fields) .completion-buttons{position:static}
.responsive-dialog:has(.completion-time-fields)>.live-dialog-content{scrollbar-gutter:auto;padding-inline-end:16px}
.responsive-dialog textarea{background:var(--input);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:10px 12px;font:inherit;line-height:1.5}
.responsive-dialog .plan-field-confirmed{flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:10px}
@media screen and (min-width:901px){
 #app-view>#content.workflow-page>.workflow-results.orders{flex:0 0 auto;overflow:visible}
}
@media(max-width:700px){
 .responsive-dialog .completion-buttons>button.primary:first-child{flex-basis:100%}
}

/* Order operations share one header chooser and a consistent work-card layout. */
.order-detail .order-operation-card[hidden],.order-detail .order-operations-section[hidden]{display:none!important}
.order-detail .order-operation-chooser .operation-chooser-body{width:290px;padding:10px;gap:4px}
.operation-chooser-body>p{margin:4px 8px 8px;font-size:12px;line-height:1.5;color:var(--muted)}
.order-operation-chooser .operation-choice{display:flex;align-items:center;gap:12px;min-height:44px;padding:9px 10px;width:100%;border-radius:7px;color:var(--ink);font-size:14px;font-weight:600;cursor:pointer}
.order-operation-chooser .operation-choice:hover{background:var(--panel2)}
.order-operation-chooser .operation-choice input[type=checkbox]{appearance:auto;accent-color:var(--blue);flex:0 0 18px;width:18px;height:18px;min-height:18px;margin:0;padding:0}
.order-operation-chooser .operation-choice span{min-width:0;overflow-wrap:anywhere}
.order-detail .order-operations{gap:18px;align-items:stretch}
#app-view #content .order-detail .order-operation-card{margin:0;padding:18px 20px;gap:14px;border-radius:13px;box-shadow:0 2px 10px #03182706}
.order-detail .order-operation-heading{flex-wrap:nowrap;min-height:28px;margin:0}
.order-detail .order-operation-heading h3{flex:1;min-width:0;font-size:17px;line-height:1.4;margin:0}
.order-detail .order-operation-heading>.icon{width:20px;flex:0 0 20px}
.order-detail .production-operation>.order-operation-status{font-size:12px;font-weight:600;color:var(--muted);margin:-4px 0 0}
.order-detail .production-header-actions,.order-detail .order-operation-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px;width:100%;min-width:0;margin:0;padding-top:14px;border-top:1px solid var(--line)}
.order-detail .production-header-actions{margin-top:auto}
.order-detail .order-operation-actions{margin-top:auto}
.order-detail .production-header-actions:empty{display:none}
.order-header-cover[hidden],.plan-save-estimate[hidden],.order-final-review-form button[hidden]{display:none!important}
.order-detail .production-header-actions>.production-finish-action,.order-detail .production-header-actions>.production-hold-slot{flex:0 1 auto;margin:0}
.order-detail .order-operation-actions>.order-finish-installation{width:auto;margin:0;min-height:38px;padding:8px 12px;font-size:13px}
.order-detail .order-production-files{width:100%;min-width:0}
.order-detail .order-production-files .work-section-heading{align-items:center;justify-content:space-between;margin:0 0 8px;gap:8px 12px}
.order-detail .order-production-files .work-section-heading h4{font-size:13px;font-weight:650;margin:0}
.order-detail .order-production-files .work-empty{font-size:13px;margin:8px 0;color:var(--muted)}
.order-detail .order-production-files .work-section-heading .details-actions{margin:0}
#app-view #content .order-detail :is(.followup-production-slot,.followup-external-slot,.order-delivery-followup)>.followup-section{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:12px 0 0;margin:0}
.order-detail .followup-section>summary{font-size:13px;line-height:1.5;font-weight:650;min-height:28px;padding:2px 0}
.order-detail .followup-section[open]>summary{margin-bottom:12px}
.order-detail .order-plan-settings{margin:0;padding:0;border:0}
.order-detail .plan-detail-inline{padding:0}
.order-detail .plan-visits-summary{font-size:13px;line-height:1.5;padding:0 0 12px;min-height:0}
.order-detail .installation-operation .plan-estimate{border:0;padding:0;margin:8px 0 0}
.order-detail .installation-operation .plan-estimate-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 10px;margin:0}
.order-detail .installation-operation .plan-estimate-form>label{flex:0 1 150px;min-width:100px;max-width:180px;font-size:12px;line-height:1.4;gap:6px}
.order-detail .installation-operation .plan-estimate-form>button{flex:0 1 auto;min-width:0;white-space:normal;margin:0}
.order-detail .installation-operation .plan-estimate-form>.plan-new-appointment{margin:0}
@media(max-width:700px){
 #app-view #content .order-detail .order-operation-card{padding:14px;gap:12px}
 .order-detail .order-operations{gap:12px}
 .order-detail .order-operation-heading h3{font-size:16px}
 .order-detail .production-operation>.order-operation-heading h3{flex:1 1 auto}
 .order-detail .production-header-actions{justify-content:flex-start;flex-basis:auto}
 .order-detail .order-operation-actions>button{flex:1 1 auto}
 .order-detail .installation-operation .plan-estimate-form>label{flex:1 1 120px;max-width:none}
 .order-detail .installation-operation .plan-estimate-form>.plan-new-appointment{flex-basis:100%}
 .order-detail .order-operation-chooser{position:static}
 .order-overview>.order-header-actions{position:relative}
 .order-detail .order-operation-chooser .operation-chooser-body{left:12px;right:12px;top:calc(100% + 6px);width:auto;max-width:none}
}
.order-detail :is(.external-operation,.delivery-operation){align-self:start}

/* Phone controls need a full finger target, including the quieter file,
   planning and disclosure actions below the order header. */
@media(max-width:700px){
 #app-view #content .order-detail :is(.order-planning-summary,.plan-visits-summary,.order-description-edit,.order-description-read,.production-finish-action,.production-hold-toggle,.order-delivery-reset),
 #app-view #content .order-detail .details-actions>button,
 #app-view #content .order-detail :is(.order-section-nav,.order-supplies-heading)>button,
 #app-view #content .order-supplies-history>summary,
 #app-view #content .order-work :is(button,summary,.work-file-share),
 #app-view #content .followup-section>summary,
 #app-view #content :is(.plan-help,.mk-dashboard) summary{min-height:44px;box-sizing:border-box}
 #app-view #content .order-contact-links>a{display:inline-flex;align-items:center;min-height:44px;padding-block:7px;max-width:100%;overflow-wrap:anywhere;box-sizing:border-box}
 #app-view #content .followup-section>summary,
 #app-view #content .work-file-overview>summary,
 #app-view #content :is(.plan-help,.mk-dashboard) summary{padding-block:12px;line-height:20px}
 #app-view #content .order-work .work-file-heading button{padding:9px 12px;font-size:.85rem}
 #app-view #content .order-work .work-photo-tile .details-actions button{min-height:44px;padding:9px 10px;font-size:12px}
 #app-view #content .order-work .work-documents .work-file .details-actions button{min-height:44px;padding:9px 12px}
 #app-view #content .order-work .work-documents .work-file>.work-category-select{min-height:44px;height:auto}
 #app-view #content .order-work .work-file-share{gap:10px;white-space:normal;min-width:0}
 .responsive-dialog button{min-height:44px}
 .responsive-dialog summary{min-height:44px;padding-block:12px;box-sizing:border-box;line-height:20px}
 #app-view #content .order-detail .order-header-actions{position:relative}
 #app-view #content .order-detail .order-header-actions>details{position:static}
 #app-view #content .order-detail .order-header-actions .order-header-pack-menu{left:0;right:0;top:calc(100% + 6px);width:auto;min-width:0;max-width:none;box-sizing:border-box}
}
@media(max-width:430px){
 #app-view #content .order-work .work-documents .work-file{grid-template-columns:minmax(0,1fr)}
 #app-view #content .order-work .work-documents .work-file>.work-category-select{grid-column:1;grid-row:auto;max-width:none}
 #app-view #content .order-work .work-documents .work-file>.details-actions{grid-column:1;grid-row:auto;justify-content:flex-start}
 #app-view #content .order-work .work-documents .work-file>.work-file-share{grid-column:1;grid-row:auto}
}
#app-view #content .order-detail .order-delivery-followup .followup-section{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:12px 0 0;margin:0}
.order-detail .order-delivery-followup .work-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:none;width:100%;padding:0;background:transparent}
.order-detail .order-delivery-followup .work-form>label{min-width:0;font-size:12px}
.order-detail .order-delivery-followup .work-form>label:has(textarea),.order-detail .order-delivery-followup .work-form>p{grid-column:1/-1}
.order-detail .order-delivery-followup .work-form>p{font-size:12px;margin:0}
.order-detail .order-delivery-followup .work-form>button{justify-self:start}
.order-detail .order-delivery-followup textarea{min-height:72px}
@media(max-width:700px){.order-detail .order-delivery-followup .work-form{grid-template-columns:minmax(0,1fr)}}

/* All overview controls share the same desktop toolbar. */
@media screen and (min-width:901px){
 #app-view #content.workflow-page>.workflow-tools{display:flex;flex-wrap:nowrap;align-items:flex-end;gap:10px 14px}
 #app-view #content .workflow-tools>.list-controls{display:flex;flex:1 1 auto;order:0;min-width:0;flex-wrap:nowrap;margin:0;gap:10px}
 #app-view #content .workflow-tools>.list-controls>label{flex:1 1 150px;min-width:90px}
 #app-view #content .workflow-tools>.list-controls>.list-search{flex:2 1 240px;min-width:120px}
 #app-view #content .workflow-tools>.workflow-modes{display:flex;flex:0 0 auto;order:1;align-self:flex-end;flex-wrap:nowrap;margin:0}
 #app-view #content .workflow-tools>.list-result{flex:0 0 auto;order:2;align-self:flex-end;min-height:40px;margin:0;white-space:nowrap}
 #app-view #content .plan-toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:8px 12px;margin:0 0 12px;padding:0}
 #app-view #content .plan-toolbar>.plan-period{flex:1 1 auto;min-width:100px;margin:0;font-size:14px;line-height:1.4;white-space:nowrap}
 #app-view #content .plan-toolbar>.plan-week-nav{flex:0 0 auto;flex-wrap:nowrap;margin:0;gap:6px}
 #app-view #content .plan-toolbar>:is(select,.plan-view-toggle){flex:0 0 auto;width:auto;max-width:180px;min-height:38px;margin:0;font-size:12px}
 #app-view #content .plan-toolbar>.plan-help{flex:0 0 auto;position:relative;margin:0}
 #app-view #content .plan-toolbar>.plan-help>summary{min-height:38px;padding:8px;font-size:12px}
 #app-view #content .plan-toolbar>.plan-help[open]{max-width:240px;white-space:normal}
}
@media screen and (max-width:900px){
 #app-view #content .plan-toolbar>.plan-help{flex-basis:100%;margin:0}
}


/* Optional one-screen production desk; only Kjell's ENKEL mode uses this grid. */
@media(min-width:1100px) and (min-height:650px){
 #app-view>#content:has(>.order-detail-simple){display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px;gap:8px}
 #app-view>#content>.simple-order-picker{flex:0 0 auto;margin:0;gap:10px;font-size:13px}
 #app-view>#content>.simple-order-picker select{padding:7px 10px;min-height:36px}
 #app-view>#content>.order-detail-simple{display:grid;flex:1 1 0;min-height:0;height:100%;grid-template-columns:minmax(0,2fr) minmax(0,3fr);grid-template-rows:minmax(0,42fr) minmax(0,58fr);gap:12px;align-items:stretch;overflow:hidden}
 #app-view #content>.order-detail-simple>.order-overview{grid-column:1;grid-row:1;min-height:0;overflow:auto;margin:0;padding:14px}
 #app-view #content>.order-detail-simple>.order-view-lines{grid-column:2;grid-row:1;min-height:0;overflow:auto;margin:0;padding:14px;display:flex;flex-direction:column}
 #app-view #content>.order-detail-simple>.order-operations-section{grid-column:1;grid-row:2;min-height:0;height:100%;margin:0}
 #app-view #content>.order-detail-simple>.order-operation-files{grid-column:2;grid-row:2;min-height:0;height:100%;margin:0;overflow:hidden}
 #app-view #content>.order-detail-simple>.order-followup-rest{display:none}
 #app-view #content .order-detail-simple .order-operations{height:100%;min-height:0;gap:0;align-items:stretch}
 #app-view #content .order-detail-simple .production-operation{min-height:0;height:100%;box-sizing:border-box;overflow:auto;padding:14px;margin:0}
 #app-view #content .order-detail-simple .order-work{min-height:0;height:100%;overflow:auto;padding:14px;margin:0;display:block}
 #app-view #content .order-detail-simple .order-view-hero-copy h1{font-size:20px;line-height:1.2;margin:0 0 5px}
 #app-view #content .order-detail-simple .order-view-hero-customer{font-size:15px;margin:0}
 #app-view #content .order-detail-simple .order-view-hero-main{margin:6px 0;gap:8px}
 #app-view #content .order-detail-simple .order-contact-strip{gap:8px;margin-top:8px;padding-top:8px}
 #app-view #content .order-detail-simple .order-contact-fact{font-size:12px;gap:3px}
 #app-view #content .order-detail-simple .order-detail-cover{float:right;width:110px;height:72px;margin:0 0 8px 12px;border-radius:8px}
 #app-view #content .order-detail-simple .order-view-lines-viewport{min-height:0;max-height:none!important;height:auto!important;flex:1 1 0;overflow:auto}
 #app-view #content .order-detail-simple .order-view-lines-toggle{display:none}
 #app-view #content .order-detail-simple .order-view-line-table :is(td,th){padding:7px 9px;font-size:13px}
 #app-view #content .order-detail-simple .work-dropzones{grid-template-columns:minmax(0,1fr);margin:8px 0}
 #app-view #content .order-detail-simple .work-dropzone{min-height:64px;padding:8px 12px}
 #app-view #content .order-detail-simple .work-media-actions{flex-wrap:wrap}
 #app-view #content .order-detail-simple .work-file-heading{margin-bottom:8px}
 #app-view #content .order-detail-simple .work-file-heading h3{font-size:16px}
 #app-view #content .order-detail-simple .work-category-filters{display:none}
 #app-view #content .order-detail-simple .work-file-overview{margin-top:8px}
 #app-view #content .order-detail-simple .order-view-lines-heading h2{font-size:17px}
}

/* Desktop reference: 1920 CSS px. Keep one workspace width across modules. */
@media screen and (min-width:901px){
 :root{--ui-workspace-gutter:clamp(18px,1.5vw,32px)}
 html body main.container:has(#app-view:not(.hidden)){width:100%;max-width:none;padding-inline:var(--ui-workspace-gutter)}
 html body:has(#app-view:not(.hidden))>.site-header{padding-inline:var(--ui-workspace-gutter)}
 #app-view :is(#content.newsletter-page,#content.mk-dashboard),#app-view #content :is(.newsletter-page,.mk-dashboard){width:100%;max-width:none;margin-inline:0}
}

.plan-controls{display:contents}
.plan-resource-toggles{display:none}
@media screen and (min-width:901px){
 #app-view #content .plan-controls{display:flex;align-items:center;gap:12px;margin-bottom:12px;min-width:0}
 #app-view #content .plan-controls>.ui-page-header{width:auto;flex:0 0 auto;flex-wrap:nowrap;gap:12px;margin:0;padding:0}
 #app-view #content .plan-controls>.plan-toolbar{flex:1 1 auto;display:flex;align-items:center;flex-wrap:nowrap;gap:6px;margin:0;padding:0;min-width:0}
 #app-view #content .plan-controls .plan-period{flex:1 1 auto;min-width:max-content;white-space:nowrap}
 #app-view #content .plan-controls .plan-montor-picker{display:none}
 #app-view #content .plan-resource-toggles{display:inline-flex;align-items:center;gap:4px;flex:none}
 #app-view #content .plan-resource-toggle{padding:6px 9px;min-height:38px;white-space:nowrap}
 #app-view #content .plan-controls .plan-help[open]{position:relative;max-width:none}
 #app-view #content .plan-controls .plan-help[open]>.plan-help-body{position:absolute;top:100%;right:0;z-index:4;width:270px;padding:10px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm)}
}
@media screen and (min-width:901px) and (max-width:1250px){
 #app-view #content .plan-controls{display:block}
 #app-view #content .plan-controls>.ui-page-header{display:contents}
 #app-view #content .plan-controls>.ui-page-header h1{margin-bottom:8px}
 #app-view #content .plan-controls .plan-week-nav{float:left;margin:0 8px 0 0}
}
