/* Shared presentation only. Data, permissions and workflow handlers stay in their modules. */
html[data-stt-shell] {
  color-scheme: dark;
  --stt-canvas: #0a0a0c;
  --stt-panel: #141418;
  --stt-panel-raised: #141418;
  --stt-input: #0a0a0c;
  --stt-border: #26262e;
  --stt-border-strong: #26262e;
  --stt-text: #fff;
  --stt-heading: #fff;
  --stt-muted: #a1a1aa;
  --stt-muted-soft: #a1a1aa;
  --stt-accent: #ffb703;
  --stt-accent-hover: #e0a300;
  --stt-accent-soft: #26262e;
  --stt-secondary: #fb8500;
  --stt-mint: #00f59b;
  --stt-cyan: #00d2ff;
  --stt-danger: #ff3366;
  --stt-sidebar-width: 248px;
  --stt-shell-header: 64px;
  --bg: var(--stt-canvas);
  --card: var(--stt-panel);
  --panel: var(--stt-panel);
  --panel2: var(--stt-panel-raised);
  --ink: var(--stt-text);
  --text: var(--stt-text);
  --muted: var(--stt-muted);
  --line: var(--stt-border);
  --green: var(--stt-mint);
  --blue: var(--stt-accent);
  --amber: var(--stt-secondary);
  --red: var(--stt-danger);
  --gold: var(--stt-accent);
  --navy: var(--stt-canvas);
  --navy2: var(--stt-panel);
  --surface: var(--stt-panel);
  --border: var(--stt-border);
  --accent: var(--stt-accent);
  --jsa-bg: var(--stt-canvas);
  --jsa-card: var(--stt-panel);
  --jsa-border: var(--stt-border);
  --jsa-muted: var(--stt-muted);
  --jsa-gold: var(--stt-accent);
  background: var(--stt-canvas) !important;
  color: var(--stt-text) !important;
  text-rendering: optimizeLegibility;
}

html[data-stt-shell] *, html[data-stt-shell] *::before, html[data-stt-shell] *::after { box-sizing: border-box; }
html[data-stt-shell] [hidden] { display: none !important; }
html[data-stt-shell] body {
  margin: 0;
  background: var(--stt-canvas) !important;
  color: var(--stt-text) !important;
}
html[data-stt-shell] :is(h1,h2,h3,h4) { color: var(--stt-heading) !important; }
html[data-stt-shell] :is(p,small,.muted,.small,.dim,.sub,.note-text,.stat-head,.stat-foot,.footer,.footnote,footer) { color: var(--stt-muted); }
html[data-stt-shell] :is(label,dt) { color: var(--stt-muted); }
html[data-stt-shell] :is(a,.link,.text-button,.bore-id) { color: var(--stt-accent); }
html[data-stt-shell] :is(button,input,select,textarea) { font-family: inherit; }
html[data-stt-shell] :is(button,a,input,select,textarea,summary):focus-visible {
  outline: 2px solid var(--stt-accent) !important;
  outline-offset: 3px;
}
html[data-stt-shell] :is(button,a) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html[data-stt-shell] button:disabled { cursor: default; opacity: .5; }

