@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/unbounded-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffe3;
  --panel: #ffffff;
  --soft: #fffdf3;
  --soft-2: #fffdf3;
  --line: #e8e9e0;
  --line-strong: #cfcdbc;
  --text: #0a0a0a;
  --muted: #65665f;
  --muted-2: #74766c;
  --accent: #ff3d00;
  --accent-soft: #fcdbd4;
  --pink: #f586be;
  --pink-soft: #fde8f3;
  --cyan: #3fb2ab;
  --cyan-soft: #def3f1;
  --green: #33561a;
  --green-soft: #e3f1cd;
  --yellow: #5e4d00;
  --yellow-soft: #fff0b5;
  --shadow: none;
  --radius: 12px;
  --table-head: #f4e9d4;
  --table-head-text: #342717;
  --table-rule: #3b2d26;
  --shelf: #b68b55;
  --rail: #fffdf3;
  --tone-pink: #f586be;
  --tone-purple: #b184ff;
  --tone-yellow: #fdc61e;
  --tone-orange: #ff7840;
  --tone-teal: #3fb2ab;
  --tone-beige: #e4c992;
  --tone-green: #9dcb5a;
  --tone-blue: #7eb8ee;
}

body { font-family: 'Unbounded', ui-sans-serif, system-ui, sans-serif; font-weight: 300; }
h1, h2, h3, .panel-title { font-weight: 600; letter-spacing: 0; }
.stat-value, .order-value, .ga-value, .receivable-total, .hero-value, .overview-metric-value, .sales-kpi strong, .production-summary-card strong, .production-cost-summary-card strong { font-weight: 700; letter-spacing: 0; }

.app { grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }

