/* Version 2.9.6: shared geometry; themes change colors, never dimensions. */
@media screen {
html[data-theme="light"] {
  color-scheme:light; --paper:#e2e4e6; --surface:#eceeef; --surface-raised:#dfe2e5;
  --ink:#25282b; --muted:#555b62; --line:#c4c8cd; --navy:#dfe2e5;
  --blue:#884411; --cyan:#884411; --accent-soft:#e9dccc;
  --section-fill:linear-gradient(180deg,#e9d9c8 0%,#e5e5e4 75%);
  --section-line:#bb773f; --section-glow:#ad61151a;
  --row-fill:linear-gradient(145deg,#eceeef,#dfe2e5); --row-shadow:0 4px 9px #25282b20,inset 0 1px #f5f6f7;
}
html[data-theme="dark"] {
  --section-fill:linear-gradient(180deg,#392b21 0%,#252627 78%);
  --section-line:#a96a34; --section-glow:#e58d321c;
  --row-fill:linear-gradient(145deg,#292c2e,#202224); --row-shadow:0 4px 9px #0004,inset 0 1px #ffffff0b;
}
html[data-theme] body { color:var(--ink); }
html[data-theme="light"] body,html[data-theme="light"] .app-content { background:var(--paper); }
html[data-theme] :is(h1,h2,h3,h4) { letter-spacing:-.02em; }
html[data-theme] :is(.panel,.form-card,.scanner-card,.kpis article,.flow-panel,.flow-metrics article,.flow-job,.flow-warning-panel,.inventory-panel,.inventory-metrics article,.data-panel,.diagnostic-card,.help-topic,.integration-card,.storage-group,.login-card,.recipe-card,.report-card,.print-card,.scanner-field,.scanner-step,.scanner-help,.scanner-history) { border-radius:14px; }
html[data-theme] :is(input,select,textarea) { border-radius:9px; }
html[data-theme] :is(dialog,.pallet-dialog) { border-radius:16px; }
html[data-theme="light"] :is(.panel,.form-card,.scanner-card,.kpis article,.flow-panel,.flow-metrics article,.flow-warning-panel,.inventory-panel,.inventory-metrics article,.data-panel,.diagnostic-card,.help-topic,.integration-card,.storage-group,.login-card,.recipe-card,.report-card,.print-card,.scanner-field,.scanner-step,.scanner-help,.scanner-history,.account-popover,.flow-search-results) { background:var(--surface); color:var(--ink); border-color:var(--line); box-shadow:0 7px 22px #25282b12; }
html[data-theme="light"] :is(input,select,textarea,option) { background:#e6e8ea; color:var(--ink); border-color:var(--line); }
html[data-theme="light"] :is(input,textarea)::placeholder { color:var(--muted); }
html[data-theme="light"] :is(dialog,.pallet-dialog) { background:var(--surface); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] :is(th,.data-table thead th,.inventory-table thead th,.article-tabs,.data-tabs,.storage-toolbar,.storage-group summary,.scanner-card-head,.pallet-dialog header,.calendar-view-switch,.calendar-day,.touch-keyboard,.touch-key,.touch-keyboard-head button,.inventory-group,.license-card) { background:var(--surface-raised); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] :is(td,.data-table td,.inventory-table td) { border-color:var(--line); }
html[data-theme="light"] :is(.secondary,.inventory-action,.data-link,.theme-toggle,.audit-control) { background:var(--surface-raised); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] :is(.primary,.flow-primary,.calendar-view-switch a.active) { background:#a65316; color:#f5f6f7; border:1px solid #a65316; }
html[data-theme] :is(.primary,button.primary,.flow-primary) { border-width:1px; border-style:solid; }
html[data-theme="light"] :is(.topbar,.app-header,.app-header .nav-section-items) { background:var(--surface-raised); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] .app-header :is(.qb-brand,.nav-group-toggle,.nav-section-items a,.header-logout) { color:var(--ink); }
html[data-theme="light"] :is(.account-avatar,.flow-search,.flow-search input,.flow-search kbd,.account-popover .theme-toggle) { background:var(--surface-raised); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] .flow-search input { background:transparent; }
html[data-theme="light"] .app-header .nav-section-items a:hover { background:var(--accent-soft); }
html[data-theme] :is(.flow-panel-head,.data-panel-head,.report-list>header,.report-trend>header,.integrity-results>header,.scanner-card-head) {
  padding:14px 18px; border:1px solid var(--section-line); border-radius:12px;
  background:var(--section-fill); color:var(--ink);
  box-shadow:inset 0 0 17px var(--section-glow),0 0 8px var(--section-glow);
  box-sizing:border-box; gap:14px;
}
html[data-theme] :is(.flow-panel-head,.data-panel-head,.report-list>header,.report-trend>header) p { color:var(--muted); }
html[data-theme] :is(.flow-panel-head,.data-panel-head) > a { color:var(--blue); }
html[data-theme] .flow-panel-head { align-items:center; }
html[data-theme] .flow-panel-head h3 { font-size:14px; }
html[data-theme] .flow-panel-head p { font-size:10px; }
html[data-theme] :is(.flow-hero,.data-hero,.export-hero,.inventory-head,.integration-head,.diagnostic-summary,.storage-head) { border-radius:14px; border-width:1px; border-style:solid; }
html[data-theme="light"] :is(.flow-hero,.data-hero,.export-hero,.inventory-head,.integration-head,.diagnostic-summary,.storage-head) { background:var(--row-fill); border-color:var(--line); color:var(--ink); }
html[data-theme] .flow-job {
  margin:10px 0; padding:14px 16px; border:1px solid var(--line); border-radius:9px;
  background:var(--row-fill); box-shadow:var(--row-shadow); color:var(--ink);
}
html[data-theme] .flow-job:hover { border-color:var(--section-line); }
html[data-theme] .flow-job-id { min-width:0; }
html[data-theme] .flow-job-id>div { min-width:0; overflow-wrap:anywhere; }
html[data-theme] .flow-job-id .flow-job-clipboard { flex:0 0 32px; width:32px; height:36px; background:transparent; color:var(--blue); }
.flow-job-clipboard svg { width:26px; height:32px; }
html[data-theme] .flow-job-id strong { font-size:12px; color:var(--ink); }
html[data-theme] .flow-job-id small { font-size:10px; color:var(--muted); }
html[data-theme] .flow-job>div>small,html[data-theme] .flow-progress small { font-size:11px; color:var(--muted); }
html[data-theme] .flow-job>div>strong,html[data-theme] .flow-progress b { font-size:12px; color:var(--ink); }
html[data-theme] .flow-job-state { font-size:11px; }
html[data-theme] .flow-job-state.planned { background:var(--surface-raised); color:var(--ink); }
html[data-theme] .flow-panel thead th:first-child { border-radius:9px 0 0 9px; }
html[data-theme] .flow-panel thead th:last-child { border-radius:0 9px 9px 0; }
html[data-theme] .flow-panel table { border-collapse:separate; border-spacing:0; }
html[data-theme="light"] :is(.audit-window,.audit-event,.audit-window-status) { background:var(--surface); color:var(--ink); border-color:var(--line); }
html[data-theme="light"] .audit-window-head { background:var(--surface-raised); border-color:var(--line); }
html[data-theme="light"] :is(.audit-hash code,.audit-payload pre,.audit-location-flow) { background:var(--surface-raised); color:var(--ink); }
@media(max-width:720px) {
 html[data-theme] :is(.flow-panel-head,.data-panel-head,.report-list>header,.report-trend>header,.scanner-card-head) { flex-wrap:wrap; padding:12px; }
 html[data-theme] .flow-job { padding:12px; gap:10px; }
}
}
