:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#202d2a;background:#f5f6f3;font-size:15px;line-height:1.6}*{box-sizing:border-box}body{margin:0}header{height:86px;border-bottom:1px solid #e1e5dd;display:flex;justify-content:space-between;align-items:center;padding:0 max(5vw,24px);background:#fff}a{color:inherit;text-decoration:none}.brand{font-size:20px;font-weight:650;display:flex;gap:10px;align-items:center}.logo{display:inline-grid;place-items:center;background:#ff5a19;color:white;width:34px;height:36px;border-radius:9px;font-size:28px}.muted{color:#89918c;font-size:16px;font-weight:400}main{max-width:1160px;margin:50px auto;padding:0 24px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;gap:20px}h1{font-size:36px;line-height:1.2;letter-spacing:-1.3px;margin:12px 0}h2{font-size:23px;letter-spacing:-.6px;margin:5px 0 14px}p{color:#748079;margin:10px 0 20px}.eyebrow{font-size:11px;letter-spacing:1.6px;font-weight:700;color:#6d7b6e}.card{background:#fff;border:1px solid #e0e5dc;border-radius:16px;padding:28px;margin-bottom:22px;box-shadow:0 3px 12px #22332203}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.stats .card{padding:23px;display:flex;flex-direction:column;gap:8px}.stats span,small{color:#788379;font-size:12px}.stats strong{font-size:21px;line-height:1.3}.stats form{margin-top:6px}.pill,.badge{background:#edf3e8;color:#4e6842;border-radius:24px;padding:7px 13px;white-space:nowrap;font-size:12px}.checks{display:flex;flex-direction:column;gap:10px;margin-bottom:24px}label{display:block;font-size:13px;font-weight:550;margin:10px 0}input,textarea{display:block;border:1px solid #d8dfd4;border-radius:8px;padding:11px 13px;width:100%;font:inherit;color:#29342b;background:#fcfdfb;margin-top:6px}input:focus,textarea:focus{outline:2px solid #91aa7e;outline-offset:2px}textarea{min-height:98px;resize:vertical;line-height:1.7}input[type=checkbox]{display:inline-block;width:17px;height:17px;vertical-align:middle;margin:0 8px 2px 0;accent-color:#536c45}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.grid.two{grid-template-columns:1fr 2fr}.days{display:flex;gap:18px;flex-wrap:wrap}.days label{font-size:12px}button{font:inherit;font-size:13px;font-weight:600;border:0;border-radius:8px;background:#2e4333;color:#fff;padding:12px 19px;cursor:pointer}button:hover{background:#496146}.subtle{background:#f0f3ed;color:#384d35;border:1px solid #dfe5da}.subtle:hover{background:#e2e9dc}.rule{border-top:1px solid #e7eae3;padding:19px 0}.rule:last-child{padding-bottom:0}summary{cursor:pointer;font-weight:600;font-size:15px}summary span:not(.badge){float:right;color:#84917b;font-size:11px;font-weight:400}.inline{font-weight:400}.save{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:15px}.save p{font-size:12px;max-width:650px;margin:0}.save button{white-space:nowrap}.event{border-top:1px solid #e7eae3;padding:16px 0}.event summary{font-size:13px}.badge{font-size:10px;margin-right:8px;padding:4px 8px}.event time{float:right;font-size:10px;color:#8c958b;font-weight:400}.event small{overflow-wrap:anywhere}.event p{font-size:13px;margin-top:15px}blockquote,.preview{border-left:3px solid #a8ba99;background:#f5f7f1;padding:16px 20px;margin:18px 0;font-size:13px;white-space:normal}.empty{text-align:center;color:#8b9488;padding:35px}.alert{padding:15px 20px;border-radius:10px;background:#e7efdf;margin-bottom:24px;font-size:13px}.error{background:#fff0e8;color:#9c432b}.login{max-width:470px;margin:60px auto;padding:40px}.login button{width:100%;margin-top:20px}footer{text-align:center;color:#98a08f;font-size:11px;padding:30px 20px 45px}@media(max-width:760px){.stats,.grid,.grid.two{grid-template-columns:1fr}.intro,.save{align-items:flex-start;flex-direction:column}h1{font-size:29px}.card{padding:20px}.muted{display:none}.event time{float:none;display:block;margin-top:7px}.days{gap:10px}main{margin:28px auto;padding:0 16px}}

