/* Compact office controls. Only the customer office; field and platform admin stay unchanged.
   Heights and type use rem so A+ Grotere tekst also enlarges these controls. */
body[data-role=office][data-portal=customer] {--office-control-height:1.889rem;--office-control-font:.778rem;--sidebar:210px}
body[data-role=office][data-portal=customer]>header{min-height:54px;padding:8px 18px}
body[data-role=office][data-portal=customer]>header .brand strong{font-size:.95rem}
body[data-role=office][data-portal=customer]>header .brand-mark{width:32px;height:32px;font-size:20px}
body[data-role=office][data-portal=customer]>header .brand-logo{width:34px;height:34px}
body[data-role=office][data-portal=customer]>header #font-toggle{min-height:var(--office-control-height);padding:4px 10px;font-size:var(--office-control-font)}
body[data-role=office][data-portal=customer] #pilot-context{min-height:34px;padding:5px 18px;font-size:.75rem}
body[data-role=office][data-portal=customer]>#main-nav{padding:14px 8px;gap:2px}
body[data-role=office][data-portal=customer]>#main-nav .office-nav-item{min-height:38px;padding:7px 10px;font-size:.79rem;gap:8px}
body[data-role=office][data-portal=customer]>#main-nav .nav-icon{width:17px;height:17px;flex-basis:17px}
body[data-role=office][data-portal=customer]>#main-nav .sidebar-heading{padding:10px 10px 5px;margin-top:12px}
body[data-role=office][data-portal=customer]>main{padding:18px}
body[data-role=office][data-portal=customer] .office-app{font-size:.8rem}
body[data-role=office][data-portal=customer] .office-app .office-title{padding:0 0 12px;gap:14px}
body[data-role=office][data-portal=customer] .office-title h1{font-size:1.28rem;line-height:1.3}
body[data-role=office][data-portal=customer] .office-subtitle{font-size:.78rem;margin:4px 0 0;color:#526174;line-height:1.45}
body[data-role=office][data-portal=customer] .office-app button,body[data-role=office][data-portal=customer] .office-app .button{
 min-height:var(--office-control-height);min-width:0;padding:4px 10px;
 font-size:var(--office-control-font);line-height:1.35;border-radius:4px;
}
body[data-role=office][data-portal=customer] .office-title>button{width:auto;flex-shrink:0;font-weight:600}
body[data-role=office][data-portal=customer] .office-filters{padding:12px;border:1px solid #cbd5e1;border-radius:5px 5px 0 0;background:#fff}
body[data-role=office][data-portal=customer] .office-filter{gap:4px;margin:0;min-width:0}
body[data-role=office][data-portal=customer] .office-filter>span,body[data-role=office][data-portal=customer] .period-filter legend{font-size:.72rem;font-weight:600;color:#42566a}
body[data-role=office][data-portal=customer] .office-filter input,body[data-role=office][data-portal=customer] .office-filter select,body[data-role=office][data-portal=customer] .row-assignment{
 min-height:var(--office-control-height)!important;padding:5px 8px!important;
 font-size:var(--office-control-font)!important;line-height:1.3;border-radius:4px!important;
}
body[data-role=office][data-portal=customer] .office-filter input:focus-visible,body[data-role=office][data-portal=customer] .office-filter select:focus-visible,
body[data-role=office][data-portal=customer] .office-app button:focus-visible,body[data-role=office][data-portal=customer] .more-filters summary:focus-visible{
 outline:2px solid var(--brand-accent);outline-offset:2px;
}
body[data-role=office][data-portal=customer] .compact-filters .office-filter-top{
 display:grid;grid-template-columns:minmax(200px,320px) 145px 165px 125px auto;
 gap:10px;align-items:end;justify-content:start;
}
body[data-role=office][data-portal=customer] .compact-filters .office-search{min-width:0;width:100%;max-width:320px;grid-column:auto}
body[data-role=office][data-portal=customer] .compact-filters .more-filters{min-width:0;margin:0;justify-self:start;align-self:end}
body[data-role=office][data-portal=customer] .compact-filters .more-filters summary{
 min-height:var(--office-control-height);padding:6px 10px;margin:0;
 font-size:var(--office-control-font);line-height:1.4;font-weight:500;white-space:nowrap;
}
body[data-role=office][data-portal=customer] .compact-filters .more-filters[open]{grid-column:1/-1;width:100%}
body[data-role=office][data-portal=customer] .compact-filters .more-filters .office-filter-options{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;
 position:static;width:100%;max-width:none;padding:12px;margin-top:8px;
 background:#f8fafc;border:1px solid #d9e1e9;border-radius:4px;
}
body[data-role=office][data-portal=customer] .compact-period-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px;font-size:.75rem;color:#526174}
body[data-role=office][data-portal=customer] .compact-period-row .office-filter{flex-direction:row;align-items:center;gap:8px}
body[data-role=office][data-portal=customer] .compact-period-row input{width:150px}
body[data-role=office][data-portal=customer] .active-filters{margin-top:8px;gap:6px}
body[data-role=office][data-portal=customer] .active-filters .filter-chip{min-height:28px;padding:3px 8px;font-size:.72rem}
body[data-role=office][data-portal=customer] .active-filters .text-button{min-height:30px;font-size:.72rem;padding:3px 8px}
body[data-role=office][data-portal=customer] .list-heading{padding:8px 12px;gap:10px}
body[data-role=office][data-portal=customer] .list-heading h2{font-size:.85rem}
body[data-role=office][data-portal=customer] .office-view-switch{gap:2px}
body[data-role=office][data-portal=customer] .office-view-switch button{min-height:30px;padding:4px 9px;font-size:.74rem}
body[data-role=office][data-portal=customer] .office-view-switch .nav-icon{width:16px;height:16px;flex-basis:16px}
body[data-role=office][data-portal=customer] .order-table{font-size:.79rem}
body[data-role=office][data-portal=customer] .order-table .column-sort{min-height:36px;padding:7px 12px;font-size:.74rem;line-height:1.3}
body[data-role=office][data-portal=customer] .order-table td{padding:8px 12px}
body[data-role=office][data-portal=customer] .order-table .order-link{font-size:.79rem;min-height:30px!important}
body[data-role=office][data-portal=customer] .order-table .order-description strong{font-weight:600;line-height:1.35}
body[data-role=office][data-portal=customer] .order-table .order-description small{margin-top:2px;font-size:.73rem;line-height:1.35}
body[data-role=office][data-portal=customer] .order-table .order-ref{min-width:120px}
body[data-role=office][data-portal=customer] .order-table .assignment-cell{min-width:170px;max-width:210px}
body[data-role=office][data-portal=customer] .table-status{font-size:.7rem;padding:3px 6px}
body[data-role=office][data-portal=customer] .office-statusbar{padding:6px 12px;min-height:30px;font-size:.73rem}
body[data-role=office][data-portal=customer] .office-statusbar button{min-height:28px;font-size:inherit;padding:3px 6px}
body[data-role=office][data-portal=customer] .order-workspace .dossier-title{padding:16px 18px;gap:16px}
body[data-role=office][data-portal=customer] .order-workspace .dossier-title h1{font-size:1.2rem}
body[data-role=office][data-portal=customer] .order-workspace .dossier-tabs{padding:0 18px;gap:16px}
body[data-role=office][data-portal=customer] .order-workspace .dossier-tabs button{min-height:38px;padding:7px 1px;font-size:.79rem;border-radius:0}
body[data-role=office][data-portal=customer] .schedule-toolbar{padding:12px;gap:10px}
body[data-role=office][data-portal=customer] .period-filter button{min-height:var(--office-control-height);padding:5px 9px;font-size:var(--office-control-font)}
@media(max-width:1150px){
 body[data-role=office][data-portal=customer] .compact-filters .office-filter-top{grid-template-columns:minmax(200px,1fr) 150px 160px}
 body[data-role=office][data-portal=customer] .compact-filters .office-search{max-width:none}
}
@media(max-width:760px){
 body[data-role=office][data-portal=customer]{--office-control-height:2.445rem;--office-control-font:.889rem}
 body[data-role=office][data-portal=customer]>main{padding:14px 10px}
 body[data-role=office][data-portal=customer] .compact-filters .office-filter-top{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body[data-role=office][data-portal=customer] .compact-filters .office-search{grid-column:1/-1}
 body[data-role=office][data-portal=customer] .compact-filters .office-filter{width:100%}
 body[data-role=office][data-portal=customer] .compact-filters .more-filters[open]{grid-column:1/-1}
 body[data-role=office][data-portal=customer] .compact-filters .more-filters .office-filter-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-role=office][data-portal=customer] .compact-period-row .office-filter{width:auto;flex-wrap:wrap}
 body[data-role=office][data-portal=customer] .office-title>button{width:auto}
 body[data-role=office][data-portal=customer] .active-filters .filter-chip,body[data-role=office][data-portal=customer] .active-filters .text-button,
 body[data-role=office][data-portal=customer] .office-view-switch button,body[data-role=office][data-portal=customer] .order-table .column-sort{min-height:44px}
}
@media(pointer:coarse){
 body[data-role=office][data-portal=customer]{--office-control-height:2.445rem;--office-control-font:.889rem}
 body[data-role=office][data-portal=customer]>#main-nav .office-nav-item,body[data-role=office][data-portal=customer] .office-view-switch button,body[data-role=office][data-portal=customer] .active-filters button,
 body[data-role=office][data-portal=customer] .order-table .column-sort,body[data-role=office][data-portal=customer] .order-table .order-link,
 body[data-role=office][data-portal=customer] .order-workspace .dossier-tabs button{min-height:44px!important}
}

/* 0.4.10: balanced widths for the five-column office order list only. */
body[data-role=office][data-portal=customer] .order-table[data-order-list] {
 table-layout:fixed;width:100%;min-width:54rem;
}
body[data-role=office][data-portal=customer] .order-table[data-order-list] th:nth-child(1){width:14%}
body[data-role=office][data-portal=customer] .order-table[data-order-list] th:nth-child(2){width:40%}
body[data-role=office][data-portal=customer] .order-table[data-order-list] th:nth-child(3){width:14%}
body[data-role=office][data-portal=customer] .order-table[data-order-list] th:nth-child(4){width:20%}
body[data-role=office][data-portal=customer] .order-table[data-order-list] th:nth-child(5){width:12%}
body[data-role=office][data-portal=customer] .order-table[data-order-list] td {
 min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;
}
body[data-role=office][data-portal=customer] .order-table[data-order-list] td.order-description {width:auto;min-width:0;max-width:none}
body[data-role=office][data-portal=customer] .order-table[data-order-list] .row-assignment {width:100%;max-width:100%;min-width:0}
body[data-role=office][data-portal=customer] .order-table[data-order-list] .column-sort {white-space:normal}

/* Keep visually hidden assignment help inside the scrollable table cell. */
body[data-role=office][data-portal=customer] .order-table[data-order-list] .assignment-cell{position:relative}

/* 0.4.12: Excel-style column controls, scoped to the office order list. */
body[data-role=office] .column-heading{display:flex;align-items:stretch;min-width:0}
body[data-role=office] .column-heading .column-sort{flex:1;min-width:0;width:auto}
body[data-role=office] .column-filter-button{flex:0 0 30px;min-width:30px;min-height:34px;padding:6px;background:transparent;border:0;border-left:1px solid #d8e1ea;border-radius:0;color:var(--brand-header)}
.column-filter-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6}
body[data-role=office] .column-filter-button.is-filtered{background:var(--brand-accent);color:var(--on-accent)}
.column-filter-button.is-filtered svg{fill:currentColor}
.office-column-menu{position:fixed;z-index:15000;width:min(340px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;padding:12px;border:1px solid #b9c8d5;border-radius:6px;background:#fff;color:#203245;box-shadow:0 8px 30px #122d4533;font:14px/1.4 "Segoe UI",sans-serif}
.office-column-menu button{font:inherit;min-height:34px;padding:5px 9px}
.column-menu-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.column-menu-title>strong{font-size:15px}
.column-menu-sort{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}
.column-value-search{display:grid;gap:4px;margin:10px 0}
.column-value-search input{width:100%;min-height:36px;padding:7px;font:inherit}
.column-select-all,.column-options label{display:flex;align-items:center;gap:8px;min-height:34px;padding:5px 2px}
.office-column-menu input[type=checkbox]{width:17px;height:17px;min-height:0;flex:0 0 17px;margin:0;accent-color:var(--brand-accent)}
.column-options{max-height:230px;overflow:auto;border-top:1px solid #dbe3eb;border-bottom:1px solid #dbe3eb}
.column-options span{flex:1;min-width:0;overflow-wrap:anywhere}
.column-options small{color:#53677d;margin-left:4px}
.column-options label:hover{background:var(--brand-background)}
#column-selection-count{display:block;margin-top:8px;color:#526373}
.column-menu-footer{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}
.column-menu-footer .primary{background:var(--brand-accent);border-color:var(--brand-accent);color:var(--on-accent)}
.column-filter-chips{padding:8px 14px;background:#fff}
@media(pointer:coarse){.office-column-menu button,.column-options label,.column-select-all{min-height:44px}}
