:root{font-family:Arial,Helvetica,sans-serif;color-scheme:dark;color:#f0f4e6;background:#07140b;font-size:14px}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(at top left,#233d21,#061009 70%)}button,input,select{font:inherit}button{cursor:pointer;border:0;color:inherit}button:disabled{opacity:.38;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #c3ff3d;outline-offset:3px}.topbar{flex:none;padding:12px 12px 10px;padding-top:max(12px,env(safe-area-inset-top));border-bottom:1px solid #3a5230}.brand{display:flex;align-items:center;gap:9px;margin-bottom:10px}.brand>img{width:40px;height:40px;object-fit:contain}.brand>div{flex:1;min-width:0}.brand>button{border:1px solid #536843;border-radius:13px;background:linear-gradient(135deg,#263c23,#112013);width:40px;height:40px;padding:5px}.brand>button img{width:100%;height:100%;object-fit:contain}h1{font-size:21px;letter-spacing:-.7px;margin:0}h1 span{color:#c4fb3e}.brand p{margin:5px 0 0;color:#a4b099;font-size:9px;letter-spacing:1.2px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.resources{display:grid;grid-template-columns:1.2fr 1fr .8fr;gap:7px}.resources button{background:linear-gradient(140deg,#1b3423,#0b190f);border:1px solid #465b38;border-radius:15px;padding:10px 7px;text-align:left;display:grid;grid-template-columns:27px 1fr;gap:3px;align-items:center;min-width:0}.resources img{width:27px;height:27px;object-fit:contain}.resources b{font-size:14px;white-space:nowrap;letter-spacing:-.4px}.resources small{font-size:9px;color:#a9b49e;grid-column:1/-1}main{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;background:#20281d}canvas{display:block;width:100%;height:100%}#loading{position:absolute;inset:0;display:grid;place-content:center;background:#102316}.tools{position:absolute;top:10px;right:10px;display:flex;padding:4px;background:#07170de8;border:1px solid #566b3e;border-radius:14px;gap:1px}.tools button{font-size:12px;background:none;min-width:28px;padding:5px 6px}.tools button:first-child,.tools button:nth-child(2){font-size:21px}.tools #original[aria-pressed=true]{color:#c2ff38}.scene-jump{position:absolute;left:12px;bottom:12px;background:#10220dea;border:1px solid #5f793e;border-radius:12px;padding:9px 14px;font-size:11px}#preview-tag{position:absolute;bottom:12px;right:12px;padding:5px 8px;font-size:8px;background:#0a160de8;color:#d6e6be;border-radius:7px}.delivery{flex:none;display:flex;gap:9px;align-items:center;width:100%;text-align:left;padding:11px 12px;border-top:1px solid #435432;background:linear-gradient(135deg,#152e1b,#0b1a10)}.delivery>img{width:40px;height:40px;object-fit:contain}.delivery>img:last-child{width:36px}.delivery>span{flex:1;min-width:0}.delivery b{display:block;font-size:12px}.delivery small{display:block;color:#aebda1;font-size:10px;line-height:1.4;margin-top:4px}.delivery i{display:block;height:4px;border-radius:5px;background:#07120b;margin-top:7px;overflow:hidden}.delivery em{display:block;width:0;height:100%;background:linear-gradient(90deg,#749a25,#d0fc4a)}nav{display:flex;flex:none;justify-content:space-around;padding:7px 8px max(7px,env(safe-area-inset-bottom));gap:5px;background:#06120a;border-top:1px solid #2e4425}nav button{flex:1;min-width:0;background:none;border:1px solid transparent;border-radius:15px;display:flex;flex-direction:column;align-items:center;padding:7px 2px;gap:4px;font-size:10px;color:#aebda3}nav img{width:33px;height:33px;object-fit:contain}nav button.active{border-color:#6a823c;background:linear-gradient(140deg,#2b4218,#12230d);color:#d1fd76}dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,600px);max-width:100%;height:auto;max-height:82dvh;overflow:hidden;padding:0;border:1px solid #5b713d;border-bottom:0;border-radius:25px 25px 0 0;background:linear-gradient(145deg,#1e3722,#09180e);color:#eff4e4;box-shadow:0 -15px 70px #0008}dialog::backdrop{background:#0009}.sheet-head{display:flex;align-items:center;padding:18px 20px 12px;gap:15px;border-bottom:1px solid #35492e}.sheet-head h2{margin:0;font-size:19px;flex:1}.sheet-head button{font-size:27px;background:none;color:#c4d2b7}#sheet-body{padding:16px 18px 24px;overflow-y:auto;max-height:calc(82dvh - 66px);overscroll-behavior:contain}.card{border:1px solid #405837;border-radius:17px;background:linear-gradient(140deg,#1a3323,#0c2115);padding:15px;margin-bottom:12px}.card h3{margin:0 0 7px;font-size:15px}.muted{color:#aabca0;font-size:12px;line-height:1.5}.status{display:inline-block;color:#d1eea1;font-size:11px;border:1px solid #455f32;border-radius:7px;padding:4px 7px;margin-bottom:9px}.status.warning{color:#ebcf8a;border-color:#7a653a}.row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}.row span{font-size:12px;color:#b9c9ad}.row b{font-size:13px;text-align:right}.grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.grid .card{margin:0}.action,.secondary{border:1px solid #607d3f;border-radius:12px;padding:10px 13px;text-align:center;font-size:12px}.action{background:linear-gradient(140deg,#d1fc60,#a6d91d);color:#1b2e09;font-weight:bold;box-shadow:inset 0 1px #eaffaa}.secondary{background:linear-gradient(140deg,#254429,#122818);color:#d6e5c7}.wide{width:100%;margin-top:8px}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.actions>*{flex:1}label{display:block;font-size:12px;color:#c3d2b7;margin:14px 0 6px}input,select{background:#0b1b11;color:#eef5e3;border:1px solid #567141;border-radius:10px;padding:10px;width:100%;min-height:40px}input[type=checkbox]{width:18px;min-height:18px;vertical-align:middle;accent-color:#aee838;margin-right:7px}.switch{display:flex;align-items:center;gap:5px}.progress{height:6px;border:1px solid #4c6440;background:#07120b;border-radius:7px;overflow:hidden;margin:10px 0}.progress>span{display:block;height:100%;background:linear-gradient(90deg,#7d9f28,#c8fa49)}.menu-item{width:100%;display:flex;align-items:center;gap:13px;border:1px solid #425d36;border-radius:15px;background:linear-gradient(135deg,#203b25,#0c2114);padding:15px;margin-bottom:10px;text-align:left}.menu-item img{width:36px;height:36px;object-fit:contain}.menu-item>span{flex:1}.menu-item b{display:block;font-size:14px}.menu-item small{display:block;color:#a8b99b;font-size:11px;margin-top:5px}.menu-item em{font-style:normal;color:#c1e981;font-size:21px}#toast{position:fixed;bottom:95px;left:15px;right:15px;max-width:500px;margin:auto;padding:12px 16px;border:1px solid #789449;border-radius:14px;background:#193321f5;color:#ebf4db;z-index:20;box-shadow:0 4px 20px #0009;font-size:12px}.history{font-size:11px;color:#b7c9a8;border-bottom:1px solid #354d2d;padding:9px 0}.code{font-family:monospace;overflow-wrap:anywhere;background:#06120b;border:1px solid #597b3b;padding:15px;border-radius:12px;color:#d5ff92;font-size:16px;line-height:1.8}.error{color:#efc58d;font-size:12px;line-height:1.5}.divider{margin:20px 0 10px;font-size:13px;color:#d1e5ba}.icon-line{display:flex;align-items:center;gap:10px}.icon-line img{width:40px;height:40px;object-fit:contain}hr{border:0;border-top:1px solid #3d5432;margin:18px 0}@media(min-width:700px){.topbar{padding:14px 24px}.resources{max-width:650px}.brand{margin-bottom:10px}h1{font-size:25px}.delivery{padding:12px 24px}nav button{max-width:160px}#preview-tag{font-size:11px}}
/* Freigegebener matter 3D-Spielstil mit ruhigen, gebrauchten Grüntönen. */
:root{background:#0b211b;color:#f0f1df;font-size:14px}
body{background:linear-gradient(150deg,#234033,#0b211b 70%)}
.topbar{background:linear-gradient(110deg,#203e32,#0d2820);border-bottom:0;padding:13px 12px 9px}
.brand{gap:10px;margin-bottom:12px}.brand>img{width:45px;height:45px;filter:saturate(.72) brightness(.93)}
h1{font-size:23px;letter-spacing:-.7px;color:#f2f1df}h1 span{color:inherit}
.brand p{font-size:11px;letter-spacing:.2px;color:#b6c4ac;margin-top:5px}
.brand>button{border-radius:50%;width:44px;height:44px;background:#243d30;border-color:#63765c;box-shadow:inset 0 1px 2px #a2ad6e22,0 3px 6px #0004}
.resources{gap:7px;grid-template-columns:1.2fr 1fr .85fr}
.resources button{border-color:#63775e;border-radius:15px;background:linear-gradient(135deg,#294337,#102c22);padding:10px 7px;grid-template-columns:31px 1fr;box-shadow:inset 0 1px 1px #afb29322,0 3px 5px #0003}
.resources img{width:31px;height:31px;filter:saturate(.75)}.resources b{font-size:15px;color:#f4f2e1}.resources small{color:#b2c1aa}
.delivery{width:calc(100% - 24px);margin:0 12px 10px;padding:12px 10px;gap:9px;border:1px solid #647556;border-radius:19px;background:linear-gradient(120deg,#2b4732,#0c2c24);box-shadow:inset 0 1px 2px #a0b37e22,0 4px 7px #0003}
.delivery>img{width:47px;height:54px;filter:saturate(.72)}.delivery>img:last-child{width:37px}.delivery .order-caption{display:block;font-size:10px;font-weight:600;letter-spacing:.8px;color:#c4d4b0;margin-bottom:5px}.delivery b{font-size:17px;font-weight:600;line-height:1.15}.delivery small{font-size:10px;color:#b8c8b2}.delivery i{height:6px;background:#0a251e;border:1px solid #70846b;margin-top:8px}.delivery em{background:linear-gradient(90deg,#688344,#a6c56b)}
main{background:#3b3b30}.tools{background:#18342ded;border-color:#62775b;border-radius:12px}.tools button{color:#e4ead8}.tools #original[aria-pressed=true]{color:#c3d593}.scene-jump{background:#1d3a2ced;border-color:#78845b;color:#e7edda;border-radius:13px;box-shadow:0 2px 5px #0004}
nav{background:#102b23;border-color:#465f47;padding:8px 8px max(8px,env(safe-area-inset-bottom));gap:6px}
nav button{background:linear-gradient(135deg,#25453b,#12362e);border:1px solid #62796e;border-radius:19px;padding:7px 2px 8px;color:#e1e8d8;gap:5px;font-size:11px;box-shadow:inset 0 1px 1px #cad3ae18,0 3px 5px #0004}
nav img{width:40px;height:40px;filter:saturate(.73)}nav button.active{background:linear-gradient(140deg,#405b2e,#234326);border-color:#82965d;color:#f3f5df}
dialog{background:linear-gradient(145deg,#2a4635,#102b22);border-color:#738364}.card,.menu-item{background:linear-gradient(135deg,#294739,#143327);border-color:#63795b}.sheet-head{border-color:#526b4e}
.action{background:linear-gradient(135deg,#b1cf75,#83aa49);color:#182814;border-color:#a3be76;box-shadow:inset 0 1px #d5dfae66}
.secondary{background:linear-gradient(135deg,#345238,#1b3a2b);color:#e5eada;border-color:#7b8c66}.progress>span{background:linear-gradient(90deg,#719146,#a6c767)}
.menu-item em{color:#c1d0a8}.status{color:#d8e6bd;border-color:#72815c}.code{color:#d3e4ab}.muted{color:#bac9af}input,select{background:#112b21;border-color:#718565}
#toast{background:#244535f5;border-color:#8a9a72;bottom:108px}#preview-tag{background:#19342bdc;color:#ccd8c2}
@media(max-width:350px){h1{font-size:20px}.brand>img{width:36px;height:36px}.resources b{font-size:13px}.resources img{width:25px;height:25px}.resources button{grid-template-columns:25px 1fr}.delivery b{font-size:15px}nav img{width:34px;height:34px}nav button{font-size:10px}}
@media(min-width:700px){.topbar{padding:15px 24px 12px}.resources{max-width:750px}.resources b{font-size:18px}.resources button{padding:12px}.delivery{width:calc(100% - 48px);margin:0 24px 12px;padding:14px 18px}.delivery b{font-size:21px}.delivery small{font-size:12px}.delivery .order-caption{font-size:11px}nav img{width:44px;height:44px}nav button{max-width:170px;font-size:13px}}
/* Feste volle Hallenbreite: keine Kamerafahrt, keine Zoomstufen, keine Seitenränder. */
main{touch-action:auto;padding:0;border:0;width:100%;background:#3b3b30}
#scene-scroll{position:absolute;inset:0;overflow-x:hidden;overflow-y:auto;touch-action:pan-y;overscroll-behavior-y:contain;scrollbar-width:none;outline-offset:-3px}
#scene-scroll::-webkit-scrollbar{display:none}
#canvas{width:100%;height:auto;display:block;touch-action:pan-y}
.scene-jump,#preview-tag{z-index:2}
/* Patina nur auf den festen Anzeigen über und unter der Halle.
   Die Struktur liegt hinter Text und Icons und verändert keine Abmessungen. */
:root{
 --paint-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='grain' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23grain)' opacity='.13'/%3E%3C/svg%3E");
 --paint-wear:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140' viewBox='0 0 220 140'%3E%3Cg fill='none' stroke='%23b9ae7f' stroke-linecap='round'%3E%3Cpath opacity='.16' stroke-width='1' d='M5 7l17 1m-9 2l7-1M187 5l25 1M3 113l1 13m3-7v9M177 132l19-2m5 0l11-1M57 37l6-1m71 35l4-1M91 105l9-1'/%3E%3Cpath opacity='.09' stroke-width='2' d='M3 3l19 1M207 3l9 1M4 133l13 1M198 134l17-2'/%3E%3C/g%3E%3Cg fill='%23938155' opacity='.12'%3E%3Cellipse cx='9' cy='19' rx='5' ry='2'/%3E%3Cellipse cx='205' cy='122' rx='7' ry='3'/%3E%3Cellipse cx='37' cy='131' rx='10' ry='2'/%3E%3C/g%3E%3C/svg%3E");
}
.topbar{
 background-image:var(--paint-grain),radial-gradient(ellipse at 0 0,#92805b16,transparent 58%),linear-gradient(110deg,#293e32,#182d25);
}
.resources button,.brand>button,.delivery,nav button{
 background-image:var(--paint-wear),var(--paint-grain),linear-gradient(135deg,#35483a,#1a332a);
 background-size:100% 100%,160px 160px,100% 100%;
 border-color:#777e60;
 box-shadow:inset 0 1px 1px #b8ad7838,inset 0 -2px 3px #07190f55,0 3px 5px #0003;
}
.delivery{background-image:var(--paint-wear),var(--paint-grain),radial-gradient(ellipse at 4% 20%,#93846016,transparent 68%),linear-gradient(120deg,#394c37,#1a342b);background-size:100% 100%,160px 160px,100% 100%,100% 100%}
nav{background-image:var(--paint-grain),linear-gradient(120deg,#233b2e,#142d25);border-color:#686e50}
nav button.active{background-image:var(--paint-wear),var(--paint-grain),linear-gradient(140deg,#4b5c34,#2e472c);border-color:#96966a}
/* Kompaktere Anzeigen und deutlicher Rost an den Lackkanten. */
:root{
 --paint-rust:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='140' viewBox='0 0 240 140'%3E%3Cg fill='%236b3825' opacity='.20'%3E%3Cpath d='M0 0h40l-3 3-11 1-4 4-8-2-5 5-3-1-3 14-3-4zM240 0h-23l5 4-2 4 9 3 1 6 6-2 4 10zM240 140h-49l5-4 15 1 7-5 7 2 4-7 6 3 1-15 4 4zM0 140h29l-3-4-9-1-3-5-7 2-2-11-5 3z'/%3E%3C/g%3E%3Cg fill='%23aa6137' opacity='.14'%3E%3Cpath d='M2 2h25l-3 2-11 1-3 3-5-1-3 10zM238 2h-15l6 3 1 6 5-1 3 8zM237 137h-31l8-2 6-4 9 3 6-7zM2 137h17l-8-3-3-5-4 2z'/%3E%3C/g%3E%3Cg stroke='%23b87b4a' stroke-width='1' opacity='.16'%3E%3Cpath d='M39 2l22 1m117 134l17-1M2 39v13m235 42v8M88 4l9 1'/%3E%3C/g%3E%3Cg fill='%23895132' opacity='.16'%3E%3Ccircle cx='14' cy='16' r='2'/%3E%3Ccircle cx='31' cy='8' r='1.2'/%3E%3Ccircle cx='225' cy='123' r='2.2'/%3E%3Ccircle cx='208' cy='130' r='1.5'/%3E%3Ccircle cx='7' cy='111' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}
.resources button,.brand>button,.delivery,nav button{
 background-image:var(--paint-rust),var(--paint-wear),var(--paint-grain),linear-gradient(135deg,#35483a,#1a332a);
 background-size:100% 100%,100% 100%,160px 160px,100% 100%;
 border-color:#777e60;
 box-shadow:inset 0 1px 1px #b8ad7830,inset 0 -2px 3px #07190f55,0 2px 4px #0003;
}
.delivery{background-image:var(--paint-rust),var(--paint-wear),var(--paint-grain),linear-gradient(120deg,#394c37,#1a342b)}
nav button.active{background-image:var(--paint-rust),var(--paint-wear),var(--paint-grain),linear-gradient(140deg,#4b5c34,#2e472c);border-color:#96966a}
.topbar{padding:8px 12px 7px;padding-top:max(8px,env(safe-area-inset-top))}
.brand{margin-bottom:6px;gap:8px}
.brand>img{width:36px;height:36px}
.brand>button{width:44px;height:44px;padding:7px}
h1{font-size:21px;letter-spacing:-.6px}
.brand p{font-size:10px;margin-top:3px}
.resources{gap:6px}
.resources button{padding:7px 6px;grid-template-columns:25px 1fr;gap:2px;border-radius:12px;min-height:49px}
.resources img{width:25px;height:25px}
.resources b{font-size:14px;letter-spacing:-.5px}
.resources small{font-size:8px}
.delivery{width:calc(100% - 24px);margin:0 12px 6px;padding:7px 9px;gap:7px;border-radius:15px}
.delivery>img{width:34px;height:38px}
.delivery>img:last-child{width:29px}
.delivery .order-caption{font-size:9px;letter-spacing:.65px;margin-bottom:3px}
.delivery b{font-size:15px;line-height:1.15}
.delivery small{font-size:9px;margin-top:3px}
.delivery i{height:4px;margin-top:5px}
nav{padding:5px 8px max(5px,env(safe-area-inset-bottom));gap:6px}
nav button{padding:5px 2px 6px;gap:3px;font-size:10px;border-radius:14px;min-height:58px}
nav img{width:30px;height:30px}
#toast{bottom:82px}
@media(max-width:350px){h1{font-size:19px}.resources b{font-size:12px}.resources button{grid-template-columns:22px 1fr;padding:7px 5px}.resources img{width:22px;height:22px}.delivery b{font-size:14px}nav button{font-size:9px}}
/* Roller: sofortige Breitenwahl ohne Tastatur. */
.cut-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cut-preset{min-height:46px;padding:10px 5px;font-size:13px;touch-action:manipulation}
.cut-preset.selected{background:linear-gradient(135deg,#b1cf75,#83aa49);border-color:#b5ce88;color:#182814;font-weight:bold}
.cut-summary{padding:12px;border:1px solid #72815c;border-radius:12px;background:#142f24;margin-top:12px}
.cut-summary b,.cut-summary span{display:block}.cut-summary b{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.cut-summary span{font-size:12px;line-height:1.5;color:#bac9af;margin-top:3px}
.cut-combinations{margin-top:12px}.cut-combinations summary{min-height:44px;cursor:pointer;padding:12px 0;color:#d8e6bd}
.cut-presets.mixed{grid-template-columns:repeat(2,minmax(0,1fr))}.cut-presets.mixed button{font-size:12px}
.cut-help{margin-bottom:0}

.machine-automatic{min-height:44px}

/* Freie Schnittpläne aus einzelnen Breiten, ohne Tastatur. */
.cut-preset small{display:block;font-size:9px;line-height:1.2;margin-top:3px;opacity:.8}
.cut-slots{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.cut-slot{min-height:44px;padding:10px;font-size:12px;touch-action:manipulation}
.cut-slot span{font-size:16px;margin-left:5px}
.cut-slots+.actions button{min-height:44px}

/* Proportionale Rollenvorschau: matte Papierflächen und markierter Schnitt-Ausschuss. */
.cut-roll-view{margin:12px 0 6px;padding:4px 0 9px;border-bottom:1px solid #53684c}
.cut-roll{display:block;width:100%;height:auto;overflow:visible}
.cut-roll text{font-family:Arial,Helvetica,sans-serif}
.cut-roll-legend{display:flex;flex-wrap:wrap;gap:7px 14px;margin-top:9px;color:#c8d4bc;font-size:11px;line-height:1.4}
.cut-roll-legend>span{display:flex;align-items:center;gap:5px}.cut-roll-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;flex:none}
.roll-paper-key{background:#dddcc4;border:1px solid #919d75}.roll-scrap-key{background:repeating-linear-gradient(135deg,#b57a5a,#b57a5a 3px,#804e36 3px,#804e36 5px)}
.cut-roll-legend .scrap-note{color:#dfb796}

.cut-trim-note{margin:8px 0 0;color:#d3bfa3;font-size:12px;line-height:1.5}

[hidden]{display:none!important}.sheet-head h2{min-width:0;flex:1;line-height:1.2}#sheet-machine-timer{max-width:44%;font-size:11px;font-variant-numeric:tabular-nums;border:1px solid #7c8a63;border-radius:8px;padding:7px 8px;color:#dde7bb;background:#18392a}#sheet-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px 12px;background:#183426;border-bottom:1px solid #6e805c}#sheet-tabs button{min-height:44px;padding:7px 4px;font-size:11px;border-radius:10px;line-height:1.2;background:#142e22;color:#c2ccb8;border:1px solid #687b58}#sheet-tabs [aria-selected="true"]{background:#4c6636;color:#f0f2dd;border-color:#94ac69}#sheet-tabs button:focus-visible{outline:2px solid #cadf84;outline-offset:2px}dialog:has(#sheet-tabs:not([hidden])) #sheet-body{max-height:calc(82dvh - 134px)}.research-filters{padding-bottom:16px}@media(max-width:350px){.sheet-head h2{font-size:17px}#sheet-machine-timer{font-size:10px}#sheet-tabs button{font-size:10px}}

.group-shortcut{display:flex;align-items:center;justify-content:space-between;padding:5px 16px;gap:8px;background:#10251c;color:#c6d4bb;font-size:12px}.group-shortcut button{background:#284d35;color:#e6f5d4;border:1px solid #6c9665;border-radius:9px;padding:7px 12px;font-weight:700}.group-shortcut span{font-size:11px}.group-join input,.group-join select{max-width:100%}

/* V2.1: Eindeutige, gut lesbare Unterscheidung zwischen Privat- und Gruppenfabrik */
.factory-mode-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;margin:0;background:linear-gradient(110deg,#183a2b,#10251e);border-top:2px solid #9fb77c;border-bottom:2px solid #75946a;min-height:76px}
.factory-mode-identity{display:flex;flex-direction:column;gap:5px;min-width:0}
.factory-mode-identity>span{font-size:11px;font-weight:900;letter-spacing:1.5px;color:#d8e7ae}
.factory-mode-identity strong{font-size:15px;line-height:1.3;color:#fff;overflow-wrap:anywhere}
.factory-mode-banner button{border:1px solid #7d9c77;background:#244b38;color:#fff;border-radius:12px;padding:10px 12px;min-height:45px;font-size:12px;font-weight:700;max-width:48%;flex-shrink:0;line-height:1.3}
body.is-group-factory .factory-mode-banner{background:linear-gradient(110deg,#413014,#231e15);border-color:#e7b651;box-shadow:inset 0 0 24px #ad772321}
body.is-group-factory .factory-mode-identity>span{color:#ffd67b}
body.is-group-factory .factory-mode-banner button{background:#64451d;border-color:#c69a48}
body.is-group-factory .resources{border-top:3px solid #c69a48}
.invite-code-box{padding:13px 0;border-top:1px solid #63765b;border-bottom:1px solid #63765b;margin:12px 0}
.invite-code-box label{display:block;margin-bottom:8px;font-weight:700}
.invite-code-controls{display:flex;gap:8px;align-items:stretch;min-width:0}
.invite-code-controls input{min-width:0;flex:1;width:0;font-size:16px;font-weight:800;letter-spacing:.5px;user-select:text}
.invite-code-controls button{flex-shrink:0;min-height:48px;padding:10px 13px}
.invite-code-box small{display:block;margin-top:7px;color:#bdcbb5}
@media(max-width:370px){.factory-mode-banner{padding:10px}.factory-mode-identity strong{font-size:13px}.factory-mode-banner button{font-size:11px;padding:9px}.invite-code-controls{flex-wrap:wrap}.invite-code-controls input{flex-basis:100%;width:100%}}

/* V2.3: Zwei echte Fabrik-Reiter statt Gruppenverwaltung-Text */
.factory-switch{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px 14px 7px;background:#12291f}
.factory-switch .factory-tab{appearance:none;display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:53px;padding:9px 7px;border-radius:13px;border:1px solid #617968;background:#1c352b;color:#c3d0c5;font-size:15px;font-weight:800;line-height:1.2;white-space:normal;box-shadow:none}
.factory-switch .factory-tab.active{background:linear-gradient(135deg,#7a9e59,#426e42);color:#fff;border:2px solid #d4e8aa;box-shadow:0 2px 12px #0005}
body.is-group-factory .factory-switch .factory-tab.active{background:linear-gradient(135deg,#a97827,#66461b);border-color:#ffdc88}
.factory-mode-status{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#1b3829;border-bottom:3px solid #85a86d;padding:9px 15px;min-height:44px}
.factory-mode-status span{font-size:11px;letter-spacing:1px;font-weight:900;color:#c5e9a5}
.factory-mode-status strong{font-size:13px;text-align:right;color:#fff;overflow-wrap:anywhere}
body.is-group-factory .factory-mode-status{background:#403018;border-color:#dbad53}
body.is-group-factory .factory-mode-status span{color:#ffda83}
@media(max-width:365px){.factory-switch .factory-tab{font-size:13px}}

/* Factory-only zoom: navigation, orders and header stay fixed. */
#scene-scroll{overflow:auto!important;touch-action:none!important;overscroll-behavior:contain}
#canvas{max-width:none!important;touch-action:none!important;user-select:none;-webkit-user-select:none}
.zoom-controls{position:absolute;right:12px;bottom:15px;z-index:8;display:flex;align-items:center;gap:5px;padding:5px;background:#13291fe8;border:1px solid #a2ba89;border-radius:14px;box-shadow:0 3px 15px #0008}
.zoom-controls button{min-width:43px;min-height:43px;border:1px solid #718b69;background:#254b36;color:#fff;border-radius:10px;font-size:23px;font-weight:800;touch-action:manipulation}
.zoom-controls #zoom-reset{font-size:13px;min-width:57px}
.zoom-controls button:disabled{opacity:.4}

/* V2.5 Zoom controls in top header, outside factory picture */
.topbar .brand{display:flex;align-items:center;gap:8px;min-width:0}
.topbar .brand>div:not(.zoom-controls){min-width:0;flex:1}
.topbar .brand .zoom-controls{position:static!important;right:auto!important;bottom:auto!important;z-index:auto!important;flex:0 0 auto;display:flex;gap:3px;padding:3px;border-radius:11px;box-shadow:none;background:#1c372b}
.topbar .brand .zoom-controls button{min-width:29px;min-height:34px;padding:2px 4px;font-size:18px;border-radius:7px}
.topbar .brand .zoom-controls #zoom-reset{min-width:43px;font-size:11px}
@media(max-width:410px){.topbar .brand{gap:5px}.topbar .brand .zoom-controls button{min-width:27px;min-height:32px}.topbar .brand .zoom-controls #zoom-reset{min-width:39px}.topbar .brand h1{font-size:clamp(15px,4vw,22px)}}

/* V2.7 – korrigierte kompakte Spiel-Kopfzeile */
.topbar .brand{display:grid!important;grid-template-columns:38px minmax(0,1fr) auto 44px!important;align-items:center!important;gap:7px!important;margin-bottom:8px!important;min-height:62px}
.topbar .brand>img{width:38px!important;height:38px!important}
.topbar .brand>div:not(.zoom-controls){min-width:0!important;flex:unset!important}
.topbar .brand h1{font-size:clamp(15px,3.7vw,21px)!important;line-height:1.12!important;white-space:normal!important;margin:0!important}
.topbar .brand p{font-size:10px!important;white-space:nowrap!important}
.topbar .brand>button{width:44px!important;height:44px!important;min-width:44px!important}
.topbar .brand .zoom-controls{position:static!important;display:flex!important;gap:3px!important;padding:4px!important;background:linear-gradient(145deg,#304a38,#192d24)!important;border:1px solid #9b9b70!important;border-radius:12px!important;box-shadow:inset 0 1px #ffffff25,0 2px 6px #0005!important;flex:none!important}
.topbar .brand .zoom-controls button{min-width:30px!important;min-height:35px!important;border-radius:8px!important;background:linear-gradient(#4b6947,#294632)!important;border:1px solid #85966b!important;color:#f8f4db!important;font-size:19px!important;font-weight:800!important;padding:2px!important}
.topbar .brand .zoom-controls #zoom-reset{min-width:47px!important;font-size:12px!important;background:#213b2d!important}
.topbar .brand .zoom-controls button:disabled{opacity:.45!important}
.factory-switch{padding:8px 3px 6px!important;gap:8px!important;background:transparent!important;margin:0!important}
.factory-switch .factory-tab{min-height:51px!important;padding:9px!important;font-size:14px!important}
.factory-mode-status{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;min-height:38px!important;margin:0!important;padding:7px 10px!important;border-bottom-width:2px!important}
.factory-mode-status span{flex:0 0 auto!important;font-size:10px!important;letter-spacing:.7px!important}
.factory-mode-status strong{font-size:12px!important;text-align:left!important;line-height:1.3!important}
.topbar .resources{margin-top:5px!important}
@media(max-width:390px){.topbar .brand{grid-template-columns:30px minmax(0,1fr) auto 39px!important;gap:5px!important}.topbar .brand>img{width:30px!important;height:30px!important}.topbar .brand h1{font-size:14px!important}.topbar .brand>button{width:39px!important;height:39px!important;min-width:39px!important}.topbar .brand .zoom-controls button{min-width:26px!important;min-height:33px!important}.topbar .brand .zoom-controls #zoom-reset{min-width:41px!important;font-size:11px!important}.factory-mode-status{gap:6px!important}.factory-mode-status strong{font-size:11px!important}}

/* V2.8 definitive layout; zoom outside title row, no doubled labels */
.topbar .brand{display:grid!important;grid-template-columns:43px minmax(0,1fr) 48px!important;gap:10px!important;align-items:center!important;padding:12px 4px 8px!important;min-height:67px!important}
.topbar .brand>img{width:43px!important;height:43px!important;max-width:43px!important}
.topbar .brand h1{font-size:clamp(18px,4.3vw,25px)!important;white-space:nowrap!important;line-height:1.12!important;letter-spacing:-.4px!important}
.topbar .brand h1 span{display:inline!important}
.topbar .brand p{margin-top:5px!important;font-size:11px!important}
.topbar .brand>button{width:45px!important;height:45px!important;min-width:45px!important}
.factory-utility-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 4px 8px;padding:3px 0 9px;border-bottom:1px solid #83916a55;min-height:48px}
.utility-caption{font-size:10px;font-weight:800;letter-spacing:1.4px;color:#c0cdb2}
.factory-utility-row .zoom-controls{position:static!important;display:flex!important;gap:4px!important;padding:4px!important;background:linear-gradient(145deg,#344c38,#182e23)!important;border:1px solid #b6a36d!important;border-radius:12px!important;box-shadow:inset 0 1px #ffffff2c,0 3px 9px #0005!important}
.factory-utility-row .zoom-controls button{min-width:36px!important;min-height:36px!important;padding:3px 6px!important;border:1px solid #8b9a70!important;border-radius:8px!important;background:linear-gradient(#4c6949,#294834)!important;color:#f8f5dc!important;font-size:20px!important;font-weight:800!important;line-height:1!important}
.factory-utility-row .zoom-controls #zoom-reset{min-width:56px!important;font-size:13px!important;background:#1a3628!important}
.factory-utility-row .zoom-controls button:disabled{opacity:.4!important}
.factory-switch{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;padding:2px 4px 10px!important;margin:0!important;background:transparent!important}
.factory-switch .factory-tab{min-height:53px!important}
.factory-mode-status{display:flex!important;align-items:center!important;gap:10px!important;min-height:36px!important;margin:0 4px 8px!important;padding:7px 10px!important;border:1px solid #728f70!important;border-radius:8px!important;background:#1b3829!important}
.factory-mode-status span{font-size:10px!important;letter-spacing:.7px!important;white-space:nowrap!important;flex:none!important}
.factory-mode-status strong{font-size:12px!important;line-height:1.25!important;min-width:0!important}
body.is-group-factory .factory-mode-status{background:#403018!important;border-color:#dbad53!important}
.topbar .resources{margin-top:0!important}
@media(max-width:390px){.topbar .brand{grid-template-columns:35px minmax(0,1fr) 41px!important;gap:7px!important}.topbar .brand>img{width:35px!important;height:35px!important}.topbar .brand h1{font-size:clamp(15px,4.4vw,19px)!important}.topbar .brand>button{width:41px!important;height:41px!important;min-width:41px!important}.factory-mode-status{gap:7px!important}.factory-mode-status strong{font-size:11px!important}}

/* V2.9: zoom in header, industrial green/gold buttons; no secondary factory label */
.topbar .brand{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto 44px!important;gap:7px!important;align-items:center!important;min-height:80px!important}
.topbar .brand h1{font-size:clamp(14px,3.65vw,22px)!important;line-height:1.1!important;white-space:normal!important}
.topbar .brand h1 span{display:inline!important}
.topbar .brand>img{width:40px!important;max-width:40px!important}
.topbar .brand>.zoom-industrial{position:static!important;display:flex!important;align-items:center!important;gap:3px!important;background:linear-gradient(145deg,#35563b,#172b20)!important;border:1.5px solid #bca36a!important;border-radius:12px!important;padding:4px!important;box-shadow:inset 0 1px #ffffff33,0 3px 9px #0008!important}
.topbar .brand>.zoom-industrial button{min-width:32px!important;height:38px!important;min-height:38px!important;border-radius:8px!important;border:1px solid #a99d65!important;background:linear-gradient(#50764b,#254b32)!important;color:#fff8df!important;font-weight:900!important;font-size:21px!important;padding:2px 4px!important;box-shadow:inset 0 1px #ffffff26!important}
.topbar .brand>.zoom-industrial #zoom-reset{font-size:12px!important;min-width:49px!important;background:#1d3928!important}
.topbar .brand>.zoom-industrial button:disabled{opacity:.45!important}
.topbar .brand>button[data-panel="more"]{width:44px!important;height:44px!important;min-width:44px!important}
.factory-switch{margin-top:3px!important;padding-top:3px!important}
.factory-mode-status,.factory-utility-row{display:none!important}
@media(max-width:390px){.topbar .brand{grid-template-columns:33px minmax(0,1fr) auto 37px!important;gap:5px!important}.topbar .brand>img{width:33px!important}.topbar .brand h1{font-size:13px!important}.topbar .brand>.zoom-industrial button{min-width:27px!important;height:34px!important;min-height:34px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:43px!important;font-size:11px!important}.topbar .brand>button[data-panel="more"]{width:37px!important;height:37px!important;min-width:37px!important}}

/* v3.1 Lager: zentrierter dritter Verkaufsbutton, gleiche vertikale Abstaende */
.sell-all-row{display:flex;justify-content:center;margin-top:10px;width:100%}
.sell-all-row button{display:block;max-width:100%;width:min(100%,340px);white-space:normal;min-height:48px;text-align:center;line-height:1.35}
#sheet-tabs:has([data-cmd="stock-tab"]){grid-template-columns:repeat(4,minmax(0,1fr))}
#sheet-tabs [data-cmd="stock-tab"]{font-size:clamp(10px,2.5vw,12px);overflow-wrap:anywhere}

/* V3.2: Drei gleich breite und gleich hohe Statusfelder */
.topbar .resources{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-items:stretch!important;width:100%!important;max-width:none!important}
.topbar .resources>button{box-sizing:border-box!important;width:100%!important;min-width:0!important;height:76px!important;min-height:76px!important;max-height:76px!important;display:grid!important;grid-template-columns:26px minmax(0,1fr)!important;grid-template-rows:minmax(28px,1fr) auto!important;align-items:center!important;column-gap:3px!important;padding:9px 6px!important;margin:0!important}
.topbar .resources>button img{width:26px!important;height:26px!important;object-fit:contain!important}
.topbar .resources>button b{font-size:clamp(11px,3.2vw,16px)!important;letter-spacing:-.45px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important}
.topbar .resources>button small{grid-column:1/-1!important;align-self:end!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
@media(max-width:370px){.topbar .resources{gap:5px!important}.topbar .resources>button{padding:8px 4px!important;grid-template-columns:22px minmax(0,1fr)!important}.topbar .resources>button img{width:22px!important;height:22px!important}.topbar .resources>button b{font-size:11px!important}.topbar .resources>button small{font-size:9px!important}}

/* V3.4: actual cutter job visualization (not an invented automation plan) */
.live-cut-plan{margin:0 0 16px;padding:16px;border:1px solid #98b17a;border-radius:16px;background:linear-gradient(140deg,#294c37,#163426);color:#f2f5e9}
.live-cut-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.live-cut-head b{font-size:16px}.live-cut-mode{font-size:10px;font-weight:800;letter-spacing:.8px;color:#d5e5ad;border:1px solid #829a66;border-radius:20px;padding:4px 8px}
.live-cut-widths{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.live-cut-width{background:#a7c774;color:#142a1e;border-radius:9px;padding:8px 10px;font-weight:800;font-size:15px}.live-cut-width small{font-size:11px}
.live-cut-track{display:flex;overflow:hidden;gap:2px;border-radius:7px;background:#0e271c;min-height:33px;border:1px solid #90a979}
.live-cut-track span{display:flex;align-items:center;justify-content:center;min-width:0;overflow:hidden;white-space:nowrap;background:#c4d8b1;color:#203628;font-size:10px;font-weight:800;border-right:1px solid #526b4e}
.live-cut-plan p{margin:9px 0 0;font-size:13px;color:#d1dfcc}.live-cut-plan .live-cut-foot{font-size:12px;color:#aebfa9}

/* Papier Magnat custom confirmations */
dialog.pm-confirm{position:fixed;inset:0;margin:auto;width:min(92vw,470px);max-height:calc(100dvh - 40px);padding:0;border:1px solid #8a9d70;border-radius:23px;background:#203e2e;color:#f3f1e5;box-shadow:0 18px 65px #000a;overflow:auto;z-index:9999}
dialog.pm-confirm::backdrop{background:rgba(0,13,8,.78)}
.pm-confirm-card{padding:26px 23px 23px;background:linear-gradient(140deg,#2b4d3b,#193628)}
.pm-confirm h2{margin:0 0 16px;font-size:23px;font-weight:750;line-height:1.3;color:#f2f3e8}
.pm-confirm p{font-size:16px;line-height:1.55;color:#d6e0ce;margin:0 0 25px;overflow-wrap:anywhere}
.pm-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pm-confirm-actions button{min-height:53px;border-radius:13px;font:inherit;font-weight:650;padding:10px 12px;cursor:pointer}
.pm-confirm-cancel{border:1px solid #859e76;background:#244332;color:#f0f3e6}
.pm-confirm-accept{border:1px solid #c8da9a;background:linear-gradient(#bbd882,#91b853);color:#183022}
.pm-confirm-actions button:focus-visible{outline:3px solid #f0d58b;outline-offset:2px}

/* V3.8: center confirmation dialogs above device navigation bars */
dialog.pm-confirm[open]{position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;inset-block-start:50%!important;inset-inline-start:50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:min(92vw,470px)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;overscroll-behavior:contain;z-index:99999!important;}
dialog.pm-confirm .pm-confirm-card{padding:clamp(16px,4vw,26px)!important;}
dialog.pm-confirm .pm-confirm-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
dialog.pm-confirm .pm-confirm-actions button{display:block!important;min-width:0!important;min-height:52px!important;}

/* V3.10: Own viewport-fixed confirmation layer; no native dialog positioning. */
.pm-confirm-overlay{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px))!important;box-sizing:border-box!important;background:rgba(0,12,7,.82)!important;overflow-y:auto!important}
.pm-confirm-overlay .pm-confirm-card{position:relative!important;inset:auto!important;transform:none!important;display:block!important;flex:0 1 440px!important;min-width:0!important;max-width:100%!important;max-height:100%!important;overflow-y:auto!important;box-sizing:border-box!important;padding:24px 20px!important;border:1px solid #92a87c!important;border-radius:22px!important;background:linear-gradient(145deg,#2b4d3b,#173326)!important;box-shadow:0 18px 55px #000b!important;color:#f1f4e9!important}
.pm-confirm-overlay h2{margin:0 0 15px!important;font-size:22px!important;color:#f1f4e9!important}
.pm-confirm-overlay p{margin:0 0 22px!important;font-size:16px!important;line-height:1.5!important;color:#dce6d3!important;overflow-wrap:anywhere!important}
.pm-confirm-overlay .pm-confirm-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important}
.pm-confirm-overlay .pm-confirm-actions button{min-width:0!important;min-height:52px!important;display:block!important;padding:10px 8px!important;border-radius:12px!important;font-size:15px!important;font-weight:700!important;line-height:1.2!important}
.pm-confirm-overlay .pm-confirm-cancel{background:#234231!important;border:1px solid #8ca27d!important;color:#f1f4e9!important}
.pm-confirm-overlay .pm-confirm-accept{background:linear-gradient(#bad783,#92b954)!important;border:1px solid #d1e5a1!important;color:#172c1e!important}

.alltime-balance{margin:18px 0 12px;padding:16px;border:1px solid #83966b;border-radius:15px;background:#18372a;display:flex;flex-direction:column;gap:6px}.alltime-balance strong{font-size:16px;color:#eaf0de}.alltime-balance b{font-size:27px;font-weight:800;font-variant-numeric:tabular-nums}.alltime-balance small{font-size:12px;color:#cbd5c1}.balance-positive b{color:#b4e67e}.balance-negative b{color:#ff9e8d}

/* Compact profitability widget below the three resources */
#finance-live{padding:0 12px 10px}.financial-live{padding:10px 13px;border:1px solid #8b9874;border-radius:14px;background:linear-gradient(145deg,#254536,#193629);color:#f1f4e6}.financial-heading,.financial-parts{display:flex;justify-content:space-between;gap:12px;align-items:center}.financial-heading strong{font-size:13px}.financial-heading span{font-size:11px;padding:3px 8px;border-radius:12px;background:#355742}.financial-amount{font-size:19px;font-weight:800;margin-top:4px;font-variant-numeric:tabular-nums}.financial-caption{font-size:11px;opacity:.76}.financial-parts{margin-top:7px;padding-top:6px;border-top:1px solid #ffffff25;font-size:11px;flex-wrap:wrap}.financial-parts b{font-size:12px}.financial-live.positive .financial-amount{color:#b6e58a}.financial-live.negative .financial-amount{color:#ffab9a}.financial-live.pending .financial-amount{font-size:14px;color:#e3d7a4}

/* V3.13: Bilanz ausschließlich unter dem Firmennamen, ohne zusätzliche Höhe im Fabrikbereich */
#finance-live{display:inline-flex;align-items:center;justify-content:flex-start;width:auto;max-width:100%;margin:3px 0 0;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;text-align:left;cursor:pointer;min-height:19px;font:inherit}#finance-live .finance-mini{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:11px;line-height:1.25}#finance-live .finance-mini-label{color:#d2d8c4;opacity:.85}#finance-live strong{font-size:12px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}#finance-live .positive strong{color:#b6e58a}#finance-live .negative strong{color:#ffab9a}#finance-live .pending strong{color:#e3d7a4}#finance-live:focus-visible{outline:2px solid #c7d89c;outline-offset:3px;border-radius:3px}.topbar .brand>div:has(> #company){min-width:0}#finance-live:hover strong{text-decoration:underline}

/* V3.14: native top-layer dialog above the already-open warehouse sheet. */
dialog.pm-confirm-overlay[open]{position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px))!important;background:transparent!important;box-shadow:none!important;overflow:auto!important;color:#f1f4e9!important;}
dialog.pm-confirm-overlay::backdrop{background:rgba(0,12,7,.82)!important;}

.bank-loan{padding:12px 0;border-bottom:1px solid #718569}.bank-loan:last-child{border-bottom:0}

.bank-offer-preview{margin:14px 0;padding:14px;border:1px solid rgba(181,206,143,.35);border-radius:14px;background:rgba(10,37,27,.25)}.bank-offer-preview .row{margin:7px 0}.bank-offer-preview p{margin:10px 0 0}

/* V3.29: Compact dashboard, consistently spaced cards, larger factory viewport. */
.topbar{display:flex!important;flex-direction:column!important;gap:8px!important;padding:8px 12px 9px!important;padding-top:max(8px,env(safe-area-inset-top))!important}
.topbar .brand{order:0!important;margin:0!important;padding:0!important;min-height:56px!important;grid-template-columns:34px minmax(0,1fr) auto 38px!important;gap:6px!important}
.topbar .brand>img{width:34px!important;height:34px!important}
.topbar .brand h1{font-size:clamp(14px,3.6vw,20px)!important}
.topbar .brand p{margin-top:2px!important;font-size:10px!important;letter-spacing:0!important}
.topbar .brand>button[data-panel="more"]{width:38px!important;height:38px!important;min-width:38px!important}
.topbar .brand>.zoom-industrial{padding:2px!important;gap:2px!important}
.topbar .brand>.zoom-industrial button{min-width:26px!important;height:31px!important;min-height:31px!important;font-size:17px!important}
.topbar .brand>.zoom-industrial #zoom-reset{min-width:39px!important;font-size:10px!important}
#finance-live{margin-top:1px!important;min-height:0!important}
#finance-live .finance-mini{gap:4px!important;font-size:10px!important}
#finance-live strong{font-size:11px!important}
.topbar .resources{order:1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin:0!important}
.topbar .resources>button{height:55px!important;min-height:55px!important;max-height:55px!important;padding:6px!important;border-radius:13px!important;grid-template-columns:22px minmax(0,1fr)!important;grid-template-rows:24px 14px!important;column-gap:4px!important}
.topbar .resources>button img{width:22px!important;height:22px!important}
.topbar .resources>button b{font-size:clamp(11px,3vw,15px)!important}
.topbar .resources>button small{font-size:9px!important}
.topbar .delivery{order:2!important;width:100%!important;margin:0!important;min-height:65px!important;padding:7px 10px!important;gap:8px!important;border:1px solid #647958!important;border-radius:13px!important}
.topbar .delivery>img{width:31px!important;height:31px!important;flex:none!important}
.topbar .delivery>img:last-child{width:28px!important}
.topbar .delivery .order-caption{font-size:9px!important;line-height:1.1!important}
.topbar .delivery b{font-size:clamp(11px,3.1vw,15px)!important;line-height:1.2!important}
.topbar .delivery small{font-size:10px!important;margin-top:2px!important;line-height:1.2!important}
.topbar .delivery i{margin-top:4px!important}
.topbar .factory-switch{order:3!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:0!important;margin:0!important}
.topbar .factory-switch .factory-tab{min-height:41px!important;padding:5px 8px!important;font-size:13px!important;border-radius:13px!important}
@media(max-width:390px){.topbar .brand{grid-template-columns:29px minmax(0,1fr) auto 34px!important;gap:4px!important}.topbar .brand>img{width:29px!important;height:29px!important}.topbar .brand>button[data-panel="more"]{width:34px!important;height:34px!important;min-width:34px!important}.topbar .brand>.zoom-industrial button{min-width:23px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:36px!important}.topbar .resources{gap:8px!important}.topbar .resources>button{grid-template-columns:19px minmax(0,1fr)!important;padding:5px!important}.topbar .resources>button img{width:19px!important;height:19px!important}}

/* V3.30: compact dashboard, equal spacing; factory canvas and scene untouched */
.topbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;padding:8px 10px!important}
.topbar .brand{grid-row:1!important;order:unset!important;min-height:48px!important;grid-template-columns:32px minmax(0,1fr) auto 36px!important;gap:5px!important}
.topbar .brand>img{width:32px!important;height:32px!important}
.topbar .brand h1{font-size:clamp(13px,3.6vw,19px)!important;white-space:nowrap!important}
.topbar .brand p{font-size:10px!important;margin-top:1px!important}
#finance-live{margin-top:1px!important;min-height:15px!important}
#finance-live .finance-mini{gap:5px!important;font-size:10px!important}
#finance-live strong{font-size:11px!important}
.topbar .brand>.zoom-industrial{padding:2px!important;gap:2px!important}
.topbar .brand>.zoom-industrial button{min-width:25px!important;height:31px!important;min-height:31px!important}
.topbar .brand>.zoom-industrial #zoom-reset{min-width:40px!important}
.topbar .brand>button[data-panel="more"]{width:36px!important;height:36px!important;min-width:36px!important}
.topbar .dashboard-row{grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.85fr);gap:8px;min-width:0;height:86px}
.topbar .dashboard-row .resources{display:contents!important}
.topbar .dashboard-row .resources>button{width:100%!important;height:86px!important;min-height:0!important;max-height:none!important;margin:0!important;padding:7px 5px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;gap:3px!important;border-radius:12px!important;overflow:hidden!important}
.topbar .dashboard-row .resources>button img{width:23px!important;height:23px!important;flex:none!important}
.topbar .dashboard-row .resources>button b{font-size:clamp(10px,2.9vw,15px)!important;max-width:100%!important}
.topbar .dashboard-row .resources>button small{font-size:10px!important;line-height:1.2!important}
.topbar .dashboard-row .resources>button:nth-child(2),.topbar .dashboard-row .resources>button:nth-child(3){height:39px!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:2px 4px!important;padding:4px!important}
.topbar .dashboard-row .resources>button:nth-child(2){grid-column:2;grid-row:1}
.topbar .dashboard-row .resources>button:nth-child(3){grid-column:2;grid-row:1;align-self:end}
.topbar .dashboard-row .resources>button:nth-child(2) img,.topbar .dashboard-row .resources>button:nth-child(3) img{width:20px!important;height:20px!important}
.topbar .dashboard-row .resources>button:nth-child(2) small,.topbar .dashboard-row .resources>button:nth-child(3) small{width:100%!important;font-size:9px!important;line-height:1!important}
.topbar .dashboard-row .delivery{grid-column:3;grid-row:1;width:100%!important;height:86px!important;min-height:0!important;max-height:none!important;padding:6px!important;margin:0!important;gap:4px!important;border-radius:12px!important;overflow:hidden!important}
.topbar .dashboard-row .delivery>img:first-child{width:25px!important;height:25px!important}
.topbar .dashboard-row .delivery>img:last-child{width:24px!important;height:24px!important}
.topbar .dashboard-row .delivery .order-caption{font-size:9px!important}
.topbar .dashboard-row .delivery b{font-size:clamp(10px,2.8vw,14px)!important}
.topbar .dashboard-row .delivery small{font-size:9px!important}
.topbar .factory-switch{grid-row:3!important;order:unset!important;gap:8px!important;margin:0!important;padding:0!important}
.topbar .factory-switch .factory-tab{min-height:43px!important;padding:5px!important}
@media(max-width:390px){.topbar{gap:6px!important;padding-left:8px!important;padding-right:8px!important}.topbar .dashboard-row{gap:6px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr)}.topbar .brand{grid-template-columns:27px minmax(0,1fr) auto 33px!important;gap:4px!important}.topbar .brand>img{width:27px!important;height:27px!important}.topbar .brand h1{font-size:12px!important}.topbar .brand>.zoom-industrial button{min-width:22px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:36px!important}.topbar .brand>button[data-panel="more"]{width:33px!important;height:33px!important;min-width:33px!important}.topbar .dashboard-row .delivery>img:last-child{display:none!important}}

/* V3.31: tighter reference-style dashboard, original factory artwork preserved */
.topbar{gap:5px!important;padding:5px 8px 6px!important}
.topbar .brand{min-height:43px!important;grid-template-columns:30px minmax(0,1fr) auto 35px!important;gap:5px!important}
.topbar .brand>img{width:30px!important;height:30px!important}
.topbar .brand h1{font-size:clamp(12px,3.35vw,17px)!important}
.topbar .brand p{font-size:10px!important;line-height:1.1!important}
#finance-live{min-height:13px!important;margin:0!important}
#finance-live .finance-mini{font-size:9px!important;gap:3px!important}
#finance-live strong{font-size:10px!important}
.topbar .brand>.zoom-industrial{padding:1px!important;gap:2px!important}
.topbar .brand>.zoom-industrial button{min-width:23px!important;height:29px!important;min-height:29px!important;font-size:16px!important}
.topbar .brand>.zoom-industrial #zoom-reset{min-width:38px!important;font-size:10px!important}
.topbar .brand>button[data-panel="more"]{width:35px!important;height:35px!important;min-width:35px!important}
.topbar .dashboard-row{height:72px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.9fr)!important;gap:6px!important;grid-template-rows:72px!important}
.topbar .dashboard-row .resources{display:grid!important;grid-column:1/3!important;grid-row:1!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:33px 33px!important;gap:6px!important;min-width:0!important;margin:0!important}
.topbar .dashboard-row .resources>button{min-width:0!important;height:33px!important;min-height:33px!important;max-height:33px!important;padding:3px 5px!important;gap:2px!important;border-radius:10px!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:nowrap!important}
.topbar .dashboard-row .resources>button:first-child{grid-column:1!important;grid-row:1/3!important;height:72px!important;min-height:72px!important;max-height:72px!important;display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;grid-template-rows:1fr auto!important;align-content:center!important}
.topbar .dashboard-row .resources>button:first-child img{grid-column:1!important;grid-row:1!important}
.topbar .dashboard-row .resources>button:first-child b{grid-column:2!important;grid-row:1!important}
.topbar .dashboard-row .resources>button:first-child small{grid-column:1/3!important;grid-row:2!important}
.topbar .dashboard-row .resources>button:nth-child(2){grid-column:2!important;grid-row:1!important;align-self:stretch!important}
.topbar .dashboard-row .resources>button:nth-child(3){grid-column:2!important;grid-row:2!important;align-self:stretch!important}
.topbar .dashboard-row .resources>button img,.topbar .dashboard-row .resources>button:nth-child(2) img,.topbar .dashboard-row .resources>button:nth-child(3) img{width:19px!important;height:19px!important}
.topbar .dashboard-row .resources>button b{font-size:clamp(10px,2.8vw,14px)!important;line-height:1.1!important}
.topbar .dashboard-row .resources>button small{font-size:9px!important;line-height:1!important}
.topbar .dashboard-row .resources>button:nth-child(2) small,.topbar .dashboard-row .resources>button:nth-child(3) small{display:none!important}
.topbar .dashboard-row .delivery{grid-column:3!important;grid-row:1!important;height:72px!important;min-height:72px!important;padding:4px 5px!important;gap:3px!important}
.topbar .dashboard-row .delivery>img:first-child{width:21px!important;height:21px!important}
.topbar .dashboard-row .delivery>img:last-child{width:19px!important;height:19px!important}
.topbar .dashboard-row .delivery .order-caption{font-size:8px!important;line-height:1!important}
.topbar .dashboard-row .delivery b{font-size:clamp(10px,2.65vw,13px)!important;line-height:1.1!important}
.topbar .dashboard-row .delivery small{font-size:9px!important;line-height:1.1!important;margin-top:1px!important}
.topbar .dashboard-row .delivery i{margin-top:2px!important}
.topbar .factory-switch{gap:6px!important}
.topbar .factory-switch .factory-tab{min-height:35px!important;padding:3px 5px!important;font-size:12px!important;border-radius:10px!important}
@media(max-width:390px){.topbar .dashboard-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.85fr)!important}.topbar .brand{grid-template-columns:25px minmax(0,1fr) auto 31px!important;gap:3px!important}.topbar .brand>img{width:25px!important;height:25px!important}.topbar .brand h1{font-size:12px!important}.topbar .brand>.zoom-industrial button{min-width:21px!important;height:27px!important;min-height:27px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:34px!important}.topbar .brand>button[data-panel="more"]{width:31px!important;height:31px!important;min-width:31px!important}.topbar .dashboard-row .resources>button{padding:2px 3px!important}.topbar .dashboard-row .resources>button img{width:17px!important;height:17px!important}}


/* V3.32 – definitive compressed dashboard: preserve factory scene and canvas */
.topbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:38px 68px 34px!important;gap:5px!important;padding:5px 8px 5px!important;min-height:0!important;max-height:none!important}
.topbar .brand{grid-row:1!important;min-height:38px!important;height:38px!important;margin:0!important;padding:0!important;grid-template-columns:28px minmax(0,1fr) auto 33px!important;gap:5px!important}
.topbar .brand>img{width:28px!important;height:28px!important}
.topbar .brand h1{font-size:clamp(12px,3.3vw,16px)!important;line-height:1.05!important;margin:0!important}
.topbar .brand p{font-size:10px!important;margin:2px 0 0!important;line-height:1!important}
.topbar .brand #finance-live{margin:1px 0 0!important;min-height:11px!important;line-height:1!important}
.topbar .brand #finance-live *{line-height:1!important}
.topbar .brand>.zoom-industrial{gap:2px!important;padding:1px!important}
.topbar .brand>.zoom-industrial button{height:28px!important;min-height:28px!important;min-width:23px!important;padding:1px 3px!important}
.topbar .brand>.zoom-industrial #zoom-reset{min-width:37px!important}
.topbar .brand>button[data-panel="more"]{height:32px!important;width:32px!important;min-width:32px!important}
.topbar .dashboard-row{grid-row:2!important;height:68px!important;min-height:68px!important;grid-template-rows:68px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.9fr)!important;gap:5px!important;margin:0!important;padding:0!important}
.topbar .dashboard-row .resources{display:grid!important;grid-column:1/3!important;grid-row:1!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:31.5px 31.5px!important;gap:5px!important;height:68px!important;margin:0!important}
.topbar .dashboard-row .resources>button{margin:0!important;padding:3px!important;border-radius:10px!important;min-height:0!important;max-height:none!important;overflow:hidden!important;box-shadow:none!important}
.topbar .dashboard-row .resources>button:first-child{grid-column:1!important;grid-row:1/3!important;height:68px!important;min-height:68px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:3px!important}
.topbar .dashboard-row .resources>button:nth-child(2){grid-column:2!important;grid-row:1!important;height:31.5px!important;min-height:31.5px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:3px!important}
.topbar .dashboard-row .resources>button:nth-child(3){grid-column:2!important;grid-row:2!important;height:31.5px!important;min-height:31.5px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:3px!important}
.topbar .dashboard-row .resources>button img{height:18px!important;width:18px!important;flex:none!important}
.topbar .dashboard-row .resources>button b{font-size:clamp(10px,2.7vw,13px)!important;line-height:1.05!important;white-space:nowrap!important}
.topbar .dashboard-row .resources>button small{font-size:9px!important;line-height:1!important}
.topbar .dashboard-row .resources>button:first-child small{display:block!important}
.topbar .dashboard-row .resources>button:nth-child(n+2) small{display:none!important}
.topbar .dashboard-row .delivery{grid-column:3!important;grid-row:1!important;display:grid!important;grid-template-columns:20px minmax(0,1fr) 18px!important;align-items:center!important;gap:3px!important;width:100%!important;height:68px!important;min-height:68px!important;max-height:68px!important;margin:0!important;padding:4px!important;border-radius:10px!important;overflow:hidden!important}
.topbar .dashboard-row .delivery>img:first-child{width:20px!important;height:20px!important}
.topbar .dashboard-row .delivery>img:last-child{width:18px!important;height:18px!important}
.topbar .dashboard-row .delivery span{min-width:0!important;overflow:hidden!important}
.topbar .dashboard-row .delivery .order-caption{font-size:8px!important;margin:0 0 2px!important;line-height:1!important}
.topbar .dashboard-row .delivery b{font-size:clamp(10px,2.5vw,12px)!important;line-height:1.08!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
.topbar .dashboard-row .delivery small{font-size:9px!important;line-height:1.05!important;margin:2px 0 0!important;display:block!important;max-height:19px!important;overflow:hidden!important}
.topbar .dashboard-row .delivery i{margin-top:2px!important;height:3px!important}
.topbar .factory-switch{grid-row:3!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important;margin:0!important;padding:0!important;height:34px!important;min-height:34px!important}
.topbar .factory-switch .factory-tab{height:34px!important;min-height:34px!important;max-height:34px!important;padding:2px!important;gap:1px!important;font-size:12px!important;border-radius:9px!important}
.topbar .factory-switch .factory-tab img{height:16px!important;width:16px!important}
@media(max-width:390px){.topbar .brand{grid-template-columns:24px minmax(0,1fr) auto 29px!important;gap:3px!important}.topbar .brand>img{width:24px!important;height:24px!important}.topbar .brand>.zoom-industrial button{min-width:20px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:33px!important}.topbar .brand>button[data-panel="more"]{height:29px!important;width:29px!important;min-width:29px!important}}

/* V3.34 – reference layout: three equal-spaced dashboard columns; factory canvas untouched */
.topbar{background:#102c22!important;grid-template-rows:39px 76px 39px!important;gap:6px!important;padding:6px 9px!important;overflow:hidden!important}
.topbar .brand{height:39px!important;min-height:39px!important;grid-template-columns:30px minmax(0,1fr) auto 34px!important;gap:5px!important}
.topbar .brand>img{width:30px!important;height:30px!important}
.topbar .brand h1{font-size:clamp(12px,3.45vw,16px)!important;letter-spacing:-.45px!important}
.topbar .brand p{font-size:10px!important;letter-spacing:0!important}
.topbar .brand #finance-live{font-size:10px!important;max-width:100%!important;white-space:nowrap!important}
.topbar .brand>.zoom-industrial{padding:2px!important;gap:2px!important}
.topbar .brand>.zoom-industrial button{height:29px!important;min-height:29px!important;min-width:23px!important}
.topbar .brand>.zoom-industrial #zoom-reset{min-width:38px!important}
.topbar .dashboard-row{grid-row:2!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.85fr)!important;grid-template-rows:76px!important;height:76px!important;min-height:76px!important;gap:6px!important}
.topbar .dashboard-row .resources{grid-column:1/3!important;grid-row:1!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:35px 35px!important;height:76px!important;gap:6px!important}
.topbar .dashboard-row .resources>button{padding:5px!important;border-radius:11px!important;min-height:0!important;box-shadow:none!important}
.topbar .dashboard-row .resources>button:first-child{grid-column:1!important;grid-row:1/3!important;height:76px!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:22px 1fr 12px!important;align-content:space-between!important;justify-items:start!important;gap:2px!important}
.topbar .dashboard-row .resources>button:first-child img{grid-column:1!important;grid-row:1!important}
.topbar .dashboard-row .resources>button:first-child b{grid-column:1!important;grid-row:2!important;align-self:center!important;font-size:clamp(12px,3.5vw,16px)!important}
.topbar .dashboard-row .resources>button:first-child small{grid-column:1!important;grid-row:3!important;display:block!important;font-size:10px!important}
.topbar .dashboard-row .resources>button:nth-child(2),.topbar .dashboard-row .resources>button:nth-child(3){height:35px!important;display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;grid-template-rows:1fr!important;align-items:center!important;gap:3px!important}
.topbar .dashboard-row .resources>button:nth-child(2){grid-column:2!important;grid-row:1!important}
.topbar .dashboard-row .resources>button:nth-child(3){grid-column:2!important;grid-row:2!important}
.topbar .dashboard-row .resources>button img{width:19px!important;height:19px!important}
.topbar .dashboard-row .resources>button b{font-size:clamp(10px,2.8vw,13px)!important;white-space:nowrap!important}
.topbar .dashboard-row .resources>button:nth-child(n+2) small{display:none!important}
.topbar .dashboard-row .delivery{grid-column:3!important;grid-row:1!important;height:76px!important;min-height:76px!important;max-height:76px!important;padding:5px!important;display:grid!important;grid-template-columns:22px minmax(0,1fr) 20px!important;gap:4px!important;border:1px solid #526c50!important;border-radius:11px!important}
.topbar .dashboard-row .delivery>img:first-child{width:22px!important;height:22px!important}
.topbar .dashboard-row .delivery>img:last-child{width:20px!important;height:20px!important}
.topbar .dashboard-row .delivery .order-caption{font-size:8px!important;line-height:1!important}
.topbar .dashboard-row .delivery b{font-size:clamp(10px,2.75vw,13px)!important;line-height:1.1!important}
.topbar .dashboard-row .delivery small{font-size:9px!important;line-height:1.1!important;max-height:22px!important}
.topbar .dashboard-row .delivery i{height:4px!important;margin-top:3px!important}
.topbar .factory-switch{grid-row:3!important;grid-template-columns:1fr 1fr!important;gap:6px!important;height:39px!important;min-height:39px!important}
.topbar .factory-switch .factory-tab{height:39px!important;min-height:39px!important;max-height:39px!important;border-radius:10px!important;padding:2px!important;font-size:12px!important;gap:1px!important}
.topbar .factory-switch .factory-tab img{height:16px!important;width:16px!important}
@media(max-width:390px){.topbar .dashboard-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr)!important}.topbar .brand{grid-template-columns:25px minmax(0,1fr) auto 30px!important;gap:3px!important}.topbar .brand>img{width:25px!important;height:25px!important}.topbar .brand>.zoom-industrial #zoom-reset{min-width:34px!important}}

/* V3.35: Spielername und Bilanz tatsächlich in EINER Zeile, ohne Überlauf. */
.topbar .brand>div:first-of-type{min-width:0!important;overflow:visible!important}
.topbar .identity-finance-row{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;min-width:0!important;margin-top:3px!important}
.topbar .identity-finance-row #company{flex:0 1 auto!important;min-width:0!important;margin:0!important;font-size:10px!important;letter-spacing:-.2px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.topbar .identity-finance-row #finance-live{display:inline-flex!important;flex:0 0 auto!important;min-width:0!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;white-space:nowrap!important;line-height:1!important}
.topbar .identity-finance-row #finance-live .finance-mini{display:inline-flex!important;flex-wrap:nowrap!important;gap:0!important;white-space:nowrap!important}
.topbar .identity-finance-row #finance-live .finance-mini-label{display:none!important}
.topbar .identity-finance-row #finance-live strong{font-size:10px!important;letter-spacing:-.35px!important;white-space:nowrap!important}
@media(max-width:390px){.topbar .identity-finance-row{gap:4px!important}.topbar .identity-finance-row #company{font-size:9px!important}.topbar .identity-finance-row #finance-live strong{font-size:9px!important;letter-spacing:-.45px!important}}

/* V3.36 – remove the inherited nav separator; align the capital tile to both stacked tiles. */
.topbar nav.factory-switch{border-top:0!important;border-bottom:0!important;box-shadow:none!important;outline:0!important}
.topbar .dashboard-row .resources{grid-template-rows:repeat(2,minmax(0,1fr))!important;align-items:stretch!important}
.topbar .dashboard-row .resources>button:first-child{grid-row:1 / span 2!important;align-self:stretch!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important}
.topbar .dashboard-row .resources>button:nth-child(2),.topbar .dashboard-row .resources>button:nth-child(3){height:100%!important;min-height:0!important;max-height:none!important;align-self:stretch!important;margin:0!important}

/* V3.38 – kompakte Engpassdiagnose */
.machine-flow{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:10px 0 5px;font-size:12px;color:#cdddc9}
.machine-flow-part{padding:5px 7px;border:1px solid rgba(177,205,152,.35);border-radius:8px;background:rgba(5,30,23,.22)}
.machine-flow-part.flow-warn{border-color:#e6b16b;color:#ffe1a3}
.machine-diagnosis{margin:5px 0 10px;font-size:12px;line-height:1.4}

/* V3.60: visual refinement scoped to dialogs; factory scene, trucks, forklifts,
   canvas, header and bottom navigation are deliberately untouched. */
#sheet{--ui-line:rgba(178,201,176,.15);--ui-soft:rgba(255,255,255,.035)}
#sheet .sheet-head{border-bottom:1px solid var(--ui-line);gap:10px}
#sheet .sheet-head h2{font-weight:750;letter-spacing:-.035em;line-height:1.15}
#sheet #sheet-body{scrollbar-gutter:stable;overscroll-behavior:contain}
#sheet #sheet-body>.muted:first-child{margin:3px 0 12px;line-height:1.4;font-size:12px}
#sheet .card{border:1px solid var(--ui-line);border-radius:15px;padding:14px;margin:0 0 11px;box-shadow:0 3px 16px rgba(0,0,0,.09)}
#sheet .card h3{letter-spacing:-.025em;line-height:1.25;margin:0 0 10px;font-weight:730}
#sheet .card .muted{font-size:12px;line-height:1.5}
#sheet .card .row{align-items:center;gap:10px}
#sheet .card .row h3{margin:0;min-width:0}
#sheet .card .status{max-width:58%;text-align:right;font-size:11px;line-height:1.3}
#sheet .card .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#sheet .card .actions button{flex:1 1 auto;min-width:0}
#sheet button{transition:background-color .15s ease,border-color .15s ease,transform .15s ease;touch-action:manipulation}
#sheet button:active:not(:disabled){transform:scale(.985)}
#sheet button:focus-visible,#sheet select:focus-visible,#sheet input:focus-visible{outline:2px solid #b8d993;outline-offset:2px}
#sheet button:disabled{opacity:.45;cursor:not-allowed;filter:saturate(.65)}
#sheet select,#sheet input:not([type=checkbox]),#sheet textarea{max-width:100%;border-radius:10px}
#sheet .divider{margin:19px 0 11px;letter-spacing:-.02em}
#sheet #sheet-tabs{gap:5px;padding:7px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
#sheet #sheet-tabs button{min-height:39px;border-radius:9px;line-height:1.2;font-size:clamp(10px,2.65vw,12px);padding:8px 6px;white-space:normal}
#sheet #sheet-tabs button[aria-selected=true]{font-weight:750;box-shadow:inset 0 -2px 0 rgba(191,223,155,.65)}
#sheet .pm-area-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:12px}
#sheet .pm-area-stat{border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-soft);padding:10px 12px;min-width:0}
#sheet .pm-area-stat strong{display:block;font-size:20px;letter-spacing:-.04em;line-height:1.2}
#sheet .pm-area-stat small{display:block;margin-top:3px;opacity:.72;font-size:11px}
#sheet .pm-area-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:17px 0 10px}
#sheet .pm-area-heading h3{margin:0}
#sheet .pm-area-heading small{opacity:.7;font-size:11px}
@media(max-width:390px){#sheet .card{padding:12px;border-radius:13px}#sheet #sheet-tabs button{padding:7px 4px}}
@media(prefers-reduced-motion:reduce){#sheet button{transition:none}}

/* V3.61: Compact, consistent management panels. Factory scene untouched. */
.pm-machine-card{padding:12px 13px!important;margin-bottom:9px!important}
.pm-machine-card-head{gap:8px;align-items:flex-start}
.pm-machine-card-head h3{font-size:14px;line-height:1.3;margin:0;min-width:0}
.pm-machine-card-head .status{font-size:10px;line-height:1.3;max-width:57%;text-align:right}
.pm-machine-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:11px 0}
.pm-machine-metrics span{min-width:0;border:1px solid rgba(190,218,182,.12);border-radius:9px;padding:7px 3px;text-align:center;background:rgba(255,255,255,.025)}
.pm-machine-metrics b{display:block;font-size:13px;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.pm-machine-metrics small{display:block;font-size:10px;opacity:.68;line-height:1.35}
.pm-machine-card .actions{margin-top:8px;gap:7px}
.pm-machine-quicknav{margin-bottom:10px}
.pm-machine-quicknav button{width:100%;font-size:12px}
.pm-economy-details{border:1px solid rgba(190,218,182,.15);border-radius:12px;padding:10px;margin-bottom:10px}
.pm-economy-details>summary{cursor:pointer;font-weight:650;font-size:13px;padding:4px 2px}
.pm-economy-details>.card{margin:12px 0 0}
#sheet-tabs{scrollbar-width:none}
#sheet-tabs::-webkit-scrollbar{display:none}
@media(max-width:370px){.pm-machine-metrics{gap:3px}.pm-machine-metrics b{font-size:12px}.pm-machine-metrics small{font-size:9px}}

/* V3.62: readability refinements in order, stock and finance dialogs only. */
#sheet .pm-order-card,#sheet .pm-offer-card{padding:12px 13px;margin-bottom:9px}
#sheet .pm-order-card h3,#sheet .pm-offer-card h3{font-size:14px;margin-bottom:3px}
#sheet .pm-order-card>.muted,#sheet .pm-offer-card>.muted{margin:0 0 10px;font-size:11px}
#sheet .pm-order-card .actions,#sheet .pm-offer-card .actions{margin-top:9px;gap:7px}
#sheet .pm-order-card button,#sheet .pm-offer-card button{min-height:38px}
#sheet [data-stock-panel]>.card{margin-bottom:9px}
#sheet [data-stock-panel] .card h3{font-size:14px}
#sheet .pm-secondary-details{border:1px solid rgba(178,201,176,.17);border-radius:13px;margin:12px 0;overflow:hidden}
#sheet .pm-secondary-details>summary{cursor:pointer;padding:13px 14px;font-size:13px;font-weight:700;list-style-position:inside}
#sheet .pm-secondary-details>.card{margin:0;border:0;border-top:1px solid rgba(178,201,176,.14);border-radius:0;box-shadow:none}
#sheet .pm-secondary-details>summary:focus-visible{outline:2px solid #b8d993;outline-offset:-3px}

/* V3.63: compact research, staffing and maintenance sheets; hall untouched. */
#sheet .research-filters{margin-bottom:10px}
#sheet .research-filters label{font-size:12px;font-weight:650}
#sheet .research-filters select{min-height:42px}
#sheet .research-active{border-color:rgba(173,211,144,.3)}
#sheet .pm-secondary-details>summary{min-height:42px;display:list-item}
#sheet .pm-secondary-details>.card{padding:11px 13px}
#sheet .pm-secondary-details .transport-route-details{margin:8px 0}
#sheet .card>.muted{line-height:1.5}
#sheet .card .actions{gap:7px}
@media(max-width:390px){#sheet .card .actions button{min-width:0;font-size:12px}#sheet .card h3{line-height:1.3}}

/* V3.65: purchase below installed machines; no OS-native width selector */
#sheet .pm-purchase-details{margin:18px 0 12px;border:1px solid rgba(174,206,162,.28);border-radius:14px;background:rgba(18,49,36,.4);overflow:hidden}
#sheet .pm-purchase-details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;min-height:68px}
#sheet .pm-purchase-details>summary::-webkit-details-marker{display:none}
#sheet .pm-purchase-details>summary b{display:block;font-size:15px}
#sheet .pm-purchase-details>summary small{display:block;margin-top:4px;opacity:.72;font-size:12px}
#sheet .pm-purchase-details[open]>summary{border-bottom:1px solid rgba(174,206,162,.2)}
#sheet .pm-purchase-details[open]>summary>span:last-child{transform:rotate(180deg)}
#sheet .pm-purchase-content{padding:14px 16px 17px}
#sheet .pm-width-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0 15px}
#sheet .pm-width-option{min-height:43px;padding:8px 5px;border:1px solid rgba(174,206,162,.32);border-radius:10px;background:rgba(5,30,20,.3);color:inherit;font:inherit;font-size:13px}
#sheet .pm-width-option.active{border-color:#b6d88b;background:rgba(157,190,101,.22);font-weight:750}
#sheet .pm-width-option:focus-visible{outline:2px solid #b6d88b;outline-offset:2px}

/* V3.66 production overview: sheet only, factory hall and scene untouched */
.pm-status-board{margin:0 0 18px;padding:13px;border:1px solid rgba(174,206,162,.23);border-radius:15px;background:rgba(13,44,31,.36)}
.pm-status-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:12px}
.pm-status-head h3{margin:0;font-size:17px}.pm-status-head small{opacity:.7}
.pm-status-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.pm-status-totals span{padding:10px 6px;text-align:center;border:1px solid rgba(174,206,162,.19);border-radius:10px;font-size:11px;color:#d2dccc}
.pm-status-totals b{display:block;font-size:20px;color:#f0f6e9}
.pm-status-machine{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;margin:7px 0;padding:12px 10px;border:1px solid rgba(174,206,162,.2);border-radius:11px;background:rgba(6,29,20,.28);color:inherit;text-align:left}
.pm-status-machine-main{display:flex;flex-direction:column;gap:4px;min-width:0}.pm-status-machine-main small{font-size:11px;opacity:.72;overflow-wrap:anywhere}
.pm-status-pill{flex-shrink:0;max-width:42%;font-size:11px;padding:6px 8px;border-radius:8px;border:1px solid rgba(174,206,162,.28);text-align:center}
.pm-status-pill.ok{color:#c4e9a1;border-color:rgba(172,221,135,.45)}
.pm-status-pill.warn{color:#f4d4a0;border-color:rgba(240,193,111,.45)}
.pm-status-pill.idle{color:#b8c5b6}
.pm-status-shipping{margin-top:18px;padding-top:14px;border-top:1px solid rgba(174,206,162,.2)}
.pm-status-truck{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 2px;border-bottom:1px solid rgba(174,206,162,.14)}
.pm-status-truck span{display:flex;flex-direction:column;gap:4px}.pm-status-truck small{opacity:.7;font-size:11px}

/* Production diagnostics: no modifications to the hall, canvas or vehicles. */
.pm-status-machine-main .pm-status-reason{opacity:.95;color:#f1e2bd}
.pm-status-machine-main .pm-status-action{opacity:.8;color:#b6d5b0}
.pm-status-machine{align-items:flex-start}
.pm-status-machine-main{gap:5px}

.pm-group-admin{margin-top:15px;padding-top:14px;border-top:1px solid rgba(190,212,180,.2)}
.pm-group-admin h4{margin:0 0 10px}.pm-group-admin label{display:block;margin:10px 0 5px}.pm-group-admin input,.pm-group-admin select{width:100%}
.pm-group-danger{margin-top:20px;padding:12px;border:1px solid rgba(227,119,101,.45);border-radius:11px;background:rgba(117,35,25,.12)}.pm-group-danger p{font-size:12px;color:#f0c3b7}

.pm-group-rotate{margin-top:14px;padding:12px;border:1px solid rgba(178,205,163,.22);border-radius:10px}

/* V3.72 premium UI refresh. Hall, canvas, scene and vehicles untouched. */
:root{--pm-panel:#192f25;--pm-stroke:#617e61;--pm-cream:#f2f5e9}
.topbar{background:linear-gradient(145deg,#213b2d,#0e241b);border-bottom:1px solid #60785b;box-shadow:0 5px 18px #0005}
.brand h1{font-weight:850;letter-spacing:.02em}
.factory-tab{border-radius:12px!important;transition:background .15s}
.factory-tab.active{border-color:#b9d68d!important;box-shadow:inset 0 0 0 1px #b9d68d44}
.resources button{background:linear-gradient(145deg,#2d4938,#192f25);border:1px solid #668366;border-radius:13px;box-shadow:inset 0 1px #ffffff15,0 3px 10px #0003;min-width:0}
.resources b{font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.resources small{font-weight:650;letter-spacing:.02em}
.delivery{background:linear-gradient(115deg,#304b37,#192f26);border:1px solid #728c6a;border-radius:14px;box-shadow:inset 0 1px #ffffff15,0 4px 13px #0004}
nav{background:linear-gradient(180deg,#1e372b,#10261e);border-top:1px solid #577056}
nav button{background:transparent;border:1px solid transparent;box-shadow:none;border-radius:12px;min-width:0}
nav button.active{background:#314b37;border:1px solid #93af7a;box-shadow:inset 0 1px #ffffff19}
dialog{background:linear-gradient(145deg,#223b2d,#10251c);border:1px solid #688166;border-radius:19px;box-shadow:0 20px 65px #0009}
.sheet-head{background:linear-gradient(135deg,#2a4433,#1a3025);border-bottom:1px solid #617a5e}
.sheet-head h2{letter-spacing:-.02em;line-height:1.15}
#sheet-body .card{background:linear-gradient(145deg,#294334,#192f25);border:1px solid #5a765b;border-radius:14px;box-shadow:inset 0 1px #ffffff0d}
#sheet-body .card h3{font-weight:750;letter-spacing:-.01em}
#sheet-body .menu-item{background:#233c2e;border-radius:12px}
#sheet-body button{touch-action:manipulation}
#sheet-body .action{background:linear-gradient(135deg,#c9dfa2,#91b965);border-color:#c1d89b;color:#152719;font-weight:750}
#sheet-body .secondary{background:#2d4a38;border-color:#799272;color:#f1f5e8}
#sheet-body input,#sheet-body select,#sheet-body textarea{background:#10271e;color:#f4f6ec;border:1px solid #708c6e;border-radius:10px;min-height:42px}
#sheet-body input:focus-visible,#sheet-body select:focus-visible,#sheet-body button:focus-visible,nav button:focus-visible{outline:2px solid #c6e49a;outline-offset:2px}
#sheet-body .muted{color:#bdcdbc;line-height:1.45}
.pm-status-board{background:linear-gradient(145deg,#263f30,#152c22);border:1px solid #678162;border-radius:15px;padding:14px}
.pm-status-focus{display:flex;align-items:center;gap:9px;padding:11px 12px;margin-bottom:14px;background:#11291f;border:1px solid #597454;border-radius:11px;font-size:12px;font-weight:700;line-height:1.4}
.pm-status-focus-dot{width:9px;height:9px;border-radius:50%;background:#c0d997;box-shadow:0 0 0 4px #b9d58b1a;flex:none}
.pm-status-totals{gap:8px}
.pm-status-totals span{background:#112a20;border:1px solid #567253;border-radius:11px;font-size:10px;padding:10px 4px}
.pm-status-totals b{font-size:22px;letter-spacing:-.05em;margin-bottom:2px}
.pm-status-machine{padding:13px 11px;border:1px solid #577456;border-radius:12px;background:#1c382a;box-shadow:inset 0 1px #ffffff09}
.pm-status-machine:active{background:#294634}
.pm-status-machine-main strong{font-size:13px}
.pm-status-machine-main small{line-height:1.4}
.pm-status-pill{font-weight:750;border-radius:9px;line-height:1.3}
.pm-status-pill.ok{background:#284a33}.pm-status-pill.warn{background:#4a3924}.pm-status-pill.idle{background:#293d32}
.pm-status-shipping{border-top:1px solid #597657}
@media(max-width:380px){.pm-status-machine{gap:5px}.pm-status-pill{max-width:38%;font-size:10px;padding:6px}.pm-status-board{padding:11px}}
@media(prefers-reduced-motion:reduce){.factory-tab{transition:none}}

/* V3.73: clearer scan order, touch targets and mobile typography; hall untouched. */
.pm-status-machine{min-height:68px;position:relative}
.pm-status-machine:focus-visible{outline:2px solid #c5e2a0;outline-offset:2px}
.pm-status-machine-main{min-width:0;flex:1}
.pm-status-reason{overflow-wrap:anywhere}
.pm-status-action{overflow-wrap:anywhere}
.pm-status-head small{white-space:nowrap}
.pm-status-totals span{font-variant-numeric:tabular-nums}
@media(max-width:420px){.pm-status-machine-main strong{font-size:13px}.pm-status-machine-main small{font-size:11px}.pm-status-pill{max-width:40%;white-space:normal}}

/* V3.74 Factory command center. Factory hall, animation and positioning untouched. */
.pm-command-center{margin-bottom:16px;border:1px solid #6c8b68;border-radius:17px;background:linear-gradient(145deg,#294535,#12281e);padding:15px;box-shadow:0 8px 22px #0003}
.pm-command-title{display:flex;flex-direction:column;gap:3px;margin-bottom:13px}
.pm-command-title>span{font-size:10px;letter-spacing:.14em;color:#c5dca4;font-weight:800}
.pm-command-title>strong{font-size:19px;letter-spacing:-.02em}
.pm-command-title>small{font-size:12px;color:#c1cfc0}
.pm-command-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pm-command-grid>div{display:flex;flex-direction:column;gap:5px;min-width:0;padding:12px 10px;background:#11271e;border:1px solid #547354;border-radius:12px}
.pm-command-grid small{font-size:11px;color:#c2d1bf}
.pm-command-grid strong{font-size:18px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.pm-command-grid em{font-size:12px;color:#b2c7af;font-style:normal}
.pm-command-grid .pm-loss{color:#f4b5a7}.pm-command-grid .pm-profit{color:#c8e7a2}
.pm-command-alert{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding:11px;border-radius:11px;background:#244332;border:1px solid #688869}
.pm-command-alert.attention{background:#4a3724;border-color:#ab8959}
.pm-command-alert b{font-size:12px}.pm-command-alert small{font-size:11px;text-align:right}
.pm-command-next,.pm-command-goal{display:flex;flex-direction:column;gap:5px;margin-top:10px;padding:12px;background:#193226;border:1px solid #506d50;border-radius:12px}
.pm-command-next small,.pm-command-goal small{font-size:11px;color:#bcd0b9}
.pm-command-next b,.pm-command-goal b{font-size:13px}
.pm-command-next span,.pm-command-goal span{font-size:12px;color:#d6e2d2}
.pm-command-goal>div:first-child{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:baseline;gap:5px}
.pm-command-track{height:7px;background:#0d2219;border-radius:8px;overflow:hidden;margin-top:5px}
.pm-command-track i{display:block;height:100%;background:#b7d48c;border-radius:8px}
.pm-command-disclaimer{font-size:11px;margin:11px 1px 0;line-height:1.45}

/* V3.76 customer relationship and research guidance; factory scene untouched */
.pm-relations{margin:0 0 14px;border:1px solid #668463;border-radius:14px;background:linear-gradient(145deg,#254132,#152c22);overflow:hidden}
.pm-relations>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px;cursor:pointer;list-style:none;font-weight:800}
.pm-relations>summary::-webkit-details-marker{display:none}
.pm-relations>summary small{font-size:11px;color:#c3d4be;font-weight:600;text-align:right}
.pm-relations>p{padding:0 14px}
.pm-relation-row{margin:0 12px 9px;padding:12px;background:#142b21;border:1px solid #4d6c4e;border-radius:11px}
.pm-relation-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.pm-relation-top b{font-size:12px}.pm-relation-top span{font-size:11px;color:#c7d8c0;white-space:nowrap}
.pm-relation-track{height:7px;border-radius:6px;background:#0b2018;margin:9px 0 6px;overflow:hidden}
.pm-relation-track i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#73985d,#c2d99c)}
.pm-relation-row>small{font-size:11px;color:#b8cbb7}
.pm-research-guide{border-color:#77936b!important}

/* V3.78 order prioritization, presentation only; scene untouched. */
.pm-priority{margin:0 0 15px;padding:14px;background:linear-gradient(145deg,#243d30,#142b21);border:1px solid #637f5d;border-radius:15px}
.pm-priority-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.pm-priority-heading h3{margin:0 0 7px;font-size:16px}.pm-priority-heading span{font-size:11px;color:#c7d9b8;text-align:right}
.pm-priority-row{padding:11px;margin:9px 0;background:#122a20;border:1px solid #4f6c4d;border-radius:11px}
.pm-priority-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:5px}
.pm-priority-top b{font-size:12px}.pm-priority-top span{font-size:10px;color:#bcd5ad;font-weight:800}
.pm-priority-top span.urgent{color:#ffd49a}.pm-priority-top span.late{color:#ffaca4}
.pm-priority-row small{display:block;font-size:11px;color:#c5d1c0;line-height:1.4}
.pm-priority-meter{height:6px;border-radius:6px;background:#0a2117;margin:9px 0 7px;overflow:hidden}
.pm-priority-meter i{display:block;height:100%;border-radius:6px;background:#b4d48a}

/* V3.80 economic transparency; factory scene and vehicle animation untouched */
.pm-economy-panel{margin:0 0 14px;padding:14px;border:1px solid #73916c;border-radius:15px;background:linear-gradient(145deg,#294735,#132a20)}
.pm-economy-head{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:8px}
.pm-economy-head small{font-size:10px;letter-spacing:.11em;color:#c4d99f;font-weight:800}
.pm-economy-head h3{font-size:17px;margin:3px 0}
.pm-economy-result{font-size:16px;font-weight:850;color:#c9e7a7;white-space:nowrap}.pm-economy-result.negative{color:#f2b6a4}
.pm-economy-row{margin-top:13px}.pm-economy-row>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:12px}
.pm-economy-row span{font-variant-numeric:tabular-nums;color:#c6d6c2}
.pm-economy-track{margin-top:6px;height:8px;background:#10261d;border-radius:8px;overflow:hidden}
.pm-economy-track i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#7ca46a,#c4dda0)}
.pm-economy-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}
.pm-economy-metrics>div{display:flex;flex-direction:column;gap:6px;background:#10291f;border:1px solid #537251;border-radius:11px;padding:11px;min-width:0}
.pm-economy-metrics small{font-size:11px;color:#b9cbb5}.pm-economy-metrics b{font-size:16px;overflow-wrap:anywhere}
.pm-economy-hint{font-size:12px;line-height:1.45;padding:11px;margin:12px 0 0;border-radius:10px;background:#223e2e}
.pm-economy-note{font-size:11px;margin-top:11px}

.pm-waste-sale{border-color:#8fa76e!important}

/* V3.87: order offer inventory availability */
.pm-offer-stock{padding:11px 12px;margin:12px 0;border-radius:12px;border:1px solid #748b65;background:#142b21}
.pm-offer-stock.complete{border-color:#a8ce81;background:#203d2a}
.pm-offer-stock-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px}
.pm-offer-stock-top strong{white-space:nowrap;font-variant-numeric:tabular-nums;color:#d7e6c7}
.pm-offer-stock.complete .pm-offer-stock-top b{color:#c9eca5}
.pm-offer-stock-track{height:7px;margin:9px 0 7px;background:#0b1f18;border-radius:8px;overflow:hidden}
.pm-offer-stock-track i{display:block;height:100%;border-radius:8px;background:#a8c87e}
.pm-offer-stock small{display:block;font-size:11px;line-height:1.4;color:#bbceba}

/* V4.00: Kompakter ZA-Leitstand ohne Änderung an der Fabrikhalle */
.za-simple{display:flex;flex-direction:column;gap:14px}.za-simple h3{margin:0;font-size:19px}.za-heading,.za-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.za-heading{flex-wrap:wrap}.za-row{font-size:14px}.za-row span{color:#bdcabe}.za-pill{font-size:12px;font-weight:700;padding:6px 10px;border:1px solid #728a75;border-radius:20px;white-space:nowrap}.za-pill.good{background:#36583a;color:#d2f3b7}.za-pill.warn{background:#5c4c29;color:#ffe5a2}.za-pill.neutral{background:#304b3c;color:#d6e2d7}.za-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.za-metric{display:flex;flex-direction:column;gap:3px;background:#172f26;border:1px solid #536c59;border-radius:14px;padding:13px 11px;min-width:0}.za-metric small{font-size:12px;color:#c1d1c4}.za-metric strong{font-size:clamp(23px,5vw,31px);line-height:1.15;font-variant-numeric:tabular-nums}.za-metric span,.za-tank small{font-size:12px;color:#bdcabe}.za-track{height:11px;background:#10261c;border:1px solid #647d62;border-radius:20px;overflow:hidden}.za-track i{display:block;height:100%;background:#a4c77b;border-radius:20px}.za-tank{display:flex;flex-direction:column;gap:9px;background:#19362b;border-radius:14px;padding:14px}.za-notice{display:flex;flex-direction:column;gap:5px;border-radius:13px;padding:13px;background:#244635;border:1px solid #577858}.za-notice.warn{background:#443b28;border-color:#9b824e}.za-notice span{font-size:13px;color:#d0dbcd}.za-details{border-top:1px solid #5a725f;padding-top:12px}.za-details summary{cursor:pointer;font-weight:650;padding:5px 0}.za-details[open] summary{margin-bottom:12px}.za-upgrade{border:1px solid #57715e;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px;background:#203c2f}.za-upgrade>small{color:#bdcabe}.za-upgrade-value{font-variant-numeric:tabular-nums;font-size:16px}.za-sub{margin:0}.za-simple button{min-height:44px}

/* V4.03: honest before/after values for every individual machine upgrade */
#sheet .pm-upgrade-card{padding:16px;margin-bottom:12px}
.pm-upgrade-top{display:flex;justify-content:space-between;gap:12px;align-items:start}
.pm-upgrade-top h3{margin:0 0 4px!important}
.pm-upgrade-top .muted{margin:0;max-width:36ch}
.pm-upgrade-price{white-space:nowrap;font-size:14px;color:#f1f5e9}
.pm-upgrade-metrics{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:15px 0 12px;font-size:14px;font-variant-numeric:tabular-nums}
.pm-upgrade-metrics>span{color:#c4d1bd}
.pm-upgrade-metrics>b{color:#d6e7c2;font-size:18px}
.pm-upgrade-metrics>strong{color:#b5f078;font-size:16px}
.pm-upgrade-metrics>em{font-size:11px;font-style:normal;color:#c5ed9e;border:1px solid #597e44;border-radius:99px;padding:4px 8px;background:#1a4529}
.pm-upgrade-card>.action{min-width:132px}
.pm-upgrade-section{font-size:15px;margin:18px 0 10px}

/* V4.05: consistent visual upgrade identity across all machines, ZA and packing */
#sheet .pm-upgrade-card,#sheet .za-upgrade,#sheet .pm-inline-upgrade{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:start;gap:12px}
#sheet .pm-upgrade-icon{display:grid;place-items:center;width:52px;height:52px;flex:none;border:1px solid #638b65;border-radius:13px;background:linear-gradient(145deg,#244b39,#102d24);font-size:27px;line-height:1;box-shadow:inset 0 1px 0 #ffffff17}
#sheet .pm-upgrade-content,#sheet .za-upgrade-content{min-width:0;width:100%}
#sheet .pm-upgrade-card .pm-upgrade-top{flex-wrap:wrap}
#sheet .pm-upgrade-card .pm-upgrade-metrics{margin:10px 0}
#sheet .za-upgrade{padding:14px 10px}
#sheet .pm-inline-upgrade{padding:14px}
@media(max-width:440px){#sheet .pm-upgrade-card,#sheet .za-upgrade,#sheet .pm-inline-upgrade{grid-template-columns:42px minmax(0,1fr);gap:9px}#sheet .pm-upgrade-icon{width:42px;height:42px;font-size:23px}}

/* V4.10: MBA – die wichtigsten Materialkennzahlen auf einen Blick. */
.pm-mba-supply{padding:14px 15px}.pm-mba-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:12px}.pm-mba-head h3{margin:0}.pm-mba-product{font-size:11px;color:#b7c8ac}.pm-mba-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:9px}.pm-mba-metrics>div{padding:12px;background:#112d22;border:1px solid #577054;border-radius:12px}.pm-mba-metrics span{display:block;color:#b8c9b0;font-size:11px;margin-bottom:5px}.pm-mba-metrics strong{font-size:23px;color:#d2ebae;font-variant-numeric:tabular-nums;white-space:nowrap}.pm-mba-metrics small{font-size:12px;font-weight:500}.pm-mba-inventory{display:flex;flex-wrap:wrap;gap:6px 15px;margin-top:12px;font-size:12px;color:#b7c8ae}.pm-mba-inventory b{color:#e9f1df;font-weight:600}.pm-mba-self{opacity:.85}.pm-mba-details{margin-top:13px;border-top:1px solid #50654e;padding-top:11px}.pm-mba-details summary{cursor:pointer;color:#c5d8b6;font-size:12px;list-style-position:inside}.pm-mba-details[open] summary{margin-bottom:10px}