select{display:block;width:100%;border:1px solid #d8dfd4;border-radius:8px;padding:12px;margin-top:6px;background:#fcfdfb;font:inherit;color:#29342b}.knowledge-text{white-space:pre-wrap;overflow-wrap:anywhere}.event form{margin-top:15px}

/* Nawigacja panelu */
.tabs{display:flex;gap:6px;margin-left:auto;margin-right:18px}
.tabs a{font-size:13px;font-weight:600;color:#5d6b60;padding:8px 14px;border-radius:8px}
.tabs a:hover{background:#f0f3ed}
.tabs a.active{background:#edf3e8;color:#2e4333}
.hidden{display:none!important}

/* Pulpit zysku */
main.wide{max-width:1360px;margin-top:30px}
.dash-top{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.dash-top h1{font-size:28px;margin:0}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.toolbar select{width:auto;margin:0;padding:10px 12px;font-size:13px}
.live{font-size:12px;font-weight:600;color:#3f6b33;white-space:nowrap}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.subtabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid #e1e5dd;margin-bottom:18px}
.subtabs button{background:none;color:#5d6b60;border-radius:8px 8px 0 0;padding:10px 14px;border-bottom:2px solid transparent}
.subtabs button:hover{background:#f0f3ed}
.subtabs button.on{color:#2e4333;border-bottom-color:#2e4333;background:none}
.banner{border:1px solid #d9e6cf;background:#eef5e9;color:#2f4a2a;border-radius:12px;padding:12px 18px;font-size:13px;margin-bottom:18px}
.banner.ok::before{content:"✓ ";font-weight:700}
.banner.warn{background:#fff6e5;border-color:#f1dfb5;color:#7a5512}
.banner.info{background:#f3f5f1;border-color:#e0e5dc;color:#4d5a50}
.banner a,.alert a{text-decoration:underline;font-weight:600}
.alert.warn{background:#fff6e5;color:#7a5512}
.calc .card{padding:22px 24px}
.calc h2{font-size:18px;letter-spacing:-.3px;margin:2px 0 10px}
.calc h3{font-size:15px;margin:24px 0 4px}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.section-head h2{margin:0}
.dash-grid{display:grid;gap:18px;margin-bottom:0}
.dash-grid.wide-left{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
.dash-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.dash-grid>.card,.dash-grid>div>.card{margin-bottom:18px}
.kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}
.kpi{border:1px solid #e0e5dc;border-radius:14px;padding:16px 18px;display:flex;flex-direction:column;gap:4px;background:#fff}
.kpi span{font-size:12px;color:#6d7b6e;display:flex;justify-content:space-between;gap:6px}
.kpi span b{font-weight:600;color:#536c45;font-size:11px}
.kpi strong{font-size:24px;line-height:1.25;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
.kpi small{font-size:12px}
.kpi.accent{border:2px solid #536c45}
.kpi.pos strong{color:#3f6b33}
.kpi.neg strong{color:#b23d26}
.kpis .empty{grid-column:1/-1}
.legend{display:flex;align-items:center;gap:6px}
.sw{display:inline-block;width:10px;height:10px;border-radius:2px;margin-left:8px}
.sw.rev{background:#9dbb86}.sw.prof{background:#2e4333}
.chart{position:relative}.chart svg{width:100%;height:auto;display:block;overflow:visible}
.chart .grid{stroke:#eceee8;stroke-width:1;stroke-dasharray:3 4}.chart .grid.zero{stroke:#d5dbd0;stroke-dasharray:none}
.chart .ax{font-size:11px;fill:#89918c}
.chart .val{font-size:13px;font-weight:650;fill:#29342b;font-variant-numeric:tabular-nums}.chart .val.big{font-size:15px;font-weight:750}.chart .lbl{font-size:12px;fill:#4f5b52;font-weight:550}
.b-hit{fill:transparent}
.b-rev{fill:#c9d8bd}.b-prof{fill:#536c45}.b-loss{fill:#c4553c}.b-cost{fill:#d98c75}.b-rev-strong{fill:#2e4333}
g:hover .b-rev{fill:#b5c9a6}
.where-row{margin:4px 0 12px}
.where-head{display:flex;justify-content:space-between;gap:10px;font-size:13px}
.where-head em{font-style:normal;color:#89918c;font-size:12px;margin-left:6px}
.track{height:7px;background:#eef1eb;border-radius:6px;overflow:hidden;margin-top:5px}
.track i{display:block;height:100%;border-radius:6px;width:0}
.track i{transition:width .5s cubic-bezier(.2,.8,.2,1)}
.fill-goods,.c-goods{background:#5b7c99;stroke:#5b7c99}.fill-comm,.c-comm{background:#ff7a3d;stroke:#ff7a3d}.fill-ads,.c-ads{background:#e7b04a;stroke:#e7b04a}.fill-ship,.c-ship{background:#8c7bb8;stroke:#8c7bb8}.fill-pack,.c-pack{background:#b9b2a6;stroke:#b9b2a6}.fill-keep,.c-keep{background:#536c45;stroke:#536c45}.fill-loss,.c-loss{background:#c4553c;stroke:#c4553c}.fill-cost{background:#6d7b6e}
.where-row:last-of-type{border-top:1px solid #e1e5dd;padding-top:12px;font-weight:650}
.seg{display:inline-flex;border:1px solid #dfe5da;border-radius:9px;padding:2px;background:#f5f7f2}
.seg button{background:none;color:#5d6b60;padding:6px 11px;font-size:12px;border-radius:7px}
.seg button.on{background:#2e4333;color:#fff}
.list{list-style:none;margin:6px 0 0;padding:0}
.list li{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #eef1eb}
.list li:last-child{border-bottom:0}
.list li>div{display:flex;flex-direction:column;min-width:0}
.list .name{font-size:13px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list .r{align-items:flex-end;flex-shrink:0}
.list.compact li{padding:6px 0}
.kv{margin:4px 0 10px}
.kv div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #eef1eb;font-size:13px}
.kv dt{color:#5d6b60}.kv dd{margin:0;font-variant-numeric:tabular-nums;font-weight:550}
.kv div.total{border-bottom:0;border-top:1px solid #d8dfd4;font-weight:650}
.ok-line{color:#3f6b33;font-size:13px}
button.link,a.link{background:none;border:0;padding:0;color:#536c45;font-weight:600;font-size:12px;cursor:pointer}
button.link:hover{background:none;text-decoration:underline}
.search{max-width:320px;margin:0}
.row-tools{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.row-tools .inline{margin:0}
.inline-select{display:flex;align-items:center;gap:8px;margin:0}
.inline-select select{margin:0;width:auto;padding:8px 10px}
.grid.four{grid-template-columns:repeat(4,1fr);gap:4px 20px}
.narrow{max-width:360px}
.table-wrap{overflow-x:auto;margin:6px 0 14px;-webkit-overflow-scrolling:touch}
.table-wrap.tall{max-height:620px;overflow-y:auto}
.table-wrap.tall thead th{position:sticky;top:0;background:#fff;z-index:1}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;font-size:11px;font-weight:650;color:#6d7b6e;padding:9px 10px;border-bottom:1px solid #e1e5dd;white-space:nowrap}
td{padding:8px 10px;border-bottom:1px solid #eef1eb;white-space:nowrap;font-variant-numeric:tabular-nums}
td.wrap{white-space:normal;min-width:220px;max-width:380px}
td small{display:block;color:#89918c;font-size:11px;font-weight:400}
td code{font-size:12px;color:#5d6b60}
.muted{color:#89918c}
table.edit td{padding:4px 6px 4px 0;border:0}
table.edit input{margin:0;padding:8px 10px;min-width:96px}
table.edit td:first-child input{min-width:240px}
table.edit tr.missing input[aria-label="Koszt jednostkowy"],table.edit tr.missing input[aria-label="Twój koszt"]{border-color:#e9c27a;background:#fffaf0}
table.report td:not(:first-child),table.report th:not(:first-child){text-align:right}
table.report tbody tr:hover{background:#f8faf6}
tr.sum td{font-weight:650;background:#f7f9f5}
tr.total td{font-weight:700;font-size:15px;border-top:2px solid #2e4333;border-bottom:0}
tr.info td{color:#8b9488;font-size:12px}
tfoot td{font-weight:700;border-top:2px solid #e1e5dd;background:#fafbf8}
tr.current td{background:#f5f8f1}
tr.best td:first-child::after{content:" ★";color:#536c45}
.pos{color:#3f6b33}
.neg{color:#b23d26}
tr.pos td.num,tr.neg td.num{font-weight:700}
td.cell.pos{background:#eef5e9}
td.cell.neg{background:#fdf0ea}
td.cell.top{font-weight:700;box-shadow:inset 0 0 0 2px #91aa7e}
.badge.warn{background:#fff1d6;color:#8a5d0c}
.icon{padding:6px 11px;font-size:15px;line-height:1}
@media(max-width:1100px){.kpis{grid-template-columns:repeat(3,1fr)}.dash-grid.wide-left,.dash-grid.three{grid-template-columns:1fr}.grid.four{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){header{height:auto;flex-wrap:wrap;gap:10px;padding:14px 16px}.tabs{order:3;width:100%;margin:0}.grid.four,.kpis{grid-template-columns:1fr 1fr}.kpi strong{font-size:19px}.dash-top h1{font-size:23px}.subtabs{flex-wrap:nowrap;overflow-x:auto}.subtabs button{white-space:nowrap}.search{max-width:none}}
@media(max-width:420px){.kpis,.grid.four{grid-template-columns:1fr}}
table.report td.wrap{text-align:left}
.steps{margin:4px 0 14px;padding-left:20px;font-size:13px;color:#4d5a50}
.steps li{margin:4px 0}
#billing-status .banner{margin:6px 0 12px}
.kv dt small{display:block;color:#89918c;font-size:11px}

/* Nowoczesne wykresy */
.st-rev-a{stop-color:#9dbb86;stop-opacity:.45}.st-rev-b{stop-color:#9dbb86;stop-opacity:0}
.st-prof-a{stop-color:#2e4333;stop-opacity:.28}.st-prof-b{stop-color:#2e4333;stop-opacity:0}
.a-rev{fill:url(#g-rev)}.a-prof{fill:url(#g-prof)}
.l-rev{fill:none;stroke:#86a86f;stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.l-prof{fill:none;stroke:#2e4333;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.chart .avg{stroke:#b9c4b1;stroke-dasharray:6 5;stroke-width:1.2}.chart .avg-t{font-size:10.5px;fill:#8a9883}
.chart .pt{fill:#fff;stroke:#86a86f;stroke-width:1.6}
.chart .cross{stroke:#2e4333;stroke-opacity:.35;stroke-width:1;stroke-dasharray:3 3}
.chart .dot-rev{fill:#fff;stroke:#86a86f;stroke-width:2.5}.chart .dot-prof{fill:#fff;stroke:#2e4333;stroke-width:2.5}
.chart .hit{fill:transparent;cursor:crosshair}
.chart .conn{stroke:#c7cec2;stroke-dasharray:4 4;stroke-width:1.2}
.chart .wf rect{transition:opacity .15s}.chart .wf:hover rect{opacity:.85}
.ws-rev{stop-color:#3c5a40}.ws-goods{stop-color:#6d8fad}.ws-comm{stop-color:#ff8a52}.ws-ship{stop-color:#9d8dc6}.ws-pack{stop-color:#c7c1b6}.ws-fixed{stop-color:#a8b0a6}.ws-keep{stop-color:#5f7d4f}.ws-loss{stop-color:#d0634a}
.ws-b{stop-opacity:.72}
.tip{position:absolute;pointer-events:none;background:rgba(32,45,42,.94);color:#fff;border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.5;min-width:190px;box-shadow:0 10px 30px rgba(20,30,25,.22);backdrop-filter:blur(6px);z-index:5}
.tip b{display:block;font-size:12.5px;margin-bottom:4px;text-transform:capitalize}
.tip span{display:flex;align-items:center;gap:6px;justify-content:space-between;color:#d6ded2}
.tip span strong{color:#fff;margin-left:auto;font-variant-numeric:tabular-nums}
.tip .sw{margin-left:0}.tip strong.neg{color:#ffb4a3}
.kpi{position:relative;overflow:hidden;transition:box-shadow .2s,transform .2s}
.kpi:hover{box-shadow:0 8px 24px rgba(34,51,34,.08);transform:translateY(-1px)}
.spark{display:block;width:100%;height:34px;margin-top:6px}
.spark .sl{fill:none;stroke-width:1.8;vector-effect:non-scaling-stroke}.spark .sa{opacity:.16}
.sp-rev .sl{stroke:#86a86f}.sp-rev .sa{fill:#86a86f}
.sp-prof .sl{stroke:#2e4333}.sp-prof .sa{fill:#2e4333}
.sp-cost .sl{stroke:#d98c75}.sp-cost .sa{fill:#d98c75}
.sp-n .sl{stroke:#5b7c99}.sp-n .sa{fill:#5b7c99}
.where-wrap{display:flex;flex-direction:column;align-items:center;gap:14px;margin:4px 0 8px}.where-bars{width:100%}
.where-wrap .where-head span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.where-wrap .where-head span:last-child{white-space:nowrap}
.donut{width:170px;height:170px;display:block}
.donut .ring{fill:none;stroke:#eef1eb;stroke-width:14}
.donut .dseg{fill:none;stroke-width:14;stroke-linecap:butt;transition:stroke-width .15s}.donut .dseg:hover{stroke-width:17}
.donut .d-val{font-size:19px;font-weight:750;fill:#202d2a;letter-spacing:-.5px}.donut .d-sub{font-size:10px;fill:#89918c}
@media(max-width:760px){.tip{min-width:160px}}
.chart-card{display:flex;flex-direction:column}.chart-card #chart{flex:1;min-height:0}
/* Telefon: nic nie może rozepchnąć strony szerzej niż ekran */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.dash-grid>*,.kpis>*,.card,.view{min-width:0}
.list li>div:first-child{flex:1 1 auto}
@media(max-width:1100px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.dash-grid.wide-left,.dash-grid.three{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.section-head .seg{max-width:100%;overflow-x:auto}.list .name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}
@media(max-width:420px){.kpis{grid-template-columns:minmax(0,1fr)}}
.chart .trackbar{fill:#f0f2ed}
#billing-card code,.diag code{overflow-wrap:anywhere;word-break:break-word}.diag{font-size:12px;color:#6d7b6e;margin:10px 0 0}.diag code{background:#f0f3ed;border-radius:5px;padding:1px 5px;font-size:11px}
#billing-status .banner+.banner{margin-top:10px}
.cron-ok{color:#3f6b33}.cron-warn{color:#9c5a12}
