/* Three working surfaces: white content, blue headings, grey navigation/canvas. */
:root{
  --ink:#17354c;--muted:#526b80;--subtle:#64798a;
  --canvas:#edf0f3;--surface:#fff;--section:#dce8f1;--line:#ccd9e4;
  --nav:#102f48;--nav-active:#214e6c;--blue:#006ba6;--blue-hover:#005484;
  --filter:#fff1a8;--filter-line:#b99b19;--positive:#137454;--negative:#ad3d3a;
  --card-shadow:none;
}
body{background:var(--canvas);color:var(--ink);-webkit-font-smoothing:antialiased}
button,input,select{color:inherit}
button,a,input,select{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{
  outline:3px solid var(--blue);outline-offset:2px;
}
.sidebar{background:var(--nav);color:#c8d9e7;border-right:1px solid #153d59}
.brand-logo img{border-radius:10px;padding:13px 11px;box-shadow:0 3px 10px #061c3020}
.brand-logo small{color:#b5cddd;letter-spacing:1.8px}
.nav{gap:6px}
.nav button{border-radius:9px;font-weight:550;transition:background .14s,color .14s}
.nav button:hover{color:#fff;background:#1b425e}
.nav button.active{background:var(--nav-active);color:#fff;box-shadow:inset 3px 0 #ffdd00;font-weight:650}
.nav button svg{opacity:.85}.nav button.active svg{opacity:1}
.sidefoot{border-color:#ffffff24}.sidefoot small{color:#b8cddd}
.avatar{background:#28506c;color:#fff;border:1px solid #41647e;border-radius:12px}
.topbar{background:var(--nav-active);color:#fff;border-bottom:1px solid var(--nav-active);box-shadow:none}
.header-identity{gap:12px}.header-logo{display:block;width:34px;height:38px;object-fit:contain}
.topbar:has(.admin-scope) .header-logo{display:block;width:34px}
.crumb b{color:#143a57;font-weight:700}.source-status,.report-header .source-status{color:var(--subtle)}
.source-status:hover{color:var(--blue)}.status{color:var(--muted)}.status .dot{background:var(--positive)}
.content{background:var(--canvas)}
.panel,.metric{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--card-shadow)}
.metriclabel{color:var(--muted);font-weight:600;letter-spacing:.01em}.metriclabel svg{color:#60809a;opacity:.85}
.metricvalue{color:var(--ink);font-weight:720;letter-spacing:-.035em}
.metric-inline{color:var(--muted);font-weight:550;letter-spacing:normal}
.metricperiod,.week-range{color:var(--muted)}
.panelhead,.overview-with-orders .panelhead{background:var(--section);border-bottom:1px solid var(--line)}
.panelhead h2{color:#173d58;font-weight:700;letter-spacing:-.015em}
.panelhead .sub,.sub,.note,.admin-note,.empty{color:var(--muted)}
.panelbody{scrollbar-color:#b0c1cf transparent;scrollbar-width:thin}
.listitem{border-color:#e0e8ef}.listitem small{color:var(--muted)}
.overview-with-orders .listitem:hover{background:var(--surface)}
.overview-with-orders .listitem .right small{color:var(--muted)}
.overview-footer{background:var(--surface);border:1px solid #bdcfdc;border-radius:10px;color:#254a64;box-shadow:none}
.overview-footer span,.overview-footer b span{color:#506b80}
.overview-footer>.up,.up{color:var(--positive)}.down{color:var(--negative)}
.tabs{background:var(--canvas);border:1px solid #cad8e4;border-radius:10px;padding:3px;gap:3px;scrollbar-width:none}
.tabs button{border-bottom:0;border-radius:7px;color:#435f76;font-weight:550;transition:background .14s,color .14s}
.tabs button:hover{background:var(--surface);color:var(--blue)}
.tabs button.active{background:#fff;color:var(--blue);border-color:transparent;box-shadow:0 1px 5px #17354c16;font-weight:700}
.customer-section-nav .tabs{border-bottom:1px solid #cad8e4}
.tablewrap{scrollbar-color:#aabfce var(--surface);scrollbar-width:thin}
thead{background:var(--section);color:#405d74;box-shadow:0 1px #c6d7e4}
th{font-weight:650;letter-spacing:.035em}
td{border-top-color:#e3ebf1;color:#213f56}
tbody tr,tbody tr:nth-child(even){background:var(--surface)}
tbody tr:hover,.clickrow:hover{background:var(--surface)}
.customer-row[aria-selected=true],.admin-selected,.clickrow.selected{background:var(--surface)}
.customer-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;background:var(--surface)}
.rowbtn,.listitem button{color:#174d70;font-weight:600}
.rowbtn:hover,.listitem button:hover{color:var(--blue)}
td small{color:var(--muted)}
.pagination{background:var(--surface);border-top:1px solid var(--line);color:var(--muted)}
.pagination button{background:#fff;border:1px solid #c4d5e2;border-radius:7px;color:var(--blue)}
.pagination button:hover:enabled{background:var(--surface)}
.btn{border-color:#bbcedc;border-radius:8px;color:#274d69;background:#fff;font-weight:600;transition:background .14s,border-color .14s,box-shadow .14s}
.btn:hover{background:var(--surface);border-color:#89acc5;box-shadow:0 2px 5px #17354c09}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 2px 5px #006ba61c}
.btn.primary:hover{background:var(--blue-hover);border-color:var(--blue-hover)}
.btn.quiet{background:transparent;border-color:transparent;color:var(--blue);box-shadow:none}
.btn.quiet:hover{background:var(--surface)}
.btn.danger{color:#a83232;border-color:#ddbdbc}.btn.danger:hover{background:#fff1f0}
.btn:disabled,.pagination button:disabled{opacity:.45;box-shadow:none}
.language-picker select,.admin-scope select,.searchbox input,.period-select select,
.filter-fields input,.filter-fields select,.admin-profile-form input,.admin-profile-form select,
.settings-form input,.login input{
  background:#fff;border:1px solid #b9cddb;border-radius:8px;color:var(--ink);
}
.searchbox input::placeholder,.login input::placeholder{color:#637d91;opacity:1}
.searchbox svg,.period-select svg{color:#55758c}
.admin-scope{border-radius:8px}.admin-scope:not(.is-filtered) select{background:var(--surface)}
.filter-toggle{color:#355970;border-color:#b9cddb;background:#fff}
.filter-toggle:hover,.filter-toggle[aria-expanded=true]{background:var(--surface);border-color:#8eafc6}
.filter-popover{border-color:#b9cddb;border-radius:12px;box-shadow:0 12px 35px #15354f24}
.filter-popover-head,.filterlabel,.settings-form label,.admin-profile-form label{color:#3f5c72;font-weight:550}
.filter-slot-customer .chip.is-filtered,
.report-header .searchbox.is-filtered input,.period-select.is-filtered select,
.filter-fields .filterlabel.is-filtered select,.filter-fields .filterlabel.is-filtered input,
.filter-fields .invoice-filter.is-filtered,.filter-toggle.is-filtered,.admin-scope.is-filtered select{
  background:var(--filter);border:1px solid var(--filter-line);color:#423709;box-shadow:inset 0 0 0 1px #ffdf56;
}
.filter-slot-customer .chip.is-filtered button,.filter-toggle.is-filtered{color:#423709}
.filter-toggle.is-filtered:hover,.filter-toggle.is-filtered[aria-expanded=true]{background:#ffe986;border-color:#aa8a08}
.filter-toggle.is-filtered .filter-count{background:#59480d;color:#fff}
.filter-fields .chip.is-filtered{background:var(--filter);border:1px solid var(--filter-line);color:#423709}
.badge{background:var(--surface);color:#3a5c75;border:1px solid #d2e0ea;border-radius:6px}
.badge.teal{background:var(--surface);color:#126448;border-color:#bedfd0}
.badge.amber{background:#fff3cf;color:#745716;border-color:#e2ce93}
.badge.blue{background:var(--surface);color:#155c8a;border-color:#bfdaed}
.admin-profile{background:var(--surface)}.admin-note{background:var(--surface);border-top-color:var(--line)}
.admin-credentials{border-color:#d2ad36;background:#fff5cf;color:#554313}
.kv dt,.customer-identity span{color:var(--muted)}.kv dd{color:var(--ink)}
.detailhero,.customer-identity{color:var(--ink)}.detailhero .avatar{background:var(--surface);border-color:#bdd4e4;color:#205d85}
.category-legend li{border-color:#e0e9f0}.category-legend summary{color:var(--blue)}
.import-checklist li{color:var(--muted)}.import-checklist li.selected{color:var(--positive)}
.error{background:#fff0ed;color:#96382d;border:1px solid #e8c7bf;border-radius:9px}
.login{border-color:#c6d6e2;box-shadow:0 16px 50px #163d5712;border-radius:18px}
.login .brand-logo img{box-shadow:none}.login label{color:var(--muted)}
.toast{background:#133c58;border:1px solid #355e79;box-shadow:0 8px 28px #122f4930}
.modalcontent{border:1px solid #bfcedb;box-shadow:0 20px 65px #092c4838}
.bottomnav{border-top-color:#c3d4e1;box-shadow:0 -3px 12px #183c5208}
.bottomnav button{color:#536e83;border-radius:8px}.bottomnav button.active{background:var(--section);color:var(--blue)}
@media(max-width:900px){.header-logo,.topbar:has(.admin-scope) .header-logo{width:28px;height:34px}.header-identity{gap:9px}}
@media(max-width:600px){.header-logo,.topbar:has(.admin-scope) .header-logo{width:24px;height:30px}.header-identity{gap:7px}.tabs{border-radius:8px;padding:2px}.tabs button{border-radius:5px}.metric,.panel{border-radius:10px}.brand-logo img{border-radius:8px}}
@media(prefers-reduced-motion:reduce){.nav button,.tabs button,.btn{transition:none}}

/* The data always stays on white, including footers and selected rows. */
.panelbody,.tablewrap,.sourcecard,.overview-footer,.admin-profile,.admin-note,.pagination,.category-body{background:var(--surface)}
.panelhead,.overview-with-orders .panelhead,thead,thead th{background:var(--section)}
.tabs,.customer-section-nav .tabs{background:var(--canvas);border-color:#b8c4cf}
.tabs button.active{box-shadow:inset 0 -2px var(--blue)}
.customer-row[aria-selected=true] td:first-child,.admin-selected td:first-child,.clickrow.selected td:first-child{box-shadow:inset 3px 0 var(--blue)}
.sourcecard,.overview-footer,.admin-note,.pagination{border-color:var(--line)}
.badge,.badge.teal,.badge.blue{background:var(--surface)}
.admin-profile-form h3,.settings-form h3,.import-layout>div>h3,.account-body>div>h3,.sourcecard h3{background:var(--section);padding:8px 10px;border-radius:6px;color:var(--ink)}
.metric{padding:0;overflow:hidden}
.metriclabel{background:var(--section);border-bottom:1px solid var(--line);padding:9px 16px;color:var(--ink)}
.metricvalue{padding:0 16px;margin:8px 0 10px}
.metricperiod{padding:0 16px;margin:0 0 10px}
.topbar .crumb,.topbar .crumb b{color:#fff}
.topbar .source-status,.topbar.report-header .source-status{color:#d5e3ed}
.topbar .source-status:hover,.topbar .source-status:not(button):hover{color:#fff}
.topbar .status{color:#fff}.topbar .status .dot{background:#63d4a4}
.topbar .status.offline .dot{background:#ffdd00}
.topbar .header-logo{background:#fff;border-radius:6px;padding:2px}
.topbar button:focus-visible,.topbar select:focus-visible,.topbar input:focus-visible{outline-color:#ffdd00}
@media(max-width:900px){.metriclabel{padding:8px 12px}.metricvalue,.metricperiod{padding-left:12px;padding-right:12px}}
@media(max-width:600px){.metriclabel{padding:7px 10px}.metricvalue{padding:0 10px;margin:7px 0 9px}.metricperiod{padding:0 10px;margin-bottom:9px}}

/* One primary heading height, regardless of actions or counters. */
:root{--section-bar-height:3.25rem}
.panel,.metric,.sourcecard,.overview-footer{border-width:2px}
.panelhead,.overview-with-orders .panelhead,.metriclabel{
  height:var(--section-bar-height);min-height:var(--section-bar-height);
  flex:0 0 var(--section-bar-height);padding:3px 16px;
  display:flex;align-items:center;border-bottom:2px solid var(--line);
}
.panelhead>div{min-width:0}
.panelhead h2{line-height:1.2;margin:0;overflow-wrap:anywhere}
.panelhead .btn{flex-shrink:0;min-height:44px;height:44px;padding:8px 10px}
.panelhead>.badge{flex-shrink:0}
.week-orders .panelhead h2{white-space:normal}
.week-orders .panelhead>div{gap:3px 12px}
.week-range{line-height:1.2}
/* Administrative help headings can also contain a translated paragraph. */
.panelhead:has(.sub){height:auto;flex-basis:auto;padding:8px 16px}
/* Reuse the existing grey for the subordinate column-heading level. */
thead,thead th{background:var(--canvas);color:#405d74}
thead{box-shadow:0 2px var(--line)}
thead th{border-bottom:2px solid var(--line);font-weight:600}
@media(max-width:600px){.panelhead,.overview-with-orders .panelhead,.metriclabel{padding-left:10px;padding-right:10px}}

/* One shared top row; less frequent filters open from the same row. */
.topbar,.topbar.report-header{display:flex;flex-wrap:nowrap;height:68px;min-height:68px;max-height:68px;padding:8px 18px;gap:12px;position:relative;z-index:35;overflow:visible}
.topbar .header-identity{flex:0 1 215px;min-width:125px;gap:9px}
.topbar .heading-text{min-width:0}.topbar .crumb{font-size:13px;line-height:1.2}
.topbar .source-status{font-size:10px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-header .header-filters{flex:1;display:flex;align-items:center;gap:8px;height:38px;min-height:38px;width:auto;max-width:none;min-width:0;position:static}
.filter-slot{height:38px;min-width:0;position:relative;flex:1}
.filter-slot:empty,.filter-slot:not(:has(*)){display:none}
.filter-slot-search{flex:1.3}.filter-slot-period{flex:1;max-width:175px}.filter-slot-customer{flex:1.1;max-width:240px}.filter-slot-options{flex:0 0 38px}
.filter-toggle{width:38px;height:38px;min-width:38px;padding:0;justify-content:center;position:relative}
.filter-toggle>span{display:none}.filter-count{position:absolute;top:-5px;right:-5px}
.filter-popover{position:absolute;top:46px;right:0;left:auto;width:min(460px,calc(100vw - 35px));max-width:calc(100vw - 35px);max-height:calc(100dvh - 100px);z-index:80;color:var(--ink,#12334a);text-align:left}
.filter-popover .filter-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.filter-popover .filterlabel{min-width:0}.filter-popover input,.filter-popover select{width:100%;min-width:0}
.price-countries{padding:7px 12px;font-size:12px;background:white;border-bottom:1px solid var(--line)}
.price-countries summary{cursor:pointer;color:var(--blue)}.price-countries p{max-height:100px;overflow:auto;line-height:1.7;margin:6px 0}
.price-source-note{padding:6px 12px;border-top:1px solid var(--line);font-size:11px;color:#526a7d;background:white}
@media(max-width:700px){.topbar .filter-popover{position:fixed;top:72px;right:12px;left:auto;width:calc(100vw - 24px);max-width:460px;max-height:calc(100dvh - 95px)}}
.topbar .topactions,.report-header .topactions{display:flex;flex:none;gap:8px;align-items:center;margin-left:auto}
.topbar .admin-scope select{width:130px;max-width:130px;height:38px;font-size:12px}
.sync-control{display:flex;flex-direction:column;gap:2px;align-items:center;min-width:82px}
.topbar .sync-control .status,.report-header .topactions .sync-control .status{display:flex;font-size:9px;line-height:10px;gap:4px;white-space:nowrap}
.topbar .sync-control .status .dot{width:5px;height:5px}
.topbar .sync-control .btn{height:30px;min-height:30px;padding:3px 7px;font-size:11px;gap:4px}
.report-header .topactions .sync-control .btn span{display:inline}
.topbar .logout-button{height:38px;min-height:38px;padding:8px}
.language-picker{position:relative;flex:none}.language-picker select[hidden]{display:none}
.language-menu summary{list-style:none;display:flex;align-items:center;justify-content:center;width:42px;height:38px;cursor:pointer;border:1px solid #b9cddb;border-radius:8px;background:white}
.language-menu summary::-webkit-details-marker{display:none}.language-menu summary:focus-visible{outline:3px solid #ffdd00}
.language-flag{border-radius:2px;box-shadow:0 0 0 1px #17354c25;flex:none}
.language-options{position:absolute;right:0;top:43px;padding:5px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 22px #102f4825;z-index:100;display:flex;flex-direction:column;gap:3px}
.language-options button{display:grid;place-items:center;background:white;border-radius:5px;width:42px;height:36px}.language-options button[aria-pressed=true]{background:var(--section)}
.remember-device{display:flex!important;align-items:center;gap:8px;font-size:13px}.login .remember-device input{width:18px;height:18px;margin:0}

/* A customer or position occupies one compact row in every report. */
.tablewrap td,.week-orders td{padding:5px 11px;height:36px;line-height:1.25;white-space:nowrap}
.tablewrap th,.week-orders th{padding:7px 11px;line-height:1.2}
.tablewrap .rowbtn{display:inline;min-height:24px;padding:3px 0;line-height:1.25;vertical-align:middle}
.tablewrap td small{display:inline;margin:0 0 0 10px;font-size:11px;vertical-align:middle}
.tablewrap td.name{max-width:none}.tablewrap td .btn{min-height:28px;padding:3px 7px}
.pagination{padding:5px 11px}.pagination button{min-height:30px;min-width:34px}
.overview-with-orders .panelhead .section-heading{display:flex;flex-direction:row;align-items:center;gap:9px}
.section-heading>div{min-width:0;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.expand-button{display:flex;align-items:center;justify-content:center;background:transparent;color:var(--blue);width:32px;min-width:32px;height:36px;border-radius:5px;padding:4px}
.expand-button:hover{background:white}.dashboard-section .tablewrap{flex:1;min-height:0;overflow:auto}
.compact-ranking{min-width:450px}.compact-ranking td:first-child{max-width:310px;overflow:hidden;text-overflow:ellipsis}
.compact-ranking .rowbtn{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.content:has(.panel-expanded)>.metrics,.content:has(.panel-expanded)>.overview-footer{display:none}
.overview-with-orders.has-expanded{display:flex;flex-direction:column;flex:1;min-height:0}
.overview-with-orders.has-expanded>.dashboard-section:not(.panel-expanded){display:none}
.overview-with-orders.has-expanded>.panel-expanded{flex:1;min-height:0;display:flex;flex-direction:column;width:100%}
.panel-expanded .compact-ranking{min-width:600px}.panel-expanded .compact-ranking td:first-child{max-width:none}
.tablewrap td small{max-width:22ch;overflow:hidden;text-overflow:ellipsis;display:inline-block}
.tablewrap td .rowbtn{display:inline-block;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tablewrap td,.week-orders td{height:32px;padding-top:3px;padding-bottom:3px}
.panel-expanded .tablewrap td .rowbtn{max-width:none}
@media(max-width:1100px){.tablewrap td small{max-width:12ch}.tablewrap td .rowbtn{max-width:160px}.tablewrap td,.week-orders td{padding-left:8px;padding-right:8px}.tablewrap th,.week-orders th{padding-left:8px;padding-right:8px}.tablewrap td.name{max-width:220px}}
@media(max-width:1250px){.topbar,.topbar.report-header{padding:7px 12px;gap:8px}.topbar .header-identity{flex-basis:165px;min-width:112px}.topbar .header-logo{width:25px;height:32px}.topbar .admin-scope select{width:105px}.topbar .topactions{gap:6px}.report-header .header-filters{gap:6px}.topbar .sync-control{min-width:38px}.topbar .sync-control .btn span,.report-header .topactions .sync-control .btn span{display:none}.topbar .sync-control .status{max-width:42px;overflow:hidden;font-size:0!important}.topbar .sync-control .status .dot{width:5px}.topbar .logout-button{padding:5px}.section-heading>div{gap:2px 8px}}
@media(max-width:1050px){.layout{grid-template-columns:68px minmax(0,1fr)}.sidebar{width:68px;padding:18px 7px}.sidebar .brand-logo,.sidebar .nav button span,.sidebar .sidefoot>div:not(.avatar){display:none}.sidebar .nav button{justify-content:center;padding:10px 6px}.sidebar .sidefoot{padding:15px 0 0;justify-content:center}.topbar .header-identity{flex-basis:140px}.report-header .header-filters{gap:5px}.filter-slot-period{max-width:135px}.filter-slot-customer{max-width:155px}.report-header .period-select select{font-size:11px;padding-right:18px}.topbar .admin-scope select{width:86px;font-size:11px}.topbar .header-logo{display:none!important}.topbar .source-status{font-size:9px}}
@media(max-width:700px){.layout{grid-template-columns:minmax(0,1fr)}.sidebar{display:none}.topbar,.topbar.report-header{padding:6px;gap:6px}.topbar .header-identity{min-width:75px;flex:0 1 100px}.topbar .crumb{font-size:11px}.topbar .source-status{display:none}.report-header .header-filters{overflow:visible}.filter-slot-search{min-width:65px}.filter-slot-period,.filter-slot-customer{min-width:90px}.header-filters{overflow-x:auto!important;scrollbar-width:none}.filter-slot-options{position:static}.filter-popover{top:62px;right:6px}.topbar .topactions{gap:4px}.topbar .admin-scope select{width:62px}.topbar .sync-control{display:none}.topbar .logout-button{padding:4px}.language-menu summary{width:34px}.language-flag{width:25px}.section-heading>div{display:block}.section-heading h2{font-size:12px}.week-range{font-size:9px}.content .panelhead{padding:3px 8px}.panelhead .badge{font-size:10px;padding:4px}.overview-with-orders .panelhead .section-heading{gap:3px}}

/* One upload area for the complete dataset. Only the file list scrolls. */
.unified-import{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;background:var(--surface)}
.import-dropzone{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 18px 0;padding:16px 18px;border:2px dashed var(--line);border-radius:9px;background:var(--surface)}
.import-dropzone h3{font-size:15px}.import-dropzone .note{margin:4px 0 0}.unified-import.dragging .import-dropzone{border-color:var(--blue);background:var(--section)}
.import-picker{position:relative;overflow:hidden;flex:none;cursor:pointer}.import-picker input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.import-picker:focus-within{outline:3px solid var(--blue);outline-offset:3px}.import-picker:has(input:disabled){opacity:.55;cursor:default}
.import-selection{display:flex;justify-content:space-between;align-items:center;min-height:43px;padding:5px 18px;font-size:13px}.import-selection .btn{min-height:30px;padding:4px 8px;font-size:12px}
.import-files{flex:1;min-height:0;overflow:auto;border-top:1px solid var(--line)}.import-files table{min-width:575px}.import-files td{height:35px;padding:6px 18px;white-space:nowrap}.import-files th{padding:7px 18px}.import-files td:last-child{font-size:12px;color:var(--muted)}.import-files td.import-ready{color:var(--positive);font-weight:650}
.import-footer{flex:none;padding:12px 18px;border-top:1px solid var(--line)}.import-buttons{display:flex;align-items:center;gap:12px}.import-footer .note{margin:6px 0 0}.import-footer progress{display:block;height:5px;margin-top:8px}.import-error{flex:none;margin:0 18px 10px;padding:8px 12px}
@media(max-width:900px){.import-dropzone{margin:10px 12px 0;padding:12px;gap:12px}.import-dropzone h3{font-size:14px}.import-dropzone .note{font-size:12px}.import-files td{height:32px;padding:5px 12px}.import-files th{padding:6px 12px}.import-footer{padding:10px 12px}}
@media(max-width:600px){.import-dropzone{align-items:flex-start;flex-direction:column;gap:8px}.import-selection{padding:5px 12px}.import-buttons{flex-wrap:wrap;gap:6px}}

/* Give report titles and data dates priority over the search field. */
.topbar .header-identity{flex:0 0 auto;min-width:240px;max-width:300px}
.topbar .heading-text{min-width:0}.topbar .crumb{white-space:normal;overflow:visible}
.topbar .source-status,.topbar.report-header .source-status{display:block;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;max-width:none}
.report-header .header-filters{justify-content:flex-end}.filter-slot-search{flex:1 1 155px;max-width:270px;min-width:80px}.filter-slot-period{flex:0 1 170px;min-width:140px}.filter-slot-customer{flex:1 1 155px;min-width:90px;max-width:230px}
.compact-period-filter{display:none;grid-column:1/-1}.topbar .tutorial-help-button{flex:none;width:34px;height:38px;min-height:38px;padding:5px}
.expand-button{background:#ffdd00;border:1px solid #c6a900;color:#143247;box-shadow:0 1px 2px #1432471c}
.expand-button:hover{background:#ffe85a;border-color:#ad9000}.expand-button[aria-expanded=true]{background:#fff1a8}
.stale-order{display:inline-block;padding:3px 7px;border-radius:4px;background:#fff0ed;color:#b12929;font-weight:700;border:1px solid #edb7b1}
@media(min-width:701px) and (max-width:1250px){
 .layout{grid-template-columns:96px minmax(0,1fr)}.sidebar{width:96px;padding:14px 6px 10px}.sidebar .nav{overflow-y:auto;min-height:0;scrollbar-width:thin;gap:5px}
 .sidebar .nav button{flex-direction:column;gap:5px;justify-content:center;padding:9px 4px;min-height:59px;text-align:center;flex:none}
 .sidebar .nav button span{display:block!important;font-size:10px;font-weight:500;line-height:1.2;white-space:normal;overflow-wrap:normal}.sidebar .nav button.active span{font-weight:700}
 .sidebar .sidebottom{padding-top:10px}.sidebar .sidefoot{justify-content:center}.sidebar .sidefoot>div:not(.avatar){display:none}
 .topbar .header-identity{min-width:220px;max-width:245px}.topbar .source-status{font-size:10px}.topbar .filter-slot-search{max-width:190px}
}
@media(min-width:701px) and (max-width:1100px){
 .topbar .header-identity{min-width:205px;max-width:225px}.topbar .topactions{gap:5px}.topbar .admin-scope select{width:84px;max-width:84px}.language-menu summary{width:34px}.language-flag{width:26px}
 .topbar .header-logo{display:none!important}.topbar .logout-button,.topbar .tutorial-help-button{width:30px;min-width:30px;padding:4px}.topbar .sync-control{min-width:32px}
 .filter-slot-period{min-width:120px}.topbar:has(.selected-customer) .filter-slot-period{display:none}.topbar:has(.selected-customer) .compact-period-filter{display:block}
}
@media(min-width:701px) and (max-width:900px){
 .topbar,.topbar.report-header{gap:6px;padding:6px 8px}.topbar .header-identity{min-width:182px;max-width:190px}.topbar .crumb{font-size:12px}.topbar .source-status{font-size:9px}
 .topbar .admin-scope select{width:76px;max-width:76px}.filter-slot-search{min-width:70px}.filter-slot-customer{min-width:76px}.filter-slot-options{flex-basis:32px}.filter-toggle{width:32px;min-width:32px}
 .filter-slot-period{display:none}.compact-period-filter{display:block}.report-header .header-filters{gap:5px}.sidebar .nav button{padding:8px 4px}
}
@media(max-width:700px){
 .topbar .header-identity{min-width:118px;max-width:145px;flex:0 0 118px}.topbar .source-status{display:block;font-size:8px;white-space:normal}.topbar .header-logo{display:none!important}.filter-slot-period{display:none}.compact-period-filter{display:block}.topbar .tutorial-help-button{width:28px;min-width:28px;height:34px;min-height:34px}
}
@media(max-height:680px) and (min-width:701px) and (max-width:1250px){.sidebar .nav button{min-height:48px;padding:5px 3px;gap:3px}.sidebar .nav{gap:3px}.sidebar .nav button span{font-size:9px}}

@media(min-width:901px){.topbar .filter-slot-period{min-width:155px;max-width:180px}.topbar .admin-scope{min-width:0}.topbar .admin-scope select{width:138px;max-width:138px}.topbar .admin-scope.is-filtered select{width:84px;max-width:84px}}
@media(min-width:701px) and (max-width:900px){.topbar .admin-scope{min-width:0}.topbar .admin-scope select{width:106px;max-width:106px}.topbar .admin-scope.is-filtered select{width:70px;max-width:70px}}

/* Compact document summaries and indented positions. */
.backorder-summary{cursor:pointer}
.backorder-summary:focus-visible{outline:2px solid #0089ce;outline-offset:-2px}
.backorder-summary[aria-expanded="true"]>td{border-bottom:2px solid #b7cad9}
.backorder-toggle{white-space:nowrap}
.backorder-toggle>span{display:inline-grid;place-items:center;width:20px;height:20px;margin-right:4px;background:#ffdd00;color:#12344a;border-radius:4px}
.backorder-details>td{padding:0 12px 10px 32px!important;background:#fff!important}
.backorder-lines{border:1px solid #b7cad9;border-radius:5px;overflow:auto;max-height:40vh}
.backorder-position-table{width:100%;min-width:580px}
.backorder-position-table thead th{position:static!important;background:#edf0f2!important;font-size:11px}
.backorder-position-table td,.backorder-position-table th{padding:6px 10px!important}
.backorder-position-table td:first-child{max-width:360px}
.backorder-position-table td small{margin-left:10px;display:inline;font-weight:400}
.backorder-table tfoot th,.backorder-table tfoot td{padding:9px 12px;background:#fff;border-top:2px solid #b7cad9}
.backorder-lines .pagination{position:static}
@media(max-width:900px){.backorder-details>td{padding-left:12px!important}.customer-export .note{display:none}}

@media(min-width:701px) and (max-width:900px){.topbar .admin-scope.is-filtered select{width:78px;max-width:78px;padding-left:7px;padding-right:20px}}
.filter-fields .period-select select{padding-left:31px}
