/* MAX jade on ivory, with calm keyboard focus and consistent controls. */
html#max-dashboard:not([data-appearance=dark]){--ui-accent:#246b68;--ui-accent-ink:#153e3c;--ui-tint:#dfefea;--ui-icon-filter:brightness(0) saturate(100%) invert(35%) sepia(21%) saturate(1107%) hue-rotate(128deg);--plum:#246b68;--plum-dark:#246b68}
html#max-dashboard body .maxdash-header .toolbar #profile{order:0!important}html#max-dashboard body .maxdash-header .toolbar #languageToggle{order:1!important}html#max-dashboard body .maxdash-header .toolbar #dateSelect{order:2!important}html#max-dashboard body .maxdash-header .toolbar .theme-shortcut{order:3!important}html#max-dashboard body .maxdash-header .toolbar #notifications{order:4!important}
html#max-dashboard body .maxdash-header .ref-global-search:focus-within{background:var(--ui-raised)!important;border-color:var(--ui-accent)!important;box-shadow:none!important;outline:none!important}
html#max-dashboard body input:not([type=checkbox]):not([type=radio]):focus,html#max-dashboard body textarea:focus,html#max-dashboard body select:focus{outline:1px solid #598b89!important;outline-offset:1px!important;box-shadow:none!important;border-color:#598b89!important;background-color:var(--ui-raised)!important}
html#max-dashboard body .maxdash-header .ref-global-search input:focus{outline:none!important;border:0!important;background:transparent!important}
html#max-dashboard:not([data-appearance=dark]) body :is(.commerce-button.primary,.core-primary,.appearance-save,.inventory-primary,.p-primary,button[type=submit]){background:#dceee8!important;border-color:#a8ccc1!important;color:#184c47!important;box-shadow:0 3px 9px #184c470a!important}
html#max-dashboard body :is(.inventory-return,.sc-back,.mw-back,.workspace-back){display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:9px 16px!important;min-height:40px!important;border:1px solid var(--ui-line)!important;border-radius:14px!important;background:var(--ui-raised)!important;color:var(--ui-accent)!important;box-shadow:0 3px 10px #183e3708!important;font-weight:600!important}
html#max-dashboard body :is(.inventory-return,.sc-back,.mw-back,.workspace-back) :is(img,svg){width:18px!important;height:18px!important;margin:0!important}
html#max-dashboard body .reference-home .ref-card-rows .ref-tile{grid-template-columns:56px minmax(0,1fr)!important;transition:transform .2s,box-shadow .2s,border-color .2s!important}
html#max-dashboard body .reference-home .ref-card-rows .ref-tile .ref-tile-icon{width:56px!important;height:56px!important;padding:12px!important}html#max-dashboard body .reference-home .ref-tile-icon :is(img,svg){width:32px!important;height:32px!important;max-width:none!important}
@media(hover:hover){html#max-dashboard body :is(.ref-tile,.mw-nav-card,.inventory-section-card,.commerce-card,.op-card,.mg-card,.workspace-info-card):hover{transform:translateY(-4px)!important;border-color:var(--ui-accent)!important;box-shadow:0 10px 24px #246b681a!important}}
html#max-dashboard body :is(.commerce-close,.core-close,[data-close],.appearance-dialog header button){display:inline-flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;min-width:36px!important;padding:8px!important;border-radius:11px!important;line-height:1!important}html#max-dashboard body :is(.commerce-close,.core-close,[data-close]) img{width:20px!important;height:20px!important;margin:0!important}
.maxdash-brand[role=button]{cursor:pointer;border-radius:10px}.max-search-results{position:fixed;z-index:1200;padding:7px;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-raised);box-shadow:0 12px 35px #173f3826;max-height:60vh;overflow:auto}.max-search-results[hidden]{display:none}.max-search-results button{display:block;width:100%;padding:12px 16px;border:0;border-radius:11px;background:transparent;color:var(--ui-ink);text-align:start}.max-search-results button:hover,.max-search-results button:focus-visible{background:var(--ui-tint);outline:1px solid var(--ui-accent)}.max-search-results p{padding:12px;color:var(--ui-muted)}
@media(prefers-reduced-motion:reduce){html#max-dashboard body .ref-tile{transition:none!important;transform:none!important}}
html#max-dashboard body .max-view-switch{display:flex;gap:5px;justify-content:center;padding:10px 0 0}html#max-dashboard body .max-view-switch button{border:1px solid var(--ui-line);background:var(--ui-raised);color:var(--ui-muted);padding:6px 20px;border-radius:10px;font-size:13px}html#max-dashboard body .max-view-switch button[aria-pressed=true]{background:var(--ui-tint);color:var(--ui-accent);border-color:var(--ui-accent)}
html#max-dashboard body .max-insights-screen[hidden]{display:none!important}.max-insights-screen{padding:24px 0}.max-insights-screen>p{color:var(--ui-muted);line-height:1.8}.max-insights-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px;margin-top:20px}.max-insights-grid article{background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:18px;padding:22px}.max-insights-grid article p{color:var(--ui-muted);line-height:1.8}.max-insights-grid h2{font-size:18px}
/* Section directories keep workflows; business-wide summaries live in Insights. Transaction, account and count details remain visible. */
html#max-dashboard body :is(.module-launchpad>.ref-metrics,.workspace-screen>.workspace-metrics,.commerce-screen>.commerce-metrics,.menu-page .menu-kpis,.customers-page .customers-kpis,.inventory-page .inventory-experience-summary,.inventory-page .inventory-module-kpis){display:none!important}
html#max-dashboard body .sp-directory-metrics{display:none!important}.max-captured-summary{margin-top:20px;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:18px;padding:22px}.max-captured-summary>p{color:var(--ui-muted);font-size:12px}.max-captured-values{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.max-captured-values>p{padding:16px;border-radius:12px;background:var(--ui-soft);white-space:pre-wrap}
html#max-dashboard:not([data-appearance=dark]) body :is(.inventory-action.primary,.sc-toolbar button.primary,.sc-footer button.primary,.sc-primary,.ix-button.primary,.ix-button.ix-primary,.br-dialog button.primary,.bd-dialog button.primary,.date-apply){background:#dceee8!important;border-color:#a8ccc1!important;color:#184c47!important}
/* Keep the actual account wrapper as the first toolbar item on every viewport. */
html#max-dashboard body .maxdash-header>.topbar-first>.toolbar{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:9px!important;direction:inherit!important}
html#max-dashboard body .maxdash-header .toolbar .profile-control{display:inline-flex!important;order:0!important;flex:0 0 auto!important;position:relative!important}
html#max-dashboard body .maxdash-header .toolbar #languageToggle{order:1!important;border-radius:50%!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;padding:0!important;font-size:0!important}
html#max-dashboard body #languageToggle:after{content:'ع';font-size:14px;font-weight:700}html#max-dashboard[lang=ar] body #languageToggle:after{content:'EN';font-size:10px}
html#max-dashboard body .maxdash-header .toolbar #maxWeather{order:2!important;margin-inline-start:12px!important;border:0!important;background:var(--ui-soft)!important;border-radius:14px!important;display:flex!important;gap:8px!important;padding:7px 12px!important;height:42px!important;max-width:190px;white-space:nowrap;font-size:12px!important}
html#max-dashboard body .maxdash-header .toolbar #maxWeather>span:first-child{font-size:19px;color:var(--ui-accent)}html#max-dashboard body .maxdash-header .toolbar #dateSelect{order:3!important}html#max-dashboard body .maxdash-header .toolbar #notifications{order:4!important}
.intelligence-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.intelligence-head small{letter-spacing:.14em;color:var(--ui-accent);font-weight:700}.intelligence-head h1{margin:8px 0;font-size:clamp(24px,3vw,36px)}.intelligence-head p,.intelligence-legend{color:var(--ui-muted);line-height:1.8}.intelligence-legend{font-size:12px;margin-bottom:20px;white-space:pre-wrap}.intelligence-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:18px}.intelligence-card{background:color-mix(in srgb,var(--ui-panel) 94%,transparent);border:1px solid var(--ui-line);border-radius:22px;padding:22px;box-shadow:var(--ui-shadow);transition:transform .2s,box-shadow .2s}.intelligence-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px #153e3c12}.intelligence-card>header{display:flex;gap:10px;align-items:center}.intelligence-card>header img{width:26px;height:26px;filter:var(--ui-icon-filter)}.intelligence-card h2{font-size:17px;margin:0;flex:1}.intelligence-state{font-size:10px;padding:5px 8px;border-radius:20px;background:var(--ui-soft);color:var(--ui-muted);white-space:nowrap}.intelligence-card[data-health=live] .intelligence-state{background:#e2f2e9;color:#276449}.intelligence-card[data-health=review] .intelligence-state{background:#fff0cf;color:#765113}.intelligence-card[data-health=error] .intelligence-state{background:#fce7eb;color:#a13348}.intelligence-card dl{margin:20px 0}.intelligence-card dl>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--ui-line)}.intelligence-card dt{font-size:13px;color:var(--ui-muted)}.intelligence-card dd{margin:0;font-size:18px;font-weight:600}.intelligence-note{font-size:12px;line-height:1.8;min-height:44px;color:var(--ui-muted)}.intelligence-card footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px}.intelligence-card footer small{color:var(--ui-muted);font-size:10px}.intelligence-card footer button{font-size:11px;padding:7px 11px}.weather-dialog{max-width:450px}.weather-dialog select{display:block;width:100%;padding:12px;margin:15px 0;background:var(--ui-raised);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:12px}.weather-dialog>a{display:block;font-size:11px;color:var(--ui-muted);margin:15px 0}.weather-dialog>button{margin-inline-end:8px}
@media(max-width:1100px){html#max-dashboard body .maxdash-header>.topbar-first{display:flex!important;flex-wrap:wrap!important}html#max-dashboard body .maxdash-header>.topbar-first>.toolbar{order:1!important;margin-inline-start:auto!important}html#max-dashboard body .maxdash-header .ref-global-search{order:2!important;flex:1 1 100%!important}html#max-dashboard body .maxdash-header .maxdash-brand{order:0!important}}
@media(max-width:600px){html#max-dashboard body .maxdash-header>.topbar-first>.toolbar{flex:1 1 100%!important;justify-content:flex-start!important;gap:7px!important}html#max-dashboard body .maxdash-header .toolbar #dateSelect{margin-inline-start:auto!important;width:36px!important;flex:0 0 36px!important}html#max-dashboard body .maxdash-header .toolbar #maxWeather{max-width:150px;margin-inline-start:7px!important;font-size:10px!important;padding:6px 8px!important}.intelligence-grid{grid-template-columns:1fr}.intelligence-head{align-items:flex-start;flex-direction:column}.intelligence-card{padding:18px}}
@media(prefers-reduced-motion:reduce){.intelligence-card{transition:none}.intelligence-card:hover{transform:none}}
@media(max-width:600px){html#max-dashboard body .maxdash-header>.topbar-first>.toolbar{flex-wrap:wrap!important}html#max-dashboard body .maxdash-header .toolbar #maxWeather{max-width:110px!important;min-width:80px!important;flex:1 1 90px!important}html#max-dashboard body .maxdash-header .toolbar #maxWeather [data-weather-text]{overflow:hidden;text-overflow:ellipsis}html#max-dashboard body .maxdash-header .toolbar #notifications{width:32px!important;padding:0!important}html#max-dashboard body .maxdash-header .toolbar #dateSelect{margin-inline-start:0!important}}

/* Shared compact navigation and readable icon plates. */
html#max-dashboard body .max-view-switch[hidden]{display:none!important}
html#max-dashboard body .inventory-navigation{position:static!important;background:transparent!important;backdrop-filter:none!important;padding:0!important;margin:0 0 14px!important;min-height:0!important}
html#max-dashboard body .inventory-page>.native-workspace-back{margin-bottom:14px!important}
html#max-dashboard body .inventory-experience-heading{margin-bottom:20px!important}
html#max-dashboard body .inventory-sections-heading{margin-bottom:16px!important}
html#max-dashboard body .sc-page-header{margin:0 0 18px!important;gap:16px!important}
html#max-dashboard body .sc-page-header h1{font-size:clamp(26px,2.5vw,34px)!important;margin:5px 0!important}
html#max-dashboard body .sc-page-actions{gap:8px!important;align-items:center!important}
html#max-dashboard body .sc-page-body{padding:18px!important;border-radius:18px!important}
html#max-dashboard body .sc-page-body>.live-note{margin:0 0 12px!important}
html#max-dashboard body .live-search{margin:0 0 14px!important;max-width:460px!important;gap:5px!important}
html#max-dashboard body .live-search input{min-height:42px!important;width:100%!important}
html#max-dashboard body .live-pager{margin:14px 0 0!important}
html#max-dashboard body .live-table-wrap th,html#max-dashboard body .live-table-wrap td{padding:12px 14px!important;font-size:13px!important}
html#max-dashboard body .live-table-wrap td:first-child{white-space:nowrap;direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums;min-width:150px;font-size:12px!important;color:var(--ui-ink)!important}
html#max-dashboard body .live-table-wrap td:nth-child(2){min-width:180px;max-width:300px}
html#max-dashboard body .inventory-card-symbol{width:48px!important;height:48px!important;min-width:48px!important;padding:11px!important;border-radius:14px!important;background:var(--ui-tint)!important;display:grid!important;place-items:center!important}
html#max-dashboard body .inventory-card-symbol img{width:26px!important;height:26px!important;filter:var(--ui-icon-filter)!important;opacity:1!important}
html#max-dashboard body :is(.inventory-experience-actions,.sc-page-actions,.live-dialog) button img,html#max-dashboard body .inventory-card-open img{filter:var(--ui-icon-filter)!important;opacity:1!important}
html#max-dashboard body :is(.inventory-action,.commerce-button){gap:8px!important}
html#max-dashboard body :is(.inventory-action,.commerce-button):disabled{opacity:.6!important}
html#max-dashboard body :is(.bd-close,.commerce-close,.core-close,.modal .close,.mw-close,.branch-picker header button){display:grid!important;place-items:center!important;width:36px!important;height:36px!important;min-width:36px!important;padding:8px!important;line-height:1!important;border:1px solid var(--ui-line)!important;border-radius:11px!important;background:var(--ui-raised)!important;color:var(--ui-ink)!important}
html#max-dashboard body :is(.bd-close,.commerce-close,.core-close,.modal .close,.mw-close,.branch-picker header button) img{width:18px!important;height:18px!important;margin:0!important;display:block!important;filter:var(--ui-icon-filter)!important}
@media(max-width:760px){html#max-dashboard body .sc-page-header{gap:12px!important}html#max-dashboard body .sc-page-actions{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important}html#max-dashboard body .sc-page-actions button{flex:1 1 auto!important;min-height:42px!important}html#max-dashboard body .sc-page-body{padding:12px!important}html#max-dashboard body .inventory-page .inventory-return{width:auto!important;min-height:40px!important}html#max-dashboard body .live-search{max-width:none!important}}

/* Weather glass: live readings, quiet atmospheric motion and legible states. */
html#max-dashboard body .maxdash-header .toolbar #maxWeather{position:relative!important;isolation:isolate;overflow:hidden;display:flex!important;align-items:center!important;gap:9px!important;height:48px!important;min-width:148px!important;max-width:210px!important;padding:6px 12px!important;margin-inline-start:6px!important;border:1px solid #ffffffc9!important;border-radius:17px!important;background:linear-gradient(120deg,#ffffffa6,#dcefeb85 65%,#e9f2fc96)!important;color:#244f55!important;backdrop-filter:blur(18px) saturate(140%);box-shadow:inset 0 1px 0 #fff,0 4px 16px #246b6810!important;text-align:start!important;transition:box-shadow .2s,transform .2s}
html#max-dashboard body #maxWeather::before{content:'';position:absolute;z-index:-1;inset:-30px;background:radial-gradient(ellipse at 75% 30%,#ffffffb8,transparent 60%);animation:weather-glow 8s ease-in-out infinite alternate;pointer-events:none}
html#max-dashboard body #maxWeather .weather-art{display:grid;place-items:center;width:30px;height:32px;flex:0 0 30px;color:#b37d25!important}
html#max-dashboard body #maxWeather .weather-art img{width:29px!important;height:29px!important;filter:var(--ui-icon-filter)!important;animation:weather-float 5s ease-in-out infinite;opacity:1!important}
html#max-dashboard body #maxWeather[data-weather-state=ready][data-weather-kind=sun] .weather-art img{filter:brightness(0) saturate(100%) invert(56%) sepia(65%) saturate(694%) hue-rotate(7deg)!important;animation:weather-sun 24s linear infinite}
html#max-dashboard body #maxWeather .weather-copy{display:grid;gap:2px;min-width:0;line-height:1.3}
html#max-dashboard body #maxWeather .weather-heading{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html#max-dashboard body #maxWeather [data-weather-text]{font-size:10px;font-weight:400;color:#47676b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html#max-dashboard body #maxWeather .weather-temperature{font-size:23px;font-weight:600;line-height:1;direction:ltr;font-variant-numeric:tabular-nums;margin-inline-start:3px}
html#max-dashboard body #maxWeather[data-weather-state=error]{background:linear-gradient(120deg,#ffffffa6,#e9edefa6)!important}
html#max-dashboard[data-appearance=dark] body .maxdash-header .toolbar #maxWeather{background:linear-gradient(120deg,#243e49c9,#26333fc2 70%,#3c382e9c)!important;border-color:#b9d8df33!important;color:#e8f3f4!important;box-shadow:inset 0 1px 0 #ffffff17,0 5px 20px #0002!important}
html#max-dashboard[data-appearance=dark] body #maxWeather [data-weather-text]{color:#b3c9d0}
@media(hover:hover){html#max-dashboard body #maxWeather:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 #fff8,0 7px 20px #246b6820!important}}
@keyframes weather-glow{to{transform:translateX(-12px);opacity:.55}}
@keyframes weather-float{50%{transform:translateY(-2px) rotate(4deg)}}
@keyframes weather-sun{to{transform:rotate(360deg)}}
@media(max-width:600px){html#max-dashboard body .maxdash-header .toolbar #maxWeather{min-width:142px!important;max-width:175px!important;flex:1 1 142px!important;height:45px!important;padding:5px 9px!important;margin-inline-start:0!important}html#max-dashboard body #maxWeather .weather-temperature{font-size:21px}.weather-copy{flex:1}}
@media(prefers-reduced-motion:reduce){html#max-dashboard body #maxWeather::before,html#max-dashboard body #maxWeather .weather-art img{animation:none!important}html#max-dashboard body #maxWeather{transition:none!important;transform:none!important}}

html#max-dashboard body .material-details{margin:14px 0;padding:16px;border:1px solid var(--ui-line);border-radius:14px;background:color-mix(in srgb,var(--ui-raised) 75%,transparent)}
html#max-dashboard body .material-details summary{font-size:15px;font-weight:600;color:var(--ui-ink);cursor:pointer}
html#max-dashboard body .material-details[open] summary{margin-bottom:12px}
html#max-dashboard body .material-unit-preview{display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 14px;margin:12px 0 0;border-radius:11px;background:var(--ui-tint);color:var(--ui-accent);font-size:13px;line-height:1.8}
html#max-dashboard body .material-editor .live-mapping label{min-width:0;display:grid;gap:7px;font-size:13px}
html#max-dashboard body .material-editor input,html#max-dashboard body .material-editor select{width:100%;min-height:44px;font-size:15px}
/* Fast material entry: only identity, classification and the three unit fields. */
html#max-dashboard body .material-unit-fields{display:grid;gap:14px;grid-template-columns:1fr}
html#max-dashboard body .material-unit-fields label{display:grid;gap:7px;font-size:13px}
html#max-dashboard body .material-category-field{display:flex;align-items:end;gap:8px;min-width:0}
html#max-dashboard body .material-category-field label{flex:1;min-width:0}
html#max-dashboard body .material-category-field button{flex:none;min-height:44px;white-space:nowrap}
html#max-dashboard body .material-category-create{padding:14px;margin-top:14px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-soft)}
html#max-dashboard body .material-category-create[hidden]{display:none!important}
html#max-dashboard body .material-category-actions{display:flex;gap:8px;margin-top:12px}
html#max-dashboard body .material-editor .live-mapping{row-gap:12px}
html#max-dashboard body .material-editor :is(label,input,select){margin:0!important}
html#max-dashboard body .material-unit-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
html#max-dashboard body .material-editor :is(input[name=name_en],input[name=code],input[name=supplier_item_code],input[name=barcode]){direction:ltr;text-align:start}
@media(max-width:600px){html#max-dashboard body .material-unit-fields{grid-template-columns:1fr}html#max-dashboard body .material-category-field{flex-wrap:wrap}html#max-dashboard body .material-category-field label{flex-basis:100%}}
/* Keep action words intact while the data table scrolls horizontally. */
html#max-dashboard body .live-table-wrap td:last-child{min-width:82px;white-space:nowrap;overflow-wrap:normal;word-break:normal}
html#max-dashboard body .live-table-wrap td:last-child .commerce-button{min-width:62px;min-height:36px;white-space:nowrap;word-break:normal;padding:7px 12px!important}
html#max-dashboard body .material-unit-actions{display:flex;gap:6px;margin-top:7px}
html#max-dashboard body .material-unit-actions .commerce-button{min-height:30px;padding:4px 10px;font-size:11px}
/* Two compact phone header rows: identity/actions, then branch search/weather. */
@media(max-width:600px){
 html#max-dashboard body .maxdash-header{padding:10px 12px!important}
 html#max-dashboard body .maxdash-header>.topbar-first{display:grid!important;grid-template-columns:minmax(0,1fr) repeat(5,30px)!important;grid-template-rows:32px 38px!important;gap:7px 6px!important;direction:ltr!important;align-items:center!important}
 html#max-dashboard body .maxdash-header>.topbar-first>.toolbar{display:contents!important}
 html#max-dashboard body .maxdash-header .maxdash-brand{grid-column:1/3!important;grid-row:1!important;min-width:0!important;width:auto!important;max-width:160px!important;margin:0!important;padding:0!important;justify-self:start!important}
 html#max-dashboard body .maxdash-brand :is(img,svg){max-height:30px!important;max-width:150px!important}
 html#max-dashboard body .maxdash-header .toolbar .profile-control{grid-column:6!important;grid-row:1!important;justify-self:end!important}
 html#max-dashboard body .maxdash-header .toolbar #profile{width:30px!important;height:30px!important;min-height:30px!important;min-width:30px!important;font-size:12px!important}
 html#max-dashboard body .maxdash-header .toolbar #languageToggle{grid-column:5!important;grid-row:1!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;max-width:28px!important}
 html#max-dashboard body .maxdash-header .toolbar #dateSelect{grid-column:4!important;grid-row:1!important;width:30px!important;height:30px!important;min-height:30px!important;min-width:30px!important;padding:5px!important;margin:0!important}
 html#max-dashboard body .maxdash-header .toolbar #notifications{grid-column:3!important;grid-row:1!important;width:30px!important;height:30px!important;min-height:30px!important;padding:5px!important}
 html#max-dashboard body .maxdash-header .ref-global-search{grid-column:1/4!important;grid-row:2!important;min-width:0!important;width:100%!important;height:38px!important;min-height:38px!important;padding:0 10px!important;direction:rtl!important;margin:0!important}
 html#max-dashboard[lang=en] body .maxdash-header .ref-global-search{direction:ltr!important}
 html#max-dashboard body .maxdash-header .ref-global-search input{font-size:11px!important;min-height:0!important;height:34px!important;padding:0!important}
 html#max-dashboard body .maxdash-header .ref-global-search>img{width:16px!important;height:16px!important}
 html#max-dashboard body .maxdash-header .toolbar #maxWeather{grid-column:4/7!important;grid-row:2!important;width:100%!important;max-width:none!important;min-width:0!important;height:38px!important;margin:0!important;padding:4px 7px!important;gap:5px!important;direction:rtl!important;border-radius:13px!important}
 html#max-dashboard[lang=en] body .maxdash-header .toolbar #maxWeather{direction:ltr!important}
 html#max-dashboard body #maxWeather .weather-art{width:20px!important;flex-basis:20px!important}
 html#max-dashboard body #maxWeather .weather-art img{width:20px!important;height:20px!important}
 html#max-dashboard body #maxWeather .weather-heading{font-size:10px!important}
 html#max-dashboard body #maxWeather [data-weather-text]{font-size:8px!important}
 html#max-dashboard body #maxWeather .weather-temperature{font-size:18px!important;margin:0!important}
 html#max-dashboard body .max-view-switch{padding-top:6px!important;gap:4px!important}
 html#max-dashboard body .max-view-switch button{padding:4px 12px!important;font-size:11px!important;min-height:28px!important}
 html#max-dashboard body:not(.platform-body)>main{padding-top:12px!important}
 html#max-dashboard body .inventory-navigation{margin-bottom:8px!important}
 html#max-dashboard body :is(.inventory-return,.sc-back,.workspace-back,.mw-back){min-height:34px!important;padding:6px 12px!important;font-size:12px!important}
 html#max-dashboard body .sc-page-header{gap:10px!important;margin-bottom:12px!important}
 html#max-dashboard body .sc-page-header h1{font-size:24px!important;margin:3px 0!important}
 html#max-dashboard body .sc-page-header p{font-size:12px!important}
 html#max-dashboard body .live-source{font-size:10px!important}
 html#max-dashboard body .sc-page-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;width:100%!important}
 html#max-dashboard body .sc-page-actions button{min-height:36px!important;padding:5px 7px!important;font-size:11px!important;white-space:nowrap!important}
 html#max-dashboard body .sc-page-actions button img{width:15px!important;height:15px!important}
 html#max-dashboard body .sc-page-actions button[data-live-action=add]{grid-column:span 2!important}
}
/* Glass needs a softly coloured surface behind translucent, refracting controls. */
html#max-dashboard body .maxdash-header{background:radial-gradient(ellipse at 18% 0%,color-mix(in srgb,var(--ui-accent) 20%,transparent),transparent 58%),radial-gradient(ellipse at 88% 100%,color-mix(in srgb,var(--ui-tint) 90%,transparent),transparent 64%),color-mix(in srgb,var(--ui-raised) 78%,transparent)!important;border-bottom:1px solid color-mix(in srgb,var(--ui-accent) 15%,transparent)!important;box-shadow:inset 0 1px 0 #ffffffbd,0 6px 24px #153e3c08!important;backdrop-filter:blur(24px) saturate(150%);-webkit-backdrop-filter:blur(24px) saturate(150%)}
html#max-dashboard body .maxdash-header .toolbar :is(#profile,#languageToggle,#dateSelect,#notifications),html#max-dashboard body .maxdash-header .ref-global-search{background:linear-gradient(135deg,#ffffffc7 0%,#ffffff6b 42%,#ffffff16 44%,#ffffff36 70%,#ffffff8c 100%),color-mix(in srgb,var(--ui-tint) 42%,transparent)!important;border:1px solid #ffffffd9!important;box-shadow:inset 1px 1px 0 #fffffffa,inset -1px -1px 0 color-mix(in srgb,var(--ui-accent) 20%,transparent),0 4px 12px color-mix(in srgb,var(--ui-accent) 14%,transparent)!important;backdrop-filter:blur(18px) saturate(165%);-webkit-backdrop-filter:blur(18px) saturate(165%);color:var(--ui-accent)!important;transition:box-shadow .18s,background .18s,transform .18s}
html#max-dashboard body .maxdash-header .toolbar #profile{background:linear-gradient(135deg,#ffffffe0,#ffffff36 45%,#ffffff05 47%,#ffffff65),color-mix(in srgb,var(--ui-accent) 20%,var(--ui-tint))!important;font-weight:600!important}
html#max-dashboard body .maxdash-header .toolbar :is(#dateSelect,#notifications) img{filter:var(--ui-icon-filter)!important}
html#max-dashboard[data-appearance=dark] body .maxdash-header{box-shadow:inset 0 1px 0 #ffffff17,0 6px 24px #00000018!important}
html#max-dashboard[data-appearance=dark] body .maxdash-header .toolbar :is(#profile,#languageToggle,#dateSelect,#notifications),html#max-dashboard[data-appearance=dark] body .maxdash-header .ref-global-search{background:linear-gradient(135deg,#ffffff24,#ffffff0c 42%,transparent 44%,#ffffff08 70%,#ffffff18),color-mix(in srgb,var(--ui-raised) 58%,transparent)!important;border-color:#ffffff30!important;box-shadow:inset 1px 1px 0 #ffffff35,inset -1px -1px 0 #00000035,0 4px 14px #00000024!important}
@media(hover:hover){html#max-dashboard body .maxdash-header .toolbar :is(#profile,#languageToggle,#dateSelect,#notifications):hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 #ffffffcf,0 5px 15px color-mix(in srgb,var(--ui-accent) 14%,transparent)!important}}
html#max-dashboard body .maxdash-header .toolbar :is(#profile,#languageToggle,#dateSelect,#notifications):focus-visible{outline:2px solid var(--ui-accent)!important;outline-offset:3px!important}
@media(prefers-reduced-motion:reduce){html#max-dashboard body .maxdash-header .toolbar :is(#profile,#languageToggle,#dateSelect,#notifications){transition:none!important;transform:none!important}}

@media(max-width:600px){html#max-dashboard body .sc-page-actions:has([data-live-action=add]){grid-template-columns:repeat(2,minmax(0,1fr))!important}html#max-dashboard body .sc-page-actions button[data-live-action=add]{grid-column:1/-1!important}}