.masthead {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: 24px 28px 0;
  border-bottom: 5px solid var(--shelf);
  background: linear-gradient(180deg, #e8ede9 0%, #ecf0e5 22%, #f3f1e0 52%, #fcf8e7 84%, #fffaee 100%);
}
.masthead-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.masthead-logo { flex: 0 0 auto; display: block; width: 96px; height: auto; }
.masthead-title {
  flex: 1 1 280px;
  color: var(--accent);
  font-size: clamp(22px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.05;
  text-align: center;
}
.masthead-spacer { flex: 0 0 96px; height: 1px; }
.masthead-frieze { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 30px -66px 0; }
.masthead-frieze img { flex: 0 0 auto; display: block; width: auto; }
.frieze-can { height: 49px; filter: drop-shadow(0 3px 2px rgba(60, 40, 20, .18)); }
.frieze-animal { height: 44px; }
.frieze-animal.tall { height: 52px; }
.frieze-animal.low { height: 40px; }

.sidebar {
  position: relative;
  z-index: 20;
  box-sizing: border-box;
  width: 62px;
  height: auto;
  margin-top: 22px;
  padding: 10px 8px 10px 6px;
  overflow: hidden;
  border-right: 0;
  border-radius: 0 18px 18px 0;
  background: var(--rail);
  box-shadow: 0 1px 8px rgba(70, 50, 20, .14);
  transition: width .18s ease;
}
.sidebar:hover, .sidebar:focus-within { width: 252px; box-shadow: 0 6px 22px rgba(70, 50, 20, .22); }
.rail { display: flex; flex-direction: column; gap: 8px; width: 238px; }
.rail-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.rail-item:hover { background: #f4e9d4; }
.rail-tile { flex: 0 0 48px; box-sizing: border-box; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--tone-pink); }
.rail-item[data-tone="green"] .rail-tile { background: var(--tone-green); }
.rail-item[data-tone="beige"] .rail-tile { background: var(--tone-beige); }
.rail-item[data-tone="orange"] .rail-tile { background: var(--tone-orange); }
.rail-item[data-tone="yellow"] .rail-tile { background: var(--tone-yellow); }
.rail-item[data-tone="blue"] .rail-tile { background: var(--tone-blue); }
.rail-item[data-tone="teal"] .rail-tile { background: var(--tone-teal); }
.rail-item[aria-current="page"] .rail-tile { border: 3px solid #1f0e0a; }
.rail-item[aria-current="page"] .rail-label { font-weight: 700; }
.rail-label { white-space: nowrap; }
.rail-item:focus-visible { outline: 3px solid #1f0e0a; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
.rail-disc { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: #fffdf3; color: var(--table-rule); }
.rail-disc img { display: block; width: 34px; height: 34px; }
.rail-disc svg { width: 20px; height: 20px; }

.main { padding: 22px 28px 64px 22px; }
.source-line { margin: 0 0 14px; color: #676652; font-size: 14px; font-weight: 300; }
.source-line strong { color: var(--text); font-weight: 600; }
.topbar .eyebrow { display: none; }
.topbar h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.module-kicker { color: var(--muted); font-weight: 400; letter-spacing: .14em; }
.panel { border-color: #efecd9; box-shadow: none; }
.control, .toolbar-button { min-height: 44px; border-color: var(--table-rule); border-radius: 12px; background: var(--soft); color: var(--text); }
.toolbar-button.primary { border-color: var(--accent); background: var(--accent); color: #ffffff; }
a { color: var(--accent); }

.production-plan-pane .production-brief { padding: 0; border: 0; background: transparent; box-shadow: none; }
.production-plan-pane .production-brief::before,
.production-plan-pane .production-brief::after { content: none; }
.production-plan-pane .production-brief-kicker { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .14em; }
.production-plan-pane .production-brief h3 { margin: 6px 0 4px; color: var(--text); font-size: 18px; font-weight: 600; }
.production-plan-pane .production-brief-lead { color: var(--muted); font-size: 13px; font-weight: 300; }
.production-plan-pane .production-metrics { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.production-plan-pane .production-metric {
  flex: 1 1 260px;
  display: block;
  min-height: 0;
  padding: 14px 18px 16px;
  border: 1px solid #f0eed9;
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}
.production-plan-pane .production-metric.soon { border-top-color: #d8a608; }
.production-plan-pane .production-metric.horizon { border-top-color: #3aa5b5; }
.production-plan-pane .production-metric-label { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .14em; }
.production-plan-pane .production-metric > strong { display: block; margin-top: 6px; color: var(--text); font-size: 26px; font-weight: 700; line-height: 1.1; }
.production-plan-pane .production-metric.urgent > strong { color: var(--accent); }
.production-plan-pane .production-metric-cost {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #636361;
  font-size: 12px;
}
.production-plan-pane .production-metric-cost strong { color: var(--text); font-size: 20px; font-weight: 600; }
.production-plan-pane .production-metric em { display: block; margin-top: 8px; color: #636361; font-size: 12px; font-style: normal; font-weight: 300; }

.production-plan-pane .production-warehouse { overflow: hidden; border: 1px solid #efecd9; border-radius: 12px; background: #ffffff; box-shadow: none; }
.production-plan-pane .production-warehouse-table { width: 100%; min-width: 1040px; font-variant-numeric: tabular-nums; }
.production-plan-pane .production-warehouse-table th {
  padding: 18px 12px 12px;
  border-bottom: 2px solid var(--table-rule);
  background: var(--table-head);
  color: var(--table-head-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: right;
  text-transform: uppercase;
  vertical-align: bottom;
}
.production-plan-pane .production-warehouse-table th.warehouse-product-heading,
.production-plan-pane .production-warehouse-table th.warehouse-status-heading { text-align: left; }
.production-plan-pane .production-warehouse-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  vertical-align: middle;
}
.production-plan-pane .production-warehouse-table td.warehouse-product-cell,
.production-plan-pane .production-warehouse-table td.warehouse-status-cell { text-align: left; }
.production-plan-pane .warehouse-number strong,
.production-plan-pane .warehouse-days-cell strong { font-size: inherit; font-weight: 500; }
.production-plan-pane .warehouse-production-cell strong { font-weight: 700; }
.production-plan-pane .warehouse-number small,
.production-plan-pane .warehouse-status-cell small { display: block; margin-top: 2px; color: #646560; font-size: 12px; font-weight: 300; }
.production-plan-pane .warehouse-cost-cell small { font-size: 11px; }
.production-plan-pane .muted-number,
.production-plan-pane .muted-number strong { color: #c4c6ba; }
.production-plan-pane .warehouse-product-content { display: flex; align-items: center; gap: 12px; }
.production-plan-pane .warehouse-product-cell .production-can-art {
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #ffffe3;
}
.production-plan-pane .warehouse-product-cell .production-can-art img,
.production-plan-pane .warehouse-product-cell .production-can-art svg { width: 38px; height: 38px; object-fit: contain; }
.production-plan-pane .warehouse-product-identity strong { display: block; color: var(--text); font-size: 14px; font-weight: 400; line-height: 1.25; }
.production-plan-pane .warehouse-product-identity small { display: block; color: #646560; font-size: 11px; font-weight: 300; }
.production-plan-pane .warehouse-days-cell { white-space: nowrap; }
.production-plan-pane .warehouse-days-meter { display: inline-block; width: 40px; height: 5px; margin-left: 8px; overflow: hidden; border-radius: 3px; background: #f0ebdf; vertical-align: middle; }
.production-plan-pane .warehouse-days-meter span { display: block; height: 100%; border-radius: 3px; background: #9dcb5a; }
.production-plan-pane .warehouse-days-meter.urgent span { background: #e22901; }
.production-plan-pane .warehouse-days-meter.soon span { background: #ffd441; }
.production-plan-pane .warehouse-days-meter.data span,
.production-plan-pane .warehouse-days-meter.phaseout span { background: #c4c6ba; }
.production-plan-pane .warehouse-status-badge { display: inline-block; padding: 3px 8px; border: 0; border-radius: 8px; background: #eeecdd; color: #55564e; font-size: 13px; font-weight: 600; white-space: nowrap; }
.production-plan-pane .warehouse-status-badge.urgent { background: #fcdbd4; color: #9f2c13; }
.production-plan-pane .warehouse-status-badge.soon { background: #fff0b5; color: #5e4d00; }
.production-plan-pane .warehouse-status-badge.calm { background: #e3f1cd; color: #33561a; }
.production-plan-pane .warehouse-task-link { color: var(--accent); font-weight: 600; white-space: nowrap; }

strong, b { font-weight: 600; }
.module-heading h2, .section-heading h2, .overview-empty h2, .widget-drawer-head h2, .auth-card h2,
.production-order-head h3, .production-plan-pane .production-brief h3,
.production-plan-pane .production-warehouse-head .panel-title,
.production-plan-pane .production-metric strong { letter-spacing: 0; }
.production-plan-pane .production-brief { overflow: visible; border-radius: 0; }
.production-plan-pane .production-metric.soon,
.production-plan-pane .production-metric.horizon { background: #ffffff; }
.production-plan-pane .production-warehouse-table td.muted-number { color: #c4c6ba; }
.production-plan-pane .warehouse-product-cell .production-can-art img { width: 100%; height: 100%; padding: 4px; background: #ffffe3; }
.production-plan-pane .warehouse-days-cell strong { display: inline; }
.production-plan-pane .warehouse-days-meter { margin: 0 0 0 8px; }
.production-plan-pane .warehouse-status-badge::before { content: none; }
.production-plan-pane .warehouse-task-link { min-height: 0; padding: 0; border: 0; background: transparent; font-size: 13px; }

.forecast-progress-fill.yellow, .seasonality-dot.high, .seasonality-meter-fill.high, .status i { background: var(--tone-yellow); }
.forecast-progress-fill.green, .sales-channel-fill.green, .status.ready i { background: var(--tone-green); }
.forecast-status.red { color: #9f2c13; }
.metric-status.demo, .delta.demo, .link:nth-child(2) .link-mark { color: #9c2f6b; }
.chart-source strong, .link:nth-child(3) .link-mark { color: #1f6f6a; }

.production-plan-toggle {
  min-height: 44px;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid var(--table-rule);
  border-radius: 12px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.production-table .warehouse-actions { justify-content: flex-start; }
.production-table .warehouse-action-button,
.production-table .warehouse-lifecycle-button { min-height: 32px; font-size: 11px; font-weight: 500; }

.production-plan-pane .warehouse-task-link:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .app { display: block; }
  .masthead { padding: 18px 16px 0; }
  .sidebar, .sidebar:hover, .sidebar:focus-within { width: max-content; max-width: 100%; margin: 12px 0 0; border-bottom: 0; }
  .rail { flex-direction: row; flex-wrap: wrap; width: auto; }
  .rail-item { width: 48px; }
  .rail-label { display: none; }
  .main { padding: 16px 16px 48px; }
}

/* ---------------------------------------------------------------------------
   Prognoza produkcji — lighter, data-first pass (same language as Wynik firmy
   and Sprzedaż): white panels, thin rules, ink numbers. Colour stays only on
   the status pill and the days meter, where it carries meaning.
   --------------------------------------------------------------------------- */
body[data-module="production"] .production-panel,
body[data-module="production"] .production-warehouse { border-color: #e8e9e0; border-radius: 10px; }

body[data-module="production"] .production-view-tabs { padding: 3px; border-color: #e8e9e0; border-radius: 999px; background: #fff; }
body[data-module="production"] .production-view-tab { border: 0; border-radius: 999px; background: transparent; font-size: 11px; font-weight: 500; color: #65665f; }
body[data-module="production"] .production-view-tab[aria-selected="true"],
body[data-module="production"] .production-view-tab.active { background: #0a0a0a; color: #fff; }
body[data-module="production"] .production-view-tab::before { display: none; }

body[data-module="production"] .production-brief-kicker { color: #65665f; font-size: 10px; font-weight: 500; letter-spacing: .02em; }
body[data-module="production"] .production-brief h3,
body[data-module="production"] .production-brief-title { font-size: 15px; font-weight: 600; }

body[data-module="production"] .production-metric { padding: 14px 16px; border: 1px solid #e8e9e0; border-radius: 10px; background: #fff; }
body[data-module="production"] .production-metric strong { color: #0a0a0a; font-size: 24px; font-weight: 600; }
body[data-module="production"] .production-metric-label { font-size: 10px; font-weight: 500; letter-spacing: .02em; text-transform: none; }
body[data-module="production"] .production-metric-cost { border-top: 1px dashed #e8e9e0; }
body[data-module="production"] .production-metric-cost strong { font-size: 15px; font-weight: 600; }

body[data-module="production"] .production-incoming:empty { display: none; }
body[data-module="production"] .production-incoming { border-color: #e8e9e0; border-left: 3px solid #fdc61e; border-radius: 8px; background: #fffbea; }
body[data-module="production"] .production-sticky-summary { border-color: #e8e9e0; border-radius: 8px; background: #fff; }

body[data-module="production"] .production-warehouse-head { padding: 14px 16px 12px; background: #fff; border-bottom: 1px solid #e8e9e0; }
body[data-module="production"] .production-warehouse-head h3,
body[data-module="production"] .production-warehouse-head .panel-title { font-size: 13px; font-weight: 600; }
body[data-module="production"] .production-warehouse-hint { font-size: 10.5px; }

body[data-module="production"] .production-warehouse-table { font-variant-numeric: tabular-nums; }
body[data-module="production"] .production-warehouse-table thead th {
  padding: 9px 10px;
  border-bottom: 1px solid #d9d7c8;
  background: #fff;
  color: #65665f;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
body[data-module="production"] .warehouse-row td,
body[data-module="production"] .warehouse-row th { padding: 8px 10px; border-bottom: 1px solid #e8e9e0; font-size: 12px; font-weight: 400; }
body[data-module="production"] .warehouse-row:last-child td,
body[data-module="production"] .warehouse-row:last-child th { border-bottom: 0; }
body[data-module="production"] .warehouse-product-identity strong,
body[data-module="production"] .warehouse-product-identity b { font-size: 12px; font-weight: 500; }
body[data-module="production"] .warehouse-number strong,
body[data-module="production"] .warehouse-number b { font-size: 12.5px; font-weight: 600; }
body[data-module="production"] .warehouse-number small,
body[data-module="production"] .warehouse-number span { color: #65665f; font-size: 10.5px; }
body[data-module="production"] .production-can-art { width: 30px; height: 30px; border-radius: 6px; background: transparent; }
body[data-module="production"] .warehouse-status-badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
body[data-module="production"] .warehouse-days-meter { height: 4px; background: #e8e9e0; }