/* Surface vocabulary shared with the existing modules and the three templates. */
html[data-stt-shell] :is(.content,body>main) { background: var(--stt-canvas) !important; }
html[data-stt-shell] :is(.panel,.card,.kpi,.tile,.period,.box,.stat,.toolbar,.bore-kpi,.bore-register,.asset,.check,.hazard,.checkitem,.result,.idbox,.summary>div,.task-card,.crewcard,.lane,.pick,.linepick,.exec-panel,.exec-kpi,.exec-period,.exec-attention,.exec-insight,.exec-crew,.exec-fleet,.exec-notice,.exec-donut>div,.wb-panel,.wb-cards>article,.wb-review,.invoice-details,.invoice-tax,.invoice-work,.invoice-line-card,.invoice-draft-totals) {
  background: var(--stt-panel) !important;
  border-color: var(--stt-border) !important;
  color: var(--stt-text) !important;
  box-shadow: none;
}
html[data-stt-shell] :is(.panel-head,.section-title,.head,.lane-head,.ticket-head,.table-count,.invoice-export-actions) {
  background: var(--stt-panel) !important;
  color: var(--stt-muted) !important;
  border-color: var(--stt-border) !important;
}
html[data-stt-shell] :is(.hero,.asset-visual) {
  background: var(--stt-panel) !important;
  color: var(--stt-heading) !important;
  border-color: var(--stt-border) !important;
}
html[data-stt-shell] :is(.eyebrow,.stt-kicker) { color: var(--stt-accent) !important; letter-spacing: 1.5px; }
html[data-stt-shell] :is(.stat-num,.kpi b,.box b,.metrics b,.summary b) { color: var(--stt-heading) !important; font-variant-numeric: tabular-nums; }
html[data-stt-shell] :is(.exec-kpi>span,.exec-kpi>small,.exec-period>small,.exec-period-metrics span,.exec-panel-title>span,.exec-notice small,.exec-legend,.exec-connections small,.help,.periodtitle) { color: var(--stt-muted) !important; }
html[data-stt-shell] :is(.exec-kpi>strong,.exec-period>strong,.exec-period-metrics b,.exec-fleet strong,.exec-connections strong,.exec-notice strong) { color: var(--stt-heading) !important; }
html[data-stt-shell] :is(.exec-kpi,.exec-period,.headline>.tile,.stats>.stat,.kpis>.card,.kpis>.kpi,.stt-template-metrics .kpi,.wb-cards>article,.bore-kpi,.tiles>.tile) { border-top: 2px solid var(--stt-accent) !important; }
html[data-stt-shell] :is(.exec-kpi.green,.exec-kpi[data-route=production]:not(:nth-child(4)),.exec-period,.stats>.stat:nth-child(odd),.wb-cards>article:nth-child(n+2)) { border-top-color: var(--stt-mint) !important; }
@media screen {
html[data-stt-shell] :is(.exec-kpi[data-route=production]:not(:nth-child(4))>strong,.exec-period>strong,.stats>.stat:nth-child(odd)>strong,.wb-cards>article:nth-child(n+2)>strong,.wb-aging b,.money,.currency,.paid,.approved,b.green,.metric .green):not(button):not(.btn):not(.action):not(:where(.preview *,[data-stt-document-paper] *)) { color: var(--stt-mint) !important; }
html[data-stt-shell] :is(.exec-kpi[data-route=tickets811]>strong,.exec-kpi[data-route=ticketRequests]>strong,.exec-notice[data-route=tickets811] .exec-notice-num,.exec-notice[data-route=ticketRequests] .exec-notice-num,.pothole,.potholes,.ticket-number,.cyan) { color: var(--stt-cyan) !important; }
}
html[data-stt-shell] :is(.exec-kpi[data-route=tickets811],.exec-kpi[data-route=ticketRequests]) { border-top-color: var(--stt-accent) !important; }
html[data-stt-shell] :is(.wb-heading>div>span,.wb-panel p,.wb-panel small,.exec-notice-num,.exec-arrow,.live-dot,.exec-legend,.exec-donut small,.exec-fleet>span,.exec-fleet strong small,.exec-crew>div:first-child,.exec-notice small) { color: var(--stt-muted) !important; }
html[data-stt-shell] :is(.bar>i,.bar>span) { background: var(--stt-accent); }
html[data-stt-shell] .bar { background: var(--stt-border); }
html[data-stt-shell] .exec-kpi::after { display: none !important; }
html[data-stt-shell] .exec-period-metrics { border-color: var(--stt-border) !important; }
html[data-stt-shell] .exec-panel svg :is(line,text) { stroke: var(--stt-border); }
html[data-stt-shell] .exec-panel svg text { fill: var(--stt-muted); stroke: none; }
html[data-stt-shell] .exec-panel svg polyline[stroke="#63aaff"],
html[data-stt-shell] .exec-panel svg circle[fill="#8cc1ff"] { stroke: var(--stt-mint); }
html[data-stt-shell] .exec-panel svg circle[fill="#8cc1ff"] { fill: var(--stt-mint); }
html[data-stt-shell] .exec-panel svg polyline[stroke="#f5b76c"] { stroke: var(--stt-secondary); }
html[data-stt-shell] .exec-panel svg stop[stop-color="#4e9dff"] { stop-color: var(--stt-mint); }
html[data-stt-shell] .exec-legend i[style*="#63aaff"] { background: var(--stt-mint) !important; }
html[data-stt-shell] .exec-legend i[style*="#f5b76c"] { background: var(--stt-secondary) !important; }
html[data-stt-shell] .panel svg polyline[stroke="#66aaff"],
html[data-stt-shell] .panel svg circle[fill="#8ec1ff"] { stroke: var(--stt-mint); }
html[data-stt-shell] .panel svg circle[fill="#8ec1ff"] { fill: var(--stt-mint); }
html[data-stt-shell] .panel svg polyline[stroke="#efbb78"] { stroke: var(--stt-secondary); }
html[data-stt-shell] .panel svg line[stroke="#2a405b"] { stroke: var(--stt-border); }
html[data-stt-shell] .panel .row.status span[style*="#78b3ff"] { color: var(--stt-mint) !important; }
html[data-stt-shell] .panel .row.status span[style*="#efbb78"] { color: var(--stt-secondary) !important; }
html[data-stt-shell] .logo { background: var(--stt-accent); color: var(--stt-canvas); }

/* Match the legacy input selector's exclusions, then outrank its !important rule. */
html[data-stt-shell] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
html[data-stt-shell] select,
html[data-stt-shell] textarea {
  background: var(--stt-input) !important;
  color: var(--stt-text) !important;
  border-color: var(--stt-border-strong) !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 7px;
  min-height: 38px;
  accent-color: var(--stt-accent);
}
html[data-stt-shell] :is(input,textarea)::placeholder { color: var(--stt-muted) !important; opacity: 1; }
html[data-stt-shell] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):disabled,
html[data-stt-shell] select:disabled,
html[data-stt-shell] textarea:disabled { color: var(--stt-muted) !important; background: var(--stt-panel) !important; }
html[data-stt-shell] :is(input[type=checkbox],input[type=radio]) { accent-color: var(--stt-accent) !important; }
html[data-stt-shell] :is(.btn,.ghost,.secondary,button.action:not(.primary):not(.gold),.statusBtns button,button:not(.primary):not(.green):not(.danger):not(.stt-route-link):not([data-hub])):not(:where(.stt-hybrid-schedule button)) {
  background-color: var(--stt-panel);
  color: var(--stt-text);
  border-color: var(--stt-border-strong);
}
html[data-stt-shell] :is(.btn,.ghost,.secondary,button.action):hover:not(:disabled) { background-color: var(--stt-border); border-color: var(--stt-accent); }
html[data-stt-shell] :is(.btn.primary,button.primary,.action.primary,.btn.green,.action.green,.action.gold,.btn.gold,button.gold,.stt-primary) {
  background: var(--stt-accent) !important;
  border-color: var(--stt-accent) !important;
  color: #000 !important;
  font-weight: 750;
}
html[data-stt-shell] :is(.btn.primary,button.primary,.action.primary,.btn.green,.action.green,.action.gold,.btn.gold,button.gold,.stt-primary):hover:not(:disabled) {
  background: var(--stt-accent-hover) !important;
  border-color: var(--stt-accent-hover) !important;
}
html[data-stt-shell] :is(button.danger,.btn.danger) { color: var(--stt-danger) !important; border-color: var(--stt-danger) !important; }
html[data-stt-shell] :is(.tabs button.active,#tabs button.active,.pm-nav button.active,.detail-tabs button.active,.filters button.active) {
  background: var(--stt-accent) !important;
  color: #000 !important;
  border-color: var(--stt-accent) !important;
}

