/* Theme tokens are scoped to the inventory shell or its miniature preview. */
:root[data-iv-theme], [data-preview-theme] {
  --iv-nav:#102a3b; --iv-nav-active:#214557; --iv-nav-stripe:#60d6be;
  --iv-hero:#123d50; --iv-hero-end:#176568; --iv-surface:#ffffff; --iv-subtle:#edf3f6;
  --iv-field:#ffffff; --iv-soft-line:#c8d9df; --iv-button-default:#1763a7;
  --iv-preview-bg:#f1f5f7; --iv-preview-text:#162d3d;
}
:root[data-iv-theme=fiori], [data-preview-theme=fiori] {
  --iv-nav:#273c52; --iv-nav-active:#375874; --iv-nav-stripe:#7ed1ff;
  --iv-hero:#123760; --iv-hero-end:#175fa7; --iv-surface:#ffffff; --iv-subtle:#eff5fc; --iv-field:#ffffff;
  --iv-soft-line:#c3d6eb; --iv-button-default:#075db4;
  --ink:#152d46; --muted:#476078; --line:#cbd9e8; --bg:#edf3fa; --sea:#176ab5;
  --iv-preview-bg:#edf3fa; --iv-preview-text:#152d46;
}
:root[data-iv-theme=teal], [data-preview-theme=teal] {
  --iv-nav:#093934; --iv-nav-active:#15534b; --iv-nav-stripe:#91dec5;
  --iv-hero:#123d36; --iv-hero-end:#09635c; --iv-surface:#fafefc; --iv-subtle:#e9f4ef; --iv-field:#ffffff;
  --iv-soft-line:#b8d6c9; --iv-button-default:#006954;
  --ink:#183b36; --muted:#46655e; --line:#c5d9cf; --bg:#e8f2ef; --sea:#007c65;
  --iv-preview-bg:#e8f2ef; --iv-preview-text:#183b36;
}
:root[data-iv-theme=plum], [data-preview-theme=plum] {
  --iv-nav:#35283e; --iv-nav-active:#57405d; --iv-nav-stripe:#e8add7;
  --iv-hero:#432d4c; --iv-hero-end:#73496e; --iv-surface:#fffcff; --iv-subtle:#f5eef6; --iv-field:#ffffff;
  --iv-soft-line:#d8c8da; --iv-button-default:#794577;
  --ink:#392a40; --muted:#66536e; --line:#dfd1e1; --bg:#f4eef6; --sea:#875e88;
  --iv-preview-bg:#f4eef6; --iv-preview-text:#392a40;
}
:root[data-iv-theme=graphite], [data-preview-theme=graphite] {
  --iv-nav:#111822; --iv-nav-active:#2a4354; --iv-nav-stripe:#81c9f7;
  --iv-hero:#1b2e40; --iv-hero-end:#294853; --iv-surface:#202c38; --iv-subtle:#283847; --iv-field:#17232f;
  --iv-soft-line:#536575; --iv-button-default:#81c9f7;
  --ink:#eff6fc; --muted:#bdccd9; --line:#435362; --bg:#151d27; --sea:#75d1bd; --ok:#64d899;
  --iv-preview-bg:#151d27; --iv-preview-text:#eff6fc;
}
:root[data-iv-theme] .shell aside {background:var(--iv-nav)}
:root[data-iv-theme] .nav:is(.sel,:hover) {background:var(--iv-nav-active)}
:root[data-iv-theme] .nav.sel {box-shadow:inset 3px 0 var(--iv-nav-stripe)}
:root[data-iv-theme] .hero {background:linear-gradient(110deg,var(--iv-hero),var(--iv-hero-end))}
:root[data-iv-theme] :is(.panel,.top,.metric,.tile-action,dialog) {background:var(--iv-surface);color:var(--ink)}
:root[data-iv-theme] :is(.btn,.iconbtn) {color:var(--ink);background:var(--iv-surface);border-color:var(--iv-soft-line)}
:root[data-iv-theme] :is(.btn,.iconbtn):hover {background:var(--iv-subtle)}
:root[data-iv-theme] .primary {background:var(--iv-accent,var(--iv-button-default));color:var(--iv-button-ink,white)}
:root[data-iv-theme] :is(.rowbtn,.sample,.tile-action svg) {color:var(--iv-link,var(--iv-button-default))}
:root[data-iv-theme] .gridtable th {background:var(--iv-subtle);color:var(--muted)}
:root[data-iv-theme] :is(.fields,.tools,.uploadbox,dialog) :is(input:not([type=checkbox],[type=radio],[type=file]),select,textarea) {background:var(--iv-field);color:var(--ink);border-color:var(--iv-soft-line)}
:root[data-iv-theme] input[type=checkbox] {accent-color:var(--iv-accent)}
:root[data-iv-theme] :focus-visible {outline:3px solid var(--iv-link);outline-offset:2px}
:root[data-iv-theme] .shell aside :focus-visible {outline-color:var(--iv-nav-stripe)}
:root[data-iv-theme] .joblist {grid-template-columns:repeat(auto-fill,minmax(min(100%,max(200px,var(--tile))),1fr))}
:root[data-iv-tile=compact] :is(.tile-action,.job) {min-height:82px;display:grid;align-content:center;align-items:center;gap:3px 10px;padding:11px 13px;border-radius:6px}
:root[data-iv-tile=compact] .tile-action {grid-template-columns:24px minmax(0,1fr)}
:root[data-iv-tile=compact] .tile-action svg {grid-row:span 2}
:root[data-iv-tile=compact] .metric {padding:10px 13px;border-radius:6px}
:root[data-iv-tile=large] :is(.tile-action,.job) {min-height:148px;justify-content:center;gap:9px;padding:21px;border-radius:16px}
:root[data-iv-tile=large] .tile-action svg {width:33px;height:33px}
:root[data-iv-tile=large] .tile-action strong,:root[data-iv-tile=large] .job strong {font-size:1.16rem}
:root[data-iv-tile=large] .metric {min-height:98px;padding:20px;border-radius:16px}
:root[data-iv-tile=band] :is(.tile-action,.metric,.job) {border-radius:6px;border-inline-start:5px solid var(--iv-link);padding-inline-start:17px}
:root[data-iv-tile=band] .job.neu {border-inline-start-color:#667785}
:root[data-iv-tile=band] .job.busy {border-inline-start-color:#98751f}
:root[data-iv-tile=band] .job.ok {border-inline-start-color:#28825d}
:root[data-iv-theme=graphite] {color-scheme:dark}
:root[data-iv-theme=graphite] :is(.mutedbox,.hint,.audit div,.uploadbox) {background:var(--iv-subtle);color:var(--ink);border-color:var(--iv-soft-line)}
:root[data-iv-theme=graphite] .job.neu {background:#33414b;color:#f0f5fa;border-color:#617482}
:root[data-iv-theme=graphite] .job.busy {background:#504022;color:#fff2c2;border-color:#a5863d}
:root[data-iv-theme=graphite] .job.ok,:root[data-iv-theme=graphite] .success {background:#1d4031;color:#b8f3d0;border-color:#4e9672}
:root[data-iv-theme=graphite] .failure {background:#48272c;color:#ffc6cc;border-color:#b77b81}
:root[data-iv-theme=graphite] .bad {color:#ffafb3}
:root[data-iv-theme=graphite] .wf {background:#253a4e;color:#e0ecf9;border-color:#657e98}
:root[data-iv-theme=graphite] .wf.sap {background:#382f48;color:#f0e6ff;border-color:#7c6d91}
:root[data-iv-theme=graphite] .wf.hot {background:#164a46;color:#d7fff7;border-color:#7bd6c4}
:root[data-iv-theme=graphite] .wf.done {background:#244033;color:#e1fbea;border-color:#678575}
:root[data-iv-theme=graphite] .wf.viewing {outline-color:#90cfe7}
:root[data-iv-theme=graphite] .wf .tick {color:#8be7aa}
:root[data-iv-theme=graphite] .wf img {background:#ffffff;border-radius:3px;padding:1px 2px}
:root[data-iv-theme=graphite] .dot:not(.green,.yellow) {background:#10151a;box-shadow:0 0 0 1px #8a98a4}
:root[data-iv-theme=graphite] .dot.green {background:#50d794}
:root[data-iv-theme=graphite] .dot.yellow {background:#f5c448}
:root[data-iv-theme=graphite] :is(.job,.wf) small {color:inherit}
:root[data-iv-theme=graphite] .uploadbox input[type=file] {color:var(--ink)}
:root[data-iv-theme=graphite] ::placeholder {color:#a5b8c6}
.iv-appearance {min-width:0;grid-column:1/-1;margin-block:1rem}
.iv-appearance fieldset {padding:0;border:0;margin:0 0 1.2rem;min-width:0}
.iv-appearance legend {padding:0;margin-bottom:.5rem;font-weight:700;font-size:1rem}
.iv-choices {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,137px),1fr));gap:8px}
.iv-appearance label.iv-option {display:block;position:relative;min-width:0;cursor:pointer}
.iv-option input[type=radio] {position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}
.iv-option input:checked+.iv-card {border:2px solid var(--iv-link);padding:7px}
.iv-option input:focus-visible+.iv-card {outline:3px solid var(--iv-link);outline-offset:2px}
.iv-card {display:grid;grid-template-rows:auto auto;gap:6px;padding:8px;border:1px solid var(--iv-soft-line);border-radius:9px;background:var(--iv-surface)}
.iv-option-name {font-size:.92rem;display:flex;align-items:center;justify-content:space-between;min-height:22px;font-weight:650;color:var(--ink)}
.iv-option input:checked+.iv-card .iv-option-name::after {content:'✓';color:var(--iv-link);font-weight:800}
.iv-mini {display:grid;grid-template-columns:16% 1fr 1fr;grid-template-rows:1fr 1fr;background:var(--mini-bg);padding:4px;gap:4px;height:43px;border-radius:4px;border:1px solid color-mix(in srgb,var(--mini-nav) 30%,transparent)}
.iv-mini i {grid-row:span 2;background:var(--mini-nav);border-radius:2px}
.iv-mini b {grid-column:span 2;background:var(--mini-hero);border-radius:2px}
.iv-mini em {border:1px solid color-mix(in srgb,var(--mini-accent) 45%,transparent);border-radius:2px;background:var(--mini-panel)}
.iv-tile-mini {display:flex;align-items:center;gap:4px;height:35px;background:var(--iv-subtle);padding:5px;border-radius:4px}
.iv-tile-mini i {width:28%;height:20px;border:1px solid var(--iv-link);border-radius:4px;background:var(--iv-surface)}
.iv-mini-compact {flex-direction:column;align-items:flex-start;gap:2px}
.iv-mini-compact i {width:85%;height:6px;border-radius:2px}
.iv-mini-large i {height:26px;width:42%;border-radius:6px}
.iv-mini-large i:last-child {display:none}
.iv-mini-band i {border-radius:2px;border-inline-start:4px solid var(--iv-link)}
.iv-preview {display:grid;grid-template-columns:48px minmax(0,1fr);background:var(--iv-preview-bg);color:var(--iv-preview-text);border:1px solid var(--iv-soft-line);border-radius:9px;overflow:hidden}
.iv-preview-side {padding:14px 8px;background:var(--iv-nav);display:grid;align-content:start;gap:6px}
.iv-preview-side i {height:5px;width:80%;background:var(--iv-nav-stripe);opacity:.75;border-radius:2px}
.iv-preview-page {padding:12px;min-width:0}
.iv-preview-page>b {display:block;padding:7px 11px;background:linear-gradient(110deg,var(--iv-hero),var(--iv-hero-end));color:#fff;font-size:.87rem;border-radius:5px}
.iv-preview-jobs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:6px}
.iv-preview-jobs span {display:flex;align-items:center;min-height:43px;padding:6px;border-radius:5px;background:var(--iv-surface);border:1px solid var(--iv-soft-line);font-size:.85rem;font-weight:600;overflow-wrap:anywhere}
.iv-preview[data-preview-style=compact] .iv-preview-jobs span {min-height:28px;padding:4px;border-radius:3px}
.iv-preview[data-preview-style=large] .iv-preview-jobs span {min-height:59px;font-size:.94rem;border-radius:9px}
.iv-preview[data-preview-style=band] .iv-preview-jobs span {border-inline-start:4px solid var(--iv-button-default);border-radius:3px}
@media(max-width:520px) {
  .iv-preview {grid-template-columns:22px minmax(0,1fr)}
  .iv-preview-side {padding-inline:4px}
  .iv-preview-page {padding:7px}
  .iv-preview-jobs span {font-size:.76rem}
}
@media print {
  :root[data-iv-theme] {color-scheme:light;--bg:white;--ink:#111;--muted:#333;--iv-surface:white;--iv-subtle:#f2f2f2;--line:#aaa}
}
:root[data-iv-theme] .metric,:root[data-iv-theme] .tile-action,.stats .metric,.sections .tile-action{
 background-image:linear-gradient(98deg,rgba(12,34,50,.97),rgba(19,49,68,.82) 57%,rgba(22,48,64,.48)),url('/live/lagerhalle.webp')!important;
 background-size:cover!important;background-position:center 55%!important;color:white!important;border-color:#375566!important;
}
.stats .metric:nth-child(even),.sections .tile-action:nth-child(even){background-position:center 80%!important}
.stats .metric :is(strong,span),.sections .tile-action :is(strong,small){color:#fff!important}
.stats .board-icon,.sections .tile-action>svg{color:#c3e6ef!important;background:transparent!important}
.stats .board-icon svg,.sections .tile-action>svg{width:36px;height:36px}
.sections .tile-action{grid-template-columns:42px 1fr}
.packet-name,.sap-assignment{display:block;font-size:.78em;overflow-wrap:anywhere}
.packet-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.packet-actions form{display:flex;flex-wrap:wrap;gap:.4rem}.packet-actions input{max-width:13em}
.packet-check{color:#15744e}.inv-clock{font-variant-numeric:tabular-nums;white-space:nowrap}
.support-pane:not([hidden]){position:fixed;right:1rem;bottom:1rem;z-index:80;display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;padding:.85rem 1rem;background:#143043;color:white;max-width:min(740px,96vw);border-radius:10px;box-shadow:0 8px 32px #0c213944}.support-pane video{width:100%;max-height:65vh;background:#10232e}
:root[data-iv-tile=compact] .sections .tile-action{grid-template-columns:42px minmax(0,1fr)}
.env-badge{display:inline-block;align-self:center;padding:.28rem .55rem;border-radius:.4rem;font-size:.75rem;letter-spacing:.04em}.env-badge.test{background:#ffdf95;color:#493414}.env-badge.prod{background:#174843;color:white}
@media screen {
 :root[data-iv-theme]{zoom:var(--iv-scale,1)}
 .shell{min-height:calc(100dvh / var(--iv-scale,1))}
 .shell aside{height:calc(100dvh / var(--iv-scale,1))}
 dialog{max-inline-size:calc(98vw / var(--iv-scale,1));max-block-size:calc(96dvh / var(--iv-scale,1))}
}
:root[data-hero-color][data-iv-view=home] .hero {background:var(--iv-heading-color);color:var(--iv-heading-ink)}
:root[data-hero-color][data-iv-view=home] .hero :is(.minor,small,.eyebrow){color:inherit}
:root[data-hero-color][data-iv-view=home] .hero-right{border-color:currentColor}
.shell .nav span{white-space:nowrap}
.shell .weiss img{display:block;width:118px;height:auto;padding:6px 8px;background:white;border-radius:5px;margin-bottom:6px}
@media screen and (min-width:801px){
 .shell:not(.fold){grid-template-columns:max(265px,15.5em) minmax(0,1fr)}
 .shell:not(.fold) aside{padding-inline:14px}
 .shell:not(.fold) aside :is(.nav span,.brand div,.navgroup>small,.weiss){display:block}
 .shell:not(.fold) aside :is(.nav,.brand){justify-content:flex-start}
 .shell.fold{grid-template-columns:0 minmax(0,1fr)}
 .shell.fold aside{width:0;padding:0;visibility:hidden;overflow:hidden}
}
@media screen and (max-width:800px){
 .shell.open aside{width:min(290px,84%);padding-inline:14px;top:58px;height:calc(100dvh / var(--iv-scale,1) - 58px)}
 .shell.open aside :is(.nav span,.brand div,.weiss){display:block}
 .shell.open aside .nav{justify-content:flex-start}
}
.admin-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(146px,100%),1fr));gap:8px;margin:14px 0 18px}
.admin-tiles button{background:var(--iv-surface);color:var(--ink);border:1px solid var(--iv-soft-line);border-radius:9px;min-height:74px;padding:10px 13px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;text-align:start;font-weight:650;line-height:1.2}
.admin-tiles button svg{color:var(--iv-link)}
.admin-tiles button[aria-current=page]{border-color:var(--iv-link);box-shadow:inset 0 -3px var(--iv-link);background:var(--iv-subtle)}
.reference-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:16px;margin-block:12px}
.reference-grid>section{padding:16px;border:1px solid var(--iv-soft-line);border-radius:10px;display:flex;flex-direction:column;gap:10px}
.reference-grid form{display:grid;justify-items:start;gap:10px}
.reference-grid input[type=file]{display:block;max-width:100%}
:root[data-iv-align=center] :is(.admin-tiles button,.sections .tile-action,.joblist .job,.wf){text-align:center;align-items:center}
:root[data-iv-align=center] .sections .tile-action{display:flex;flex-direction:column;justify-content:center}
:root[data-iv-align=center] .stats .metric{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:5px}
:root[data-iv-align=center] .stats .metric .board-icon{position:static;order:-1}
.tree-edge{display:none}
@media screen and (min-width:801px){
 .shell.fold .tree-edge{display:block;position:fixed;z-index:4;top:15vh;left:0;width:7px;height:70vh;border:0;background:transparent;padding:0}
 .shell.fold:has(.tree-edge:hover) aside,.shell.fold:has(.tree-edge:focus-visible) aside,.shell.fold aside:is(:hover,:focus-within){position:fixed;left:0;top:0;visibility:visible;width:max(265px,15.5em);padding:24px 14px;box-shadow:4px 0 22px #162e4933}
 .shell.fold:has(.tree-edge:hover) aside :is(.brand div,.nav span,.weiss,.navgroup small),.shell.fold aside:is(:hover,:focus-within) :is(.brand div,.nav span,.weiss,.navgroup small){display:block}
 .shell.fold aside .nav{justify-content:flex-start}
 .shell.fold:not(:has(aside:hover)) .tree-edge:focus-visible{width:10px;background:var(--iv-link)}
}
@media screen and (min-width:801px){.shell.fold .main{grid-column:2}}
.hero .iv-weiss-mark{display:block;width:86px;height:26px;object-fit:contain;padding:3px 6px;background:#fff;border-radius:3px}
