/* Układ Produkcji oparty na Dostawach. Logowanie i prawa pozostają wspólne. */
body[data-app="produkcja"] {
  --bg:#f4f7f5; --card:#fff; --text:#17221d; --muted:#68756d;
  --line:#dce5df; --accent:#1f7a4d; --soft:#e7f4ec; --danger:#b42318;
  --shell-header:var(--card); --shell-sidebar:var(--card);
  --shell-height:calc(72px + env(safe-area-inset-top)); --sidebar-width:248px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.production-layout {display:block;min-height:100dvh}
.production-topbar {
  position:sticky;top:0;z-index:100;display:flex;align-items:center;gap:20px;
  min-height:64px;padding:calc(10px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));
  background:var(--shell-header);border-bottom:1px solid var(--line);
}
.production-brand {display:flex;align-items:center;gap:12px;min-width:0}
.production-brand-mark {display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:10px;background:var(--accent)}
.production-brand-mark svg {width:24px;height:24px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.production-brand-copy {min-width:0;max-width:360px}
.production-brand-copy h1 {margin:0;font-size:20px;line-height:1.2;letter-spacing:normal}
.production-brand-copy small {display:block;margin-top:3px;font-size:12px;color:var(--muted)}
.production-brand-copy h1,.production-brand-copy small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-header-context {display:none;min-width:0;border-left:1px solid var(--line);padding-left:22px}
.production-header-context strong {font-size:18px}
.production-header-context time {color:var(--muted);font-size:13px}
.production-header-actions {margin-left:auto;display:flex;align-items:center;gap:9px;flex-shrink:0}
.production-header-actions .theme-btn {display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:10px;background:transparent;color:var(--muted)}
.production-header-actions .theme-btn:hover {background:var(--soft);color:var(--accent)}
.production-header-actions svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.production-header-actions .production-sun {display:none}
.production-logout {min-height:44px;padding:8px 12px;font-size:13px;font-weight:800;border:1px solid #b63b3147;border-radius:9px;background:#fff1ef;color:var(--danger)}
.production-logout:hover {background:#ffe5e1;border-color:#b63b3173}
.production-sidebar {
  position:fixed;inset:auto 0 0;width:100%;height:auto;z-index:110;
  display:block;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  border:0;border-top:1px solid var(--line);background:var(--shell-sidebar);overflow:hidden;
}
.production-nav-heading {display:none;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.production-sidebar .nav {display:flex;flex-direction:row;gap:5px;padding:3px;max-width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:thin;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.production-sidebar .nav a {
  position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;
  gap:5px;flex:0 0 auto;min-width:82px;min-height:62px;padding:8px 12px;
  font-size:12px;font-weight:700;border-radius:10px;color:var(--muted);scroll-snap-align:start;
}
.production-sidebar .nav a::before {
  content:"";width:23px;height:23px;flex:0 0 23px;background:currentColor;
  -webkit-mask:var(--nav-icon) center/contain no-repeat;mask:var(--nav-icon) center/contain no-repeat;
}
.production-sidebar .nav a[href="https://panel.zamvinex.pl/"] {--nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E")}
.production-sidebar .nav a[href="https://dostawy.zamvinex.pl/"] {--nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h10v9H3zM13 10h4l3 3v3h-7z'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E")}
.production-sidebar .nav a[href="https://produkcja.zamvinex.pl/"] {--nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V10l6 3V7l6 3V3h5v18H3ZM7 17h1m4 0h1m4 0h1'/%3E%3C/svg%3E")}
.production-sidebar .nav a[href="https://handel.zamvinex.pl/"] {--nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2 12h12l2-9H6'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E")}
.production-sidebar .nav a:hover,.production-sidebar .nav a.active {background:var(--soft);color:var(--accent)}
.production-sidebar .nav a.active {box-shadow:inset 0 -3px 0 var(--accent)}
.production-sidebar .aside-bottom {display:none}
.production-layout .main {min-width:0;width:100%;max-width:1120px;margin:0 auto;padding:22px max(20px,env(safe-area-inset-right)) calc(112px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
.production-layout #content {min-width:0}
.production-layout .status {text-align:left;font-size:14px}
@media(min-width:1200px) {
  body[data-app="produkcja"] {--bg:#f4f1e9;--card:#fffdfa;--text:#263326;--muted:#707970;--line:#ddd6c8;--accent:#2f6039;--soft:#e6ede3;--danger:#b63b31;--shell-header:#fff;--shell-sidebar:#fbfaf6}
  .production-layout {padding:var(--shell-height) 0 0 var(--sidebar-width)}
  .production-topbar {position:fixed;inset:0 0 auto;height:var(--shell-height);padding:env(safe-area-inset-top) max(26px,env(safe-area-inset-right)) 0 max(26px,env(safe-area-inset-left));gap:22px}
  .production-brand-mark {width:46px;height:46px;flex-basis:46px}
  .production-brand-mark svg {width:25px;height:25px}
  .production-brand-copy h1 {font-size:21px}
  .production-brand-copy small {font-size:13px}
  .production-header-context {display:flex;flex-direction:column;gap:4px}
  .production-sidebar {inset:var(--shell-height) auto 0 0;width:var(--sidebar-width);height:auto;display:flex;flex-direction:column;gap:0;padding:22px 12px max(18px,env(safe-area-inset-bottom));border-top:0;border-right:1px solid var(--line);overflow-y:auto;overflow-x:hidden}
  .production-nav-heading {display:block;padding:0 12px 18px}
  .production-sidebar .nav {flex-direction:column;overflow:visible;flex-shrink:0;gap:6px}
  .production-sidebar .nav a {width:100%;min-width:0;min-height:48px;flex-direction:row;justify-content:flex-start;gap:15px;padding:12px;font-size:15px;white-space:normal}
  .production-sidebar .nav a.active {box-shadow:inset 3px 0 0 var(--accent),0 0 0 1px #7fa087}
  .production-sidebar .aside-bottom {display:block;flex-shrink:0;margin: auto 6px 0;padding-top:18px;border-top:1px solid var(--line)}
  .production-sidebar .aside-bottom strong {line-height:1.4}
  .production-sidebar .aside-bottom small {display:block;margin-top:4px;font-size:12px}
  .production-sidebar .nav {margin-bottom:24px}
  .production-layout .main {max-width:none;padding:30px 32px calc(56px + env(safe-area-inset-bottom))}
  .production-layout #content,.production-layout #globalStatus {max-width:1120px;margin-inline:auto}
}
@media(min-width:1600px) {body[data-app="produkcja"] {--sidebar-width:272px}.production-layout .main {padding-inline:48px}}
@media(max-width:639px) {
  .production-topbar {gap:9px;padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}
  .production-brand {gap:9px}
  .production-brand-mark {width:34px;height:34px;flex-basis:34px}
  .production-brand-copy h1 {font-size:17px}
  .production-brand-copy small {font-size:11px}
  .production-header-actions {gap:6px}
  .production-layout .main {padding:16px max(12px,env(safe-area-inset-right)) calc(108px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
}
@media(max-width:359px) {.production-brand-mark {display:none}}
body[data-app="produkcja"].dark {
  --bg:#101511;--card:#18201a;--text:#edf3ee;--muted:#a8b4ab;
  --line:#354139;--accent:#72c78d;--soft:#243c2b;--danger:#ff8a82;
  --shell-header:#151c17;--shell-sidebar:#151c17;
}
.dark .production-logout {background:#321d1b;color:#ffaaa2;border-color:#70403b}
.dark .production-logout:hover {background:#43231f}
.dark .production-header-actions .production-moon {display:none}
.dark .production-header-actions .production-sun {display:block}
