/* Integrated SAP layout: included in the production payload, not a pilot dependency. */
.stock-creation-search { border-bottom:1px solid var(--line-soft); padding-bottom:12px; margin-bottom:16px; }
.stock-creation-results { display:grid; gap:8px; max-height:240px; overflow:auto; }
.stock-creation-result { display:grid; gap:6px; padding:10px; border:1px solid var(--line-soft); border-radius:8px; }
.stock-creation-result strong { overflow-wrap:anywhere; }
.inventory-drag-handle { touch-action:none; cursor:grab; width:36px; min-width:36px; min-height:36px; padding:4px; }
.inventory-drop-before { box-shadow:inset 0 3px 0 #1d79e8; }
.inventory-drop-after { box-shadow:inset 0 -3px 0 #1d79e8; }
/* Lokal SAP-Stock-Pilot: tablet-first, scoped to the opt-in demo. */
.sap-pilot-host { --sap-blue: #1d79e8; --sap-blue-soft: rgba(29,121,232,.14); --sap-yellow: #f0b43c; --sap-red: #ff4d62; }
.sap-pilot-banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 14px; padding:9px 12px; border:1px solid rgba(75,156,255,.42); border-left:3px solid var(--sap-blue); border-radius:8px; background:var(--sap-blue-soft); }
.sap-pilot-banner span { color:#bdcce0; font-size:13px; }
.sap-pilot-nav { display:flex; gap:7px; overflow-x:auto; margin:0 0 18px; padding:3px 0 8px; border-bottom:1px solid var(--line-soft); scrollbar-width:thin; }
.sap-pilot-nav button { flex:1 0 175px; min-height:48px; border-radius:7px; font-weight:700; }
.sap-pilot-nav button.active { background:var(--sap-blue-soft); border-color:var(--sap-blue); box-shadow:inset 0 -3px 0 var(--sap-blue); }
.sap-pilot-stage { display:grid; gap:16px; animation:sap-pilot-enter .28s ease-out; }
@keyframes sap-pilot-enter { from { opacity:.35; transform:translateY(8px); } to { opacity:1; transform:none; } }
.sap-pilot-stage.sap-pilot-swipe-forward { animation:sap-pilot-swipe-forward-in .5s cubic-bezier(.2,.75,.25,1); }
.sap-pilot-stage.sap-pilot-swipe-backward { animation:sap-pilot-swipe-backward-in .5s cubic-bezier(.2,.75,.25,1); }
@keyframes sap-pilot-swipe-forward-in { from { opacity:.25; transform:translateX(34px); } to { opacity:1; transform:none; } }
@keyframes sap-pilot-swipe-backward-in { from { opacity:.25; transform:translateX(-34px); } to { opacity:1; transform:none; } }
.sap-view-heading,.sap-delivery-top { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.sap-view-heading h3,.sap-delivery-top h3 { margin:2px 0 4px; font-size:21px; }
.sap-view-heading p,.sap-delivery-top p { margin:0; color:var(--muted); }
.sap-eyebrow { margin:0!important; color:#82baff!important; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.sap-status { display:inline-flex; align-items:center; width:max-content; max-width:100%; min-height:29px; padding:5px 9px; border:1px solid var(--line); border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.sap-status.info { color:#acd2ff; border-color:rgba(75,156,255,.5); background:rgba(29,121,232,.12); }
.sap-status.warning { color:#ffd98b; border-color:rgba(240,180,60,.55); background:rgba(240,180,60,.12); }
.sap-status.danger { color:#ffadb7; border-color:rgba(255,77,98,.58); background:rgba(255,77,98,.13); }
.sap-status.success { color:#bfe4a9; border-color:rgba(143,200,106,.5); background:rgba(143,200,106,.1); }
.sap-order-card { overflow:hidden; border:1px solid #3a414a; border-radius:10px; background:#171b20; box-shadow:0 10px 30px rgba(0,0,0,.15); }
.sap-order-card > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; width:auto; height:auto; min-height:0; padding:17px 18px; border-bottom:1px solid var(--line-soft); background:#1d2228; }
.sap-order-card h3 { margin:3px 0; }
.sap-order-card p { margin:0; color:var(--muted); }
.sap-order-reference { color:#8ec2ff; font-size:12px; font-weight:800; letter-spacing:.08em; }
.sap-order-lines { display:grid; }
.sap-article-line { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:54px; padding:9px 18px; border-bottom:1px solid var(--line-soft); }
.sap-article-line div { min-width:0; }
.sap-article-line strong,.sap-article-line span { display:block; }
.sap-article-line span { margin-top:2px; color:var(--muted); font-size:12px; }
.sap-order-card > footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 18px; }
.sap-order-card > footer span { color:var(--muted); }
.sap-archive { border:1px solid var(--line-soft); border-radius:8px; background:#15181b; }
.sap-archive summary { padding:14px 16px; cursor:pointer; font-weight:700; }
.sap-archive-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-top:1px solid var(--line-soft); }
.sap-archive-row strong,.sap-archive-row span { display:block; }
.sap-archive-row span { color:var(--muted); font-size:12px; }
.sap-delivery-top { display:grid; grid-template-columns:auto minmax(0,1fr) auto; padding-bottom:12px; border-bottom:1px solid var(--line-soft); }
.sap-focus-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px; align-items:start; }
.sap-focus-steps { display:grid; gap:7px; margin:0; padding:0; list-style:none; }
.sap-focus-steps li { display:grid; grid-template-columns:34px 1fr; align-items:center; gap:10px; min-height:52px; padding:8px 10px; border:1px solid var(--line-soft); border-radius:8px; color:var(--muted); background:#15181b; }
.sap-focus-steps li > span { display:grid; place-items:center; width:30px; height:30px; border:1px solid #50565e; border-radius:50%; font-weight:800; }
.sap-focus-steps li.active { color:#fff; border-color:var(--sap-blue); background:var(--sap-blue-soft); }
.sap-focus-steps li.active > span { border-color:var(--sap-blue); background:var(--sap-blue); }
.sap-focus-steps li.done > span { border-color:#79b75b; color:#d3efc2; }
.sap-focus-card { min-height:310px; padding:22px; border:1px solid #3a414a; border-radius:10px; background:#191d21; }
.sap-focus-card > h3 { margin:5px 0 8px; font-size:24px; }
.sap-focus-card > p:not(.sap-eyebrow) { max-width:720px; color:#bec3ca; line-height:1.55; }
.sap-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:28px; }
button.sap-choice { min-height:76px; font-size:17px; font-weight:800; }
.sap-field-pair { display:grid; grid-template-columns:minmax(0,2fr) minmax(140px,1fr); gap:12px; margin-top:20px; }
.sap-field-pair label { display:grid; gap:7px; color:var(--muted); font-size:13px; }
.sap-wide-control { width:100%; font-size:16px; }
.sap-inline-summary,.sap-summary-card { margin-top:16px; padding:15px; border-left:3px solid var(--sap-yellow); border-radius:7px; background:rgba(240,180,60,.08); color:#f1dfb8; }
.sap-summary-card { display:grid; gap:10px; }
.sap-summary-card strong { font-size:18px; line-height:1.45; }
.sap-summary-card p { margin:0; color:var(--muted); }
.sap-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:22px; }
.sap-metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.sap-metric-grid article { display:grid; gap:4px; min-height:112px; padding:15px; border:1px solid var(--line-soft); border-radius:9px; background:#171a1e; }
.sap-metric-grid article.accent { border-color:rgba(75,156,255,.55); background:var(--sap-blue-soft); }
.sap-metric-grid span,.sap-metric-grid small { color:var(--muted); }
.sap-metric-grid strong { font-size:30px; }
.sap-proposal-list { overflow:hidden; border:1px solid var(--line-soft); border-radius:9px; }
.sap-proposal-list article { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; min-height:64px; padding:10px 15px; border-bottom:1px solid var(--line-soft); background:#171a1e; }
.sap-proposal-list article:last-child { border-bottom:0; }
.sap-proposal-list strong,.sap-proposal-list span { display:block; }
.sap-proposal-list span { color:var(--muted); font-size:12px; }
.sap-calculation { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.sap-calculation span,.sap-calculation b { padding:5px 7px; border-radius:5px; background:#22272d; white-space:nowrap; }
.sap-calculation b { color:#b8d8ff; background:rgba(29,121,232,.16); }
.sap-concept-note { display:flex; gap:9px; flex-wrap:wrap; padding:12px 14px; border:1px dashed #515862; border-radius:8px; color:var(--muted); }
.sap-concept-note strong { color:#d9dde2; }
.sap-inventory-groups { display:grid; gap:13px; }
.sap-inventory-group { overflow:hidden; border:1px solid var(--line-soft); border-radius:9px; background:#15181b; }
.sap-inventory-group > header { display:flex; justify-content:space-between; align-items:center; width:auto; height:auto; min-height:44px; padding:8px 13px; background:#24282d; }
.sap-inventory-group > header h3 { margin:0; font-size:15px; }
.sap-inventory-group > header span { color:var(--muted); font-size:12px; }
.sap-inventory-item { display:grid; grid-template-columns:minmax(190px,1fr) minmax(130px,.5fr) minmax(230px,.85fr); align-items:center; gap:12px; min-height:0; padding:7px 13px; border-top:1px solid var(--line-soft); border-left:4px solid transparent; }
.sap-inventory-item.expiry-expired { border-left-color:var(--sap-red); background:rgba(255,77,98,.07); }
.sap-inventory-item.expiry-soon { border-left-color:var(--sap-yellow); background:rgba(240,180,60,.06); }
.sap-inventory-main strong,.sap-inventory-main span,.sap-count-block span,.sap-count-block strong,.sap-expiry-block span,.sap-expiry-block strong { display:block; }
.sap-inventory-main span,.sap-count-block span,.sap-expiry-block span { color:var(--muted); font-size:12px; }
.sap-count-control { display:flex!important; align-items:center; gap:7px; margin-top:3px; color:var(--text)!important; font-size:13px!important; }
.sap-count-heading { display:flex!important; align-items:baseline; gap:7px; white-space:nowrap; }
.sap-count-heading small { color:#c6cbd2; font-size:11px; }
.sap-count-input { width:60px; min-height:36px; padding:4px 7px; font-size:15px; font-weight:750; }
.sap-count-control b { color:var(--muted); font-size:12px; }
.sap-expiry-action { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.sap-expiry-block { width:112px; min-width:112px; }
.sap-expiry-date { width:112px; min-height:32px; padding:3px 6px; font-size:15px; font-weight:750; }
.sap-expiry-button { width:36px; min-width:36px; height:36px; min-height:36px; padding:0; font-size:16px; font-weight:800; white-space:nowrap; }
.sap-expiry-action > .sap-status { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border-radius:8px; }
.expiry-expired .sap-expiry-block span,.expiry-expired .sap-expiry-date { color:#ffadb7; }
.expiry-soon .sap-expiry-block span,.expiry-soon .sap-expiry-date { color:#ffd98b; }
button.sap-confirmed { color:#caeabb; border-color:rgba(143,200,106,.48); background:rgba(143,200,106,.09); }
.sap-complete-bar { position:sticky; bottom:10px; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 15px; border:1px solid #46515e; border-radius:9px; background:rgba(26,30,35,.96); box-shadow:0 12px 30px rgba(0,0,0,.28); backdrop-filter:blur(10px); }
.sap-complete-bar strong,.sap-complete-bar span { display:block; }
.sap-complete-bar span { margin-top:3px; color:var(--muted); font-size:12px; }
.sap-open-decisions { border:1px dashed #4a5159; border-radius:8px; color:var(--muted); }
.sap-open-decisions summary { padding:12px 14px; cursor:pointer; }
.sap-open-decisions ul { margin:0; padding:0 34px 14px; }

@media (max-width:1050px) {
  .sap-inventory-item { grid-template-columns:minmax(180px,1fr) 140px minmax(210px,.8fr); }
}
@media (max-width:850px) {
  .sap-focus-layout { grid-template-columns:1fr; }
  .sap-focus-steps { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .sap-focus-steps li { grid-template-columns:28px 1fr; min-height:48px; padding:7px; font-size:13px; }
  .sap-focus-steps li > span { width:26px; height:26px; }
  .sap-inventory-item { grid-template-columns:minmax(0,1fr) 140px minmax(175px,.72fr); }
  .sap-expiry-action { display:grid; grid-template-columns:112px minmax(36px,1fr); align-items:end; gap:0; }
  .sap-expiry-action > :last-child { justify-self:center; transform:translateX(14px); }
}
@media (max-width:700px) {
  .sap-view-heading,.sap-order-card > header,.sap-order-card > footer,.sap-archive-row,.sap-complete-bar { align-items:stretch; flex-direction:column; }
  .sap-view-heading > button,.sap-order-card > footer button,.sap-complete-bar button { width:100%; }
  .sap-delivery-top { grid-template-columns:auto minmax(0,1fr); }
  .sap-delivery-top > .sap-status { grid-column:2; }
  .sap-focus-steps strong { display:none; }
  .sap-focus-steps li { display:grid; grid-template-columns:1fr; place-items:center; }
  .sap-choice-grid,.sap-field-pair,.sap-metric-grid { grid-template-columns:1fr; }
  .sap-proposal-list article { grid-template-columns:1fr; }
  .sap-calculation { justify-content:flex-start; }
  .sap-inventory-item { grid-template-columns:minmax(0,1fr) 140px 180px; gap:8px; padding-block:6px; }
  .sap-complete-bar { position:static; }
}
@media (max-width:430px) {
  .sap-inventory-item { grid-template-columns:1fr; }
  .sap-expiry-action { display:flex; }
  .sap-expiry-button { width:36px; }
}
@media (prefers-reduced-motion:reduce) {
  .sap-pilot-stage,
  .sap-pilot-stage.sap-pilot-swipe-forward,
  .sap-pilot-stage.sap-pilot-swipe-backward { animation:none; }
}
.sap-pilot-host { --sap-blue:#1979e8; --sap-yellow:#f0b43c; --sap-red:#ff4d62; }
.sap-pilot-host [hidden] { display:none!important; }
.sap-pilot-host input,.sap-pilot-host select { font-size:16px; }
.sap-order-lines { max-height:420px; overflow:auto; }
.sap-order-card header,.sap-inventory-group>header { position:static; z-index:auto; }
.sap-expiry-editor { display:flex; align-items:center; gap:12px; }
.sap-expiry-block { width:176px; min-width:0; }
.sap-expiry-editor input[type=text] { width:112px; min-width:112px; flex:0 0 112px; padding:4px 7px; }
.sap-expiry-editor input[type=checkbox],.sap-expiry-ok { width:36px; height:36px; flex:0 0 36px; }
.sap-expiry-ok { display:grid; place-items:center; }
.sap-order-adjust { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:5px; }
.sap-order-adjust input { width:66px; }
.sap-exceptions { display:grid; gap:12px; }
.sap-exception { display:grid; grid-template-columns:minmax(0,1fr) 95px auto; gap:8px; }
.sap-exception select { min-width:0; width:100%; }
.sap-inventory-item { grid-template-columns:minmax(135px,1fr) minmax(140px,.7fr) 176px; }
.sap-check-label { display:block; font-size:12px; }
.sap-expiry-editor { justify-content:space-between; }
.sap-inventory-item input[type=number] { min-height:36px; }
@media(max-width:600px) {
 .sap-inventory-item { grid-template-columns:1fr 176px; gap:10px; }
 .sap-inventory-main { grid-column:1/-1; }
 .sap-exception { grid-template-columns:minmax(0,1fr) 70px; }
 .sap-exception button { grid-column:1/-1; }
}
@media(max-width:360px) { .sap-inventory-item { grid-template-columns:1fr; } }