html[data-stt-shell] table { background: var(--stt-panel); color: var(--stt-text); font-variant-numeric: tabular-nums; }
html[data-stt-shell] :is(thead,th) { background: var(--stt-panel) !important; color: var(--stt-muted) !important; border-color: var(--stt-border) !important; }
html[data-stt-shell] td { border-color: var(--stt-border) !important; }
html[data-stt-shell] tbody tr:hover { background: #202024 !important; }
html[data-stt-shell] :is(tbody tr.selected,.selectable.selected) { background: var(--stt-border) !important; }
html[data-stt-shell] :is(.tablewrap,.table-wrap,.source-table-wrap,.stt-ledger-scroll) { max-width: 100%; overflow: auto; scrollbar-width: thin; }
html[data-stt-shell] :is(.pill,.badge) { background: var(--stt-border); color: var(--stt-muted); }
html[data-stt-shell] :is(.pill.active,.badge.active) { background: var(--stt-accent) !important; color: #000 !important; }
html[data-stt-shell] :is(.pill.good,.badge.good,.badge.green,.pill.Completed,.pill.Ready,.pill.Approved,.pill.Paid,.badge.approved,.badge.paid) { background: var(--stt-panel) !important; color: var(--stt-mint) !important; }
html[data-stt-shell] :is(.pill.warn,.pill.amber,.badge.amber,.badge.warn,.pill.Pending,.pill.Partial,.amber) { background: var(--stt-panel) !important; color: var(--stt-secondary) !important; }
html[data-stt-shell] :is(.pill.bad,.badge.red,.badge.bad,.pill.Overdue) { background: var(--stt-panel) !important; color: var(--stt-danger) !important; }
html[data-stt-shell] :is(.notice,.note,.alert:not(.stop)) { background: var(--stt-panel) !important; border-color: var(--stt-border) !important; color: var(--stt-muted) !important; }
/* Legacy inspection/permit surfaces must inherit the shell, including empty states and detail dialogs. */
html[data-stt-shell] :is(.help,.inspection-note) { background: var(--stt-panel) !important; border-color: var(--stt-accent) !important; color: var(--stt-muted) !important; }
html[data-stt-shell] :is(.permit-card,.detail-block,.photo-card,.picks,.check-row) { background: var(--stt-panel) !important; border-color: var(--stt-border) !important; color: var(--stt-text) !important; }
html[data-stt-shell] :is(.empty,.foot,.photo-card small) { color: var(--stt-muted) !important; }
html[data-stt-shell] .doc { border-color: var(--stt-border) !important; }
html[data-stt-shell] :is(.pill.green,.phase-closed) { background: var(--stt-panel) !important; border-color: var(--stt-mint) !important; color: var(--stt-mint) !important; }
html[data-stt-shell] .pill.red { background: var(--stt-panel) !important; color: var(--stt-danger) !important; }
html[data-stt-shell] .error { background: var(--stt-panel) !important; }
html[data-stt-shell] :is(.error,.warntext,.invoice-form-error,.red) { color: var(--stt-danger) !important; }
html[data-stt-shell] :is(.stop,.checkitem.fail,.failbox) { background: var(--stt-panel) !important; border-color: var(--stt-danger) !important; color: var(--stt-danger) !important; }
html[data-stt-shell] .checkitem.pass { background: var(--stt-panel) !important; border-color: var(--stt-mint) !important; }
html[data-stt-shell] dialog { background: var(--stt-panel) !important; border-color: var(--stt-border-strong) !important; color: var(--stt-text) !important; }
html[data-stt-shell] dialog::backdrop { background: #000000c4; }

/* Native main/Field surfaces that predate the shell palette. Keep map imagery,
   drawing symbols, document paper and recorded signatures in their own colors. */
@media screen {
  html[data-stt-shell=embedded] aside {
    background: var(--stt-panel) !important;
    border-color: var(--stt-border) !important;
    color: var(--stt-text) !important;
  }
  html[data-stt-shell] :is(.role-frame,.stt-module-frame,#briefFrame,#mapWorkspace,.bore-workspace,.viewer,.mapbox,.map-shell,#map,.fm-map) {
    background: var(--stt-canvas) !important;
    border-color: var(--stt-border) !important;
    color: var(--stt-text) !important;
  }
  html[data-stt-shell] :is(.map-summary,.stt-arcgis-draw-tools,.stt-arcgis-tooltip,.field-map-editor,.effective,.estimate,.source-original,.install-instructions,.toast,.stt-list-pagination,.jsa-production-row,.jsa-steps a,.bore-pill,.badge.blue,.tile i,.icon,.step b,.issue-symbol) {
    background: var(--stt-panel) !important;
    border-color: var(--stt-border) !important;
    color: var(--stt-text) !important;
  }
  html[data-stt-shell] :is(.field-map-editor,.stt-project-map-review,.stt-project-map-prepare) {
    --fm-gold: var(--stt-accent);
    --fm-line: var(--stt-border);
    --fm-muted: var(--stt-muted);
    --map-panel: var(--stt-panel);
    --map-ink: var(--stt-text);
    --map-muted: var(--stt-muted);
    --map-line: var(--stt-border);
    --map-control: var(--stt-input);
    --map-control-ink: var(--stt-text);
    --map-accent: var(--stt-accent);
  }
  html[data-stt-shell] :is(.stt-arcgis-tool,.stt-arcgis-basemap,.field-map-editor .fm-button,.bucket-tabs button,.stt-list-pagination button) {
    background: var(--stt-panel) !important;
    border-color: var(--stt-border) !important;
    color: var(--stt-text) !important;
  }
  html[data-stt-shell] :is(.stt-arcgis-draw-tools>summary,.stt-project-map-eyebrow,.stt-project-map-counts,.field-map-editor .fm-status,.stt-project-map-attribution a) { color: var(--stt-accent) !important; }
  html[data-stt-shell] :is(.stt-arcgis-tool,.stt-arcgis-basemap,.field-map-editor .fm-button,.bucket-tabs button,.stt-list-pagination button):hover:not(:disabled) {
    background: var(--stt-border) !important;
    border-color: var(--stt-accent) !important;
  }
  html[data-stt-shell] :is(.btn.blue,.btn.active,.field-map-editor .fm-primary,.bucket-tabs button.active,.stt-arcgis-tool[aria-pressed=true],.stt-arcgis-basemap[aria-pressed=true]) {
    background: var(--stt-accent) !important;
    border-color: var(--stt-accent) !important;
    color: #000 !important;
  }
  html[data-stt-shell] :is(.feature.selected,.file.selected,.jsa-steps a[aria-current=step]) {
    background: var(--stt-border) !important;
    border-color: var(--stt-accent) !important;
    color: var(--stt-text) !important;
  }
  html[data-stt-shell] :is(.hero p,.source,.due,.asset-code,.choices small,.status-line,.stat>span,.metric>span,.tile>span,.file small,.trace-row small,.stt-list-pagination label,.field-map-editor p,#state,#updated) { color: var(--stt-muted) !important; }
  html[data-stt-shell] :is(.tp-banner,.permit-check-note,.permit-hold,.stt-project-map-publish-note,#notice:not(:empty),#sttConnection) {
    background: var(--stt-panel) !important;
    border-color: var(--stt-accent) !important;
    color: var(--stt-muted) !important;
  }
  html[data-stt-shell] :is(.tp-banner p,.stt-project-map-background-warning) { color: var(--stt-muted) !important; }
  html[data-stt-shell] :is(.pill,.badge.blue) { background: var(--stt-border) !important; color: var(--stt-muted) !important; }
  html[data-stt-shell] :is(.pill.green,.pill.good,.pill.Completed,.pill.Ready,.pill.Approved,.pill.Paid,.bore-pill.done,.statusBtns button.on.pass) { background: var(--stt-panel) !important; color: var(--stt-mint) !important; }
  html[data-stt-shell] :is(.pill.warn,.pill.amber,.pill.Pending,.pill.Partial) { background: var(--stt-panel) !important; color: var(--stt-secondary) !important; }
  html[data-stt-shell] :is(.pill.red,.pill.bad,.pill.Overdue,.statusBtns button.on.fail) { background: var(--stt-panel) !important; color: var(--stt-danger) !important; }
  html[data-stt-shell] :is(.pill.active,.badge.active) { background: var(--stt-accent) !important; color: #000 !important; }
  html[data-stt-shell] :is(.statusBtns button.on.na,.pm-tick[style*="background"]) { background: var(--stt-border) !important; color: var(--stt-muted) !important; }
  html[data-stt-shell] :is(.due.late,.bore-error,.jsa-stage-error,.jsa-completion-status[data-error=true],.field-map-editor .fm-error,#notice.error) { color: var(--stt-danger) !important; }
  html[data-stt-shell] :is(.bore-error,.jsa-stage-error,.jsa-completion-status[data-error=true]) { background: var(--stt-panel) !important; border-color: var(--stt-danger) !important; }
  html[data-stt-shell] :is(input[type=checkbox],input[type=radio]) { background-color: var(--stt-input) !important; border-color: var(--stt-border) !important; }
  html[data-stt-shell] :is(.jsa-steps a b,.tile i,.icon,.step b) { color: var(--stt-accent) !important; }
  html[data-stt-shell] .jsa-signature-pad { background: var(--stt-input) !important; border-color: var(--stt-accent) !important; }
  html[data-stt-shell] :is(.task,.trace-row,.source-table td:first-child,.source-table th:first-child,.tp-card-summary) { border-color: var(--stt-border) !important; }
  html[data-stt-shell] :is(.source-table td:first-child,.source-table th:first-child) { background: var(--stt-panel) !important; }
}

/* Only the confirmed outer application sidebar receives shell positioning. */
html[data-stt-shell=master] body { padding: 0 !important; }
html[data-stt-shell=master] body>aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--stt-sidebar-width);
  height: 100dvh;
  padding: 25px 16px 18px;
  background: #0e0e12 !important;
  border-right: 1px solid var(--stt-border) !important;
  color: var(--stt-muted);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 60;
  scrollbar-width: thin;
}
html[data-stt-shell=master] body>aside .brand { font: 750 23px/1.25 Manrope,"Segoe UI",sans-serif; color: var(--stt-heading); padding: 0 11px 21px; letter-spacing: -.9px; }
html[data-stt-shell=master] body>aside .brand b { color: var(--stt-accent) !important; }
html[data-stt-shell=master] body>aside .brand small { font: 500 8px/1.7 Inter,"Segoe UI",sans-serif; color: var(--stt-muted-soft); letter-spacing: 2px; margin-top: 7px; }
html[data-stt-shell=master] body>aside .section-label { font-size: 9px; letter-spacing: 1.6px; color: var(--stt-muted); margin: 14px 12px 12px; }
html[data-stt-shell=master] body>main { margin-left: var(--stt-sidebar-width) !important; min-width: 0; min-height: 100dvh; width: auto; max-width: none; padding: 0 !important; }
html[data-stt-shell=master] #nav { display: block; margin: 0; }
html[data-stt-shell=master] #nav .nav-group { margin-bottom: 9px; }
html[data-stt-shell=master] #nav .nav-category { color: var(--stt-muted); font-size: 9px; letter-spacing: 1.3px; padding: 12px; }
html[data-stt-shell=master] :is(.stt-hub,#nav details) { margin: 4px 0 9px; border: 0; }
html[data-stt-shell=master] :is(.stt-hub>summary,#nav details>summary) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--stt-heading);
  font-size: 12px;
  font-weight: 650;
  border-radius: 7px;
  list-style: none;
  cursor: pointer;
}
html[data-stt-shell=master] :is(.stt-hub>summary,#nav details>summary)::-webkit-details-marker { display: none; }
html[data-stt-shell=master] :is(.stt-hub>summary,#nav details>summary)::after { content: "⌄"; margin-left: auto; color: var(--stt-muted); }
html[data-stt-shell=master] :is(.stt-hub[open]>summary,#nav details[open]>summary) { color: var(--stt-accent); background: var(--stt-panel); }
html[data-stt-shell=master] :is(.stt-hub[open]>summary,#nav details[open]>summary)::after { transform: rotate(180deg); }
html[data-stt-shell=master] :is(.stt-route-link,#nav button,button[data-hub]) {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  padding: 10px 12px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 7px;
  background: transparent !important;
  color: var(--stt-muted);
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 550;
  white-space: normal;
}
html[data-stt-shell=master] .stt-hub .stt-route-link { padding-left: 24px; font-size: 11px; }
html[data-stt-shell=master] :is(.stt-route-link,#nav button,button[data-hub]):hover { background: var(--stt-border) !important; color: var(--stt-heading); }
html[data-stt-shell=master] :is(.stt-route-link[aria-current=page],.stt-route-link.active,#nav button.active,button[data-hub][aria-current=page]) {
  background: var(--stt-accent) !important;
  color: #000 !important;
  border-left-color: var(--stt-accent);
}
html[data-stt-shell=master] :is(.stt-route-link[aria-current=page],.stt-route-link.active,#nav button.active,button[data-hub][aria-current=page])>span:first-child { color: #000 !important; }
html[data-stt-shell=master] body>aside .aside-foot { margin-top: auto; padding: 20px 11px 0; border-color: var(--stt-border); font-size: 11px; }
html[data-stt-shell=master] body>aside .aside-foot>div:first-child { color: var(--stt-muted) !important; }
html[data-stt-shell=master] body>aside .aside-foot,
html[data-stt-shell=master] #app .footer,
html[data-stt-shell] #trainingBanner { display: none !important; }
html[data-stt-shell=master] :is(.avatar,.stt-profile-avatar) { background: var(--stt-panel); color: var(--stt-accent); border: 1px solid var(--stt-border); border-radius: 50%; }

html[data-stt-shell=master] :is(body>main>.topbar,.stt-master-header) {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  height: var(--stt-shell-header);
  min-height: var(--stt-shell-header);
  padding: 0 38px;
  border-bottom: 1px solid var(--stt-border) !important;
  background: var(--stt-panel) !important;
  color: var(--stt-text) !important;
  backdrop-filter: blur(12px);
}
html[data-stt-shell=master] :is(.crumb,.crumb strong,.stt-master-header h1) { color: var(--stt-heading) !important; }
html[data-stt-shell=master] :is(.stt-master-context,.stt-shell-context,.stt-context-controls) { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; min-width: 0; }
html[data-stt-shell=master] .stt-master-header label { display: flex; flex-direction: column; align-items: stretch; font-size: 9px; color: var(--stt-muted); letter-spacing: .3px; margin: 0; }
html[data-stt-shell=master] :is(#stt-shell-project,#stt-shell-start,#stt-shell-end) { margin-top: 5px; padding: 8px 11px; font-size: 11px; width: auto; max-width: 100%; min-height: 36px; }
html[data-stt-shell=master] #stt-shell-project { width: 235px; }
html[data-stt-shell=master] :is(#stt-shell-start,#stt-shell-end) { width: 143px; }
html[data-stt-shell=master] .stt-master-header .top-right { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; margin-left: auto; min-width: 0; }
html[data-stt-shell=master] .stt-master-header .top-right>#authControls { display: inline-flex !important; }
html[data-stt-shell=master] .stt-shell-profile { position: relative; display: block; flex: none; margin-left: 0; min-width: 0; }
html[data-stt-shell=master] .stt-shell-profile>summary { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 40px; padding: 5px 11px; color: var(--stt-heading); background: var(--stt-panel); border: 1px solid var(--stt-border); border-radius: 7px; cursor: pointer; list-style: none; font-size: 11px; }
html[data-stt-shell=master] .stt-shell-profile>summary::-webkit-details-marker { display: none; }
html[data-stt-shell=master] .stt-shell-profile>summary small { font-size: 9px; color: var(--stt-muted); }
html[data-stt-shell=master] .stt-shell-profile-menu { position: absolute; z-index: 90; right: 0; top: calc(100% + 9px); min-width: 190px; padding: 9px; background: var(--stt-panel-raised); border: 1px solid var(--stt-border-strong); border-radius: 9px; box-shadow: 0 15px 40px #0007; }
html[data-stt-shell=master] .stt-shell-profile-menu button { width: 100%; min-height: 38px; text-align: left; padding: 9px; border: 0; border-radius: 6px; }
html[data-stt-shell=master] .stt-shell-context-status { max-width: 220px; color: var(--stt-muted); font-size: 10px; line-height: 1.6; }
html[data-stt-shell=master] .top-right button { min-height: 35px; font-size: 10px; padding: 7px 10px; border-radius: 7px; }
html[data-stt-shell=master] .top-right select { width: auto; max-width: 180px; min-height: 35px; font-size: 10px; padding: 7px 9px; }
html[data-stt-shell=master] #app.content { width: auto; max-width: none; min-width: 0; min-height: 0; padding: 18px 22px; margin: 0 auto; container-type: inline-size; }

/* Templates provide layout, not cloned controls or replacement business data. */
html[data-stt-shell] .stt-template { display: grid; min-width: 0; gap: 16px; align-items: start; color: var(--stt-text); }
html[data-stt-shell] :is(.stt-template-filters,.stt-template-stage,.stt-template-inspector,.stt-template-toolbar,.stt-template-body) { min-width: 0; max-width: 100%; }
html[data-stt-shell] .stt-template-toolbar { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 0 2px; }
html[data-stt-shell] .stt-template-toolbar h1 { margin: 0; font-size: 24px; }
html[data-stt-shell] :is(.stt-template-filters,.stt-template-stage,.stt-template-inspector) { background: var(--stt-panel); border: 1px solid var(--stt-border); border-radius: 11px; }
html[data-stt-shell] .stt-template-filters { padding: 17px; }
html[data-stt-shell] .stt-template-filters :is(input,select) { width: 100%; max-width: 100%; }
html[data-stt-shell] .stt-template-stage { overflow: hidden; min-height: 440px; background: var(--stt-canvas); }
html[data-stt-shell] .stt-template-stage>iframe { display: block; border: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; background: var(--stt-panel); }
html[data-stt-shell] .stt-template-body { overflow: auto; scrollbar-width: thin; }
html[data-stt-shell] .stt-template-inspector { padding: 20px; overflow: auto; scrollbar-width: thin; }
html[data-stt-shell] .stt-template[data-template=workspace] { grid-template-columns: minmax(0,1fr); }
html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body { display: grid; grid-template-columns: 240px minmax(0,1fr) 310px; gap: 16px; overflow: visible; align-items: start; }
html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-filters { grid-column: 1; }
html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-stage { grid-column: 2; min-height: 620px; height: calc(100dvh - 190px); }
html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-inspector { grid-column: 3; min-height: 300px; max-height: calc(100dvh - 190px); }
html[data-stt-shell] .stt-template[data-template=ledger] { grid-template-columns: minmax(0,1fr); }
html[data-stt-shell] .stt-template[data-template=ledger]>.stt-template-body { display: grid; gap: 16px; overflow: visible; }
html[data-stt-shell] .stt-template[data-template=ledger]>.stt-template-body>.stt-template-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
html[data-stt-shell] .stt-template[data-template=ledger]>.stt-template-body>.stt-template-filters>label { min-width: 140px; flex: 1; }
html[data-stt-shell] .stt-template[data-template=ledger]>.stt-template-body>.stt-template-stage { min-height: 560px; }
html[data-stt-shell] .stt-template[data-template=dashboard] { grid-template-columns: repeat(12,minmax(0,1fr)); }
html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body { grid-column: 1/-1; display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; overflow: visible; }
html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>:is(.stt-template-filters,.stt-template-stage) { grid-column: 1/-1; }
html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>.stt-template-filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>.stt-template-inspector { grid-column: span 4; }
html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>.stt-template-stage { min-height: 520px; }
html[data-stt-shell] .stt-template-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 14px; }
html[data-stt-shell] .stt-template-charts { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 16px; }
html[data-stt-shell] .stt-template-metrics>:is(.exec-kpis,.kpis,.stats),
html[data-stt-shell] .stt-template-charts>:is(.exec-layout,.split) { grid-column: 1/-1; min-width: 0; }
html[data-stt-shell] .stt-template-charts>.exec-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
html[data-stt-shell] .stt-template-ledger-tools { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--stt-border); }
html[data-stt-shell] .stt-template-ledger-tools input { width: min(370px,100%); }
html[data-stt-shell] .stt-template-ledger { max-width: 100%; overflow: auto; scrollbar-width: thin; }
html[data-stt-shell] .stt-ledger-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
html[data-stt-shell] :is(.stt-ledger-table,.stt-template-body table) { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
html[data-stt-shell] :is(.stt-ledger-table,.stt-template-body table) th { position: sticky; top: 0; z-index: 2; font-size: 10px; font-weight: 650; padding: 13px 15px; white-space: nowrap; }
html[data-stt-shell] :is(.stt-ledger-table,.stt-template-body table) td { padding: 14px 15px; border-bottom: 1px solid var(--stt-border); overflow-wrap: anywhere; }
html[data-stt-shell] .stt-ledger-table button { max-width: 100%; text-align: left; white-space: normal; }

/* An explicitly embedded module keeps its local filters, tabs and detail asides. */
html[data-stt-shell=embedded] body { min-width: 0; }
html[data-stt-shell=embedded] body main { min-width: 0; }
html[data-stt-shell=embedded] .app-sidebar,
html[data-stt-shell=embedded] [data-stt-duplicate-nav],
html[data-stt-shell=embedded] [data-stt-duplicate-navigation=true] { display: none !important; }
html[data-stt-shell=embedded] body>header { background: transparent !important; border-color: var(--stt-border); }
html[data-stt-shell=embedded] :is(.detail-stack,.exec-attention) { background: var(--stt-panel) !important; border-color: var(--stt-border) !important; }
html[data-stt-shell=embedded] nav:not(.app-sidebar) { max-width: 100%; }

/* Theme only map chrome; recorded map symbols and imagery retain their meaning. */
@media screen {
  html[data-stt-shell] .leaflet-container { background: var(--stt-canvas) !important; }
  html[data-stt-shell] :is(.leaflet-control-layers,.leaflet-bar a,.leaflet-control-attribution,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-tooltip) {
    background: var(--stt-panel) !important;
    color: var(--stt-text) !important;
    border-color: var(--stt-border) !important;
    box-shadow: 0 2px 10px #0006;
  }
  html[data-stt-shell] :is(.leaflet-popup-content,.leaflet-popup-content p,.leaflet-popup-content strong,.leaflet-tooltip *) { color: var(--stt-text) !important; }
  html[data-stt-shell] :is(.leaflet-control-attribution,.leaflet-control-attribution span) { color: var(--stt-muted) !important; }
  html[data-stt-shell] :is(.leaflet-bar a:hover,.leaflet-control-layers-toggle:hover) { background: var(--stt-border) !important; color: var(--stt-accent) !important; }
  html[data-stt-shell] :is(.leaflet-control-attribution a,.leaflet-popup-close-button) { color: var(--stt-accent) !important; }
  html[data-stt-shell] .stt-template[data-template=workspace] .title-link,
  html[data-stt-shell] #ticketRows .link { color: var(--stt-cyan) !important; }
}

/* Native module dialogs retain their original dimensions and positioning. */
html[data-stt-shell] :is(.stt-inspector-heading,.stt-inspector-actions) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
html[data-stt-shell] .stt-inspector-actions { flex-wrap: wrap; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--stt-border); }

/* A report/invoice is paper, not an application card. Preserve its export appearance. */
html[data-stt-shell] :is(.preview,[data-stt-document-paper]) { background: #fff !important; color: #172033 !important; }
html[data-stt-shell] :is(.preview,[data-stt-document-paper]) :is(h1,h2,h3,h4,p,small,span,div,strong,label,td,th) { color: inherit !important; }
html[data-stt-shell] :is(.preview,[data-stt-document-paper]) :is(thead,th) { background: #eef2f6 !important; color: #223148 !important; }
html[data-stt-shell] :is(.preview,[data-stt-document-paper]) :is(td,th) { border-color: #d6dce4 !important; }
html[data-stt-shell] .preview .totals .total { background: #172033 !important; color: #fff !important; }

@media (max-width:1050px) {
  html[data-stt-shell=master] { --stt-sidebar-width: 220px; }
  html[data-stt-shell=master] :is(body>main>.topbar,.stt-master-header) { padding: 0 24px; gap: 12px; }
  html[data-stt-shell=master] #app.content { padding: 12px; }
  html[data-stt-shell=master] #stt-shell-project { width: 195px; }
  html[data-stt-shell=master] :is(#stt-shell-start,#stt-shell-end) { width: 132px; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body { grid-template-columns: 210px minmax(0,1fr) 280px; gap: 12px; }
}
@container (max-width:950px) {
  html[data-stt-shell] .stt-template-charts>.exec-layout { grid-template-columns: minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body { grid-template-columns: 200px minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-filters { grid-column: 1; grid-row: 1/3; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-stage { grid-column: 2; height: 620px; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-inspector { grid-column: 2; min-height: 250px; max-height: none; }
}
@media (max-width:900px) {
  html[data-stt-shell=master] body>aside { padding: 20px 11px 15px; }
  html[data-stt-shell=master] body>aside .brand { font-size: 20px; padding-left: 10px; }
  html[data-stt-shell=master] .stt-master-header label { font-size: 9px; }
  html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>.stt-template-inspector { grid-column: span 6; }
}
@container (max-width:570px) {
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body { grid-template-columns: minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>:is(.stt-template-filters,.stt-template-stage,.stt-template-inspector) { grid-column: 1; grid-row: auto; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-stage { height: 560px; min-height: 400px; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body>.stt-template-filters { max-height: 310px; overflow: auto; }
  html[data-stt-shell] .stt-template[data-template=dashboard]>.stt-template-body>.stt-template-inspector { grid-column: 1/-1; }
}
@media (max-width:700px) {
  html[data-stt-shell=master] { --stt-sidebar-width: 0px; --stt-shell-header: 50px; }
  html[data-stt-shell=master] body>aside { position: static; inset: auto; width: 100%; height: auto; max-height: 40dvh; padding: 14px; border-right: 0 !important; border-bottom: 1px solid var(--stt-border); }
  html[data-stt-shell=master] body>aside .brand { font-size: 20px; padding: 0 9px 12px; }
  html[data-stt-shell=master] body>aside .brand small { display: none; }
  html[data-stt-shell=master] body>aside .section-label { display: none; }
  html[data-stt-shell=master] body>aside .aside-foot { display: none; }
  html[data-stt-shell=master] #nav { display: flex; gap: 7px; align-items: start; overflow-x: auto; }
  html[data-stt-shell=master] :is(.stt-hub,#nav details) { flex: 0 0 auto; min-width: 145px; margin-bottom: 0; }
  html[data-stt-shell=master] :is(.stt-hub>summary,#nav details>summary) { padding: 9px 10px; min-height: 40px; }
  html[data-stt-shell=master] :is(body>main>.topbar,.stt-master-header) { padding: 0 18px; gap: 8px; min-height: 50px; height: auto; flex-wrap: wrap; }
  html[data-stt-shell=master] .crumb { display: none; }
  html[data-stt-shell=master] .stt-master-header .top-right { gap: 6px; margin-left: 0; }
  html[data-stt-shell=master] :is(.stt-master-context,.stt-shell-context,.stt-context-controls) { width: 100%; gap: 9px; }
  html[data-stt-shell=master] #stt-shell-project { width: 100%; }
  html[data-stt-shell=master] .stt-master-header label:has(#stt-shell-project) { flex-basis: 100%; }
  html[data-stt-shell=master] :is(#stt-shell-start,#stt-shell-end) { width: min(154px,40vw); }
  html[data-stt-shell=master] #app.content { padding: 8px; }
  html[data-stt-shell] :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
  html[data-stt-shell] .stt-template-toolbar h1 { font-size: 21px; }
}
@media (prefers-reduced-motion:no-preference) {
  html[data-stt-shell] :is(button,.stt-route-link,summary) { transition: background-color .14s,border-color .14s,color .14s; }
}
/* Optional template slots do not reserve an empty navigation/inspector column. */
@media screen {
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden]) { grid-template-columns: minmax(0,1fr) 310px; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden])>.stt-template-stage { grid-column: 1; grid-row: auto; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden])>.stt-template-inspector { grid-column: 2; grid-row: auto; }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-inspector[hidden]) { grid-template-columns: 240px minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden]):has(>.stt-template-inspector[hidden]) { grid-template-columns: minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden]):has(>.stt-template-inspector[hidden])>.stt-template-stage { grid-column: 1; grid-row: auto; }
}
@container (max-width:570px) {
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden]),
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-inspector[hidden]) { grid-template-columns: minmax(0,1fr); }
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-filters[hidden])>.stt-template-inspector,
  html[data-stt-shell] .stt-template[data-template=workspace]>.stt-template-body:has(>.stt-template-inspector[hidden])>.stt-template-stage { grid-column: 1; grid-row: auto; }
}
@media print {
  html[data-stt-shell] { color-scheme: light; background: #fff !important; color: #111 !important; }
  html[data-stt-shell] body,
  html[data-stt-shell] body main,
  html[data-stt-shell] body :is(.content,.stt-template,.stt-template-stage,.stt-template-body,.panel,.card,.kpi,.tile,.period,.box,.stat,.hero,.preview,.crewcard,.task-card,.lane,.summary>div,.exec-panel,.exec-kpi,.exec-period,.exec-attention,.exec-insight,.exec-crew,.exec-fleet,.exec-notice,.exec-donut>div,.wb-panel,.wb-cards>article,.panel-head,table,section,dialog) { background: #fff !important; color: #111 !important; box-shadow: none !important; }
  html[data-stt-shell] body :is(.exec-kpi,.exec-period,.exec-panel,.exec-attention) :is(span,strong,small,b,h2,h3,p) { color: #111 !important; }
  html[data-stt-shell] :is(h1,h2,h3,h4,p,small,label,dt,dd,td,th,a,strong,span) { color: #111 !important; }
  html[data-stt-shell] :is(thead,th) { background: #eee !important; border-color: #bbb !important; }
  html[data-stt-shell] td { border-color: #ccc !important; }
  html[data-stt-shell] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
  html[data-stt-shell] select,
  html[data-stt-shell] textarea { background: #fff !important; color: #111 !important; border-color: #bbb !important; }
  html[data-stt-shell=master] body>aside,
  html[data-stt-shell=master] body>main>.topbar,
  html[data-stt-shell] :is(.stt-master-header,.stt-template-toolbar,.stt-template-filters,.stt-inspector-actions,.invoice-export-actions,[data-stt-print-hide]) { display: none !important; }
  html[data-stt-shell=master] body>main { margin: 0 !important; }
  html[data-stt-shell=master] #app.content { padding: 0 !important; min-height: 0; }
  html[data-stt-shell] .stt-template { display: block; }
  html[data-stt-shell] .stt-template>.stt-template-body { display: block !important; }
  html[data-stt-shell] :is(.stt-template-stage,.stt-template-inspector,.stt-template-body) { height: auto !important; max-height: none !important; min-height: 0 !important; overflow: visible !important; border-color: #ccc !important; }
  html[data-stt-shell] .preview .totals .total { background: #eee !important; color: #111 !important; }
}

/* Standalone Dev audit entry below all operational hubs. */
html[data-stt-shell=master] #nav button.stt-hub-link { display:flex!important; align-items:center; gap:14px; width:100%; min-height:46px; padding:13px 14px; margin:4px 0 9px; border:0; border-radius:9px; text-align:left; font:650 12px system-ui,sans-serif; }
html[data-stt-shell=master] #nav button.stt-hub-link[aria-current=page] { background:var(--stt-accent)!important; color:#000!important; }

/* Use the available tablet width for content; navigation opens on demand. */
html[data-stt-shell=master] :where(#stt-sidebar-toggle,.stt-sidebar-close,.stt-sidebar-backdrop){display:none}
@media screen and (max-width:1100px){
 html[data-stt-shell=master]{--stt-sidebar-width:0px}
 html[data-stt-shell=master] body>main{margin-left:0!important;width:100%;min-width:0}
 html[data-stt-shell=master] body>aside{position:fixed;inset:0 auto 0 0;width:min(290px,86vw);height:100vh;height:100dvh;max-height:none;z-index:100;padding:16px 14px max(18px,env(safe-area-inset-bottom));border-right:1px solid var(--stt-border)!important;border-bottom:0!important;transform:translateX(-100%);visibility:hidden;overscroll-behavior:contain}
 html[data-stt-shell=master][data-stt-navigation-open=true] body>aside{transform:none;visibility:visible}
 html[data-stt-shell=master][data-stt-navigation-open=true] body{overflow:hidden}
 html[data-stt-shell=master] #nav{display:block;overflow-x:visible}
 html[data-stt-shell=master] :is(.stt-hub,#nav details){min-width:0;margin:4px 0 9px}
 html[data-stt-shell=master] #stt-sidebar-toggle{display:block;flex:none;min-height:44px;padding:9px 12px;border:1px solid var(--stt-border);border-radius:7px;background:var(--stt-panel);color:var(--stt-accent);font:650 12px system-ui,sans-serif}
 html[data-stt-shell=master] .stt-sidebar-close{display:block;align-self:flex-end;min-height:44px;padding:9px 12px;border:1px solid var(--stt-border);border-radius:7px;margin-bottom:10px}
 html[data-stt-shell=master] .stt-sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:90;border:0;border-radius:0;background:#0009}
 html[data-stt-shell=master] :is(body>main>.topbar,.stt-master-header){height:auto;min-height:64px;padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));gap:10px;flex-wrap:wrap}
 html[data-stt-shell=master] .crumb{display:block!important;flex:1 1 150px;min-width:0;overflow-wrap:anywhere}
 html[data-stt-shell=master] .stt-master-header .top-right{flex:1 1 auto;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%;margin-left:0}
 html[data-stt-shell=master] .stt-master-header .top-right>#authControls{flex-wrap:wrap;gap:8px;max-width:100%}
 html[data-stt-shell=master] .top-right :is(button,select){min-height:44px;white-space:normal;max-width:100%}
 html[data-stt-shell=master] .stt-shell-profile{margin-left:auto;max-width:100%}
 html[data-stt-shell=master] #app.content{padding:12px;min-width:0;width:100%}
 html[data-stt-shell=embedded] :is(main,.wrap,.content,.workspace,.grid,.grid3,.toolbar,.row,.actions,.panel,.card){min-width:0}
 html[data-stt-shell=embedded] :is(.grid,.grid3,.workspace)>*{min-width:0}
 html[data-stt-shell=embedded] :is(input,select,textarea){max-width:100%}
 html[data-stt-shell=embedded] :is(header,.actions){flex-wrap:wrap}
 html[data-stt-shell=embedded] .preview .totals{max-width:100%}
}
