
:root{
  --bg:#f5f7f9;--panel:#fff;--line:#dfe5eb;--text:#17202a;--muted:#667085;
  --green:#0b6b37;--green2:#14864b;--blue:#1f5a8a;--danger:#ba2b2b;--orange:#b76700;
}
/* V19.1: kolory firm w tabelkach — Dex-Max delikatna zieleń, ElektroBart delikatny błękit. */
tr.row-patryk{background:#f1faf5}
tr.row-bartek{background:#f0f6fc}
tr.row-patryk:hover{background:#e5f5ec}
tr.row-bartek:hover{background:#e3eef9}
.companyDot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:middle}
.companyDot.patryk{background:var(--green)}
.companyDot.bartek{background:var(--blue)}
*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}
.app{display:grid;grid-template-columns:230px 1fr;min-height:100vh}
.sidebar{background:#fff;border-right:1px solid var(--line);padding:18px;display:flex;flex-direction:column;gap:22px}
.logo{display:flex;align-items:center;gap:10px}.logo-mark{background:var(--green);color:#fff;border-radius:11px;padding:10px 8px;font-weight:800}
.logo small{display:block;color:var(--muted);margin-top:3px}.sidebar nav{display:flex;flex-direction:column;gap:6px}
.sidebar nav a,.sidebar-bottom a{padding:11px 12px;border-radius:9px;color:#394150}.sidebar nav a.active{background:#e8f4ec;color:var(--green);font-weight:700}
.sidebar-bottom{margin-top:auto}.content{padding:24px;min-width:0}.topbar{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}
h1{margin:0 0 5px;font-size:28px}h2{margin:0 0 5px;font-size:20px}h3{margin:0 0 8px}.muted{color:var(--muted)}
.top-actions,.actions{display:flex;gap:8px;flex-wrap:wrap}.btn{border:1px solid #cbd5df;background:#fff;color:#253140;padding:9px 13px;border-radius:9px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.btn.primary{background:var(--green);color:#fff;border-color:var(--green)}.btn.danger{background:#fff;color:var(--danger);border-color:#efcaca}.btn.small{padding:6px 9px;font-size:13px}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.kpi{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px}.kpi span{display:block;color:#596273;font-size:13px}.kpi strong{display:block;font-size:23px;margin-top:8px}.kpi.highlight{border-color:#bcdcc7;background:#f4fbf6}.kpi.highlight strong{font-size:17px;color:var(--green)}.kpi.highlight em{display:block;font-style:normal;font-weight:800;font-size:22px;color:var(--green);margin-top:5px}
.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:16px}.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{padding:10px;border-bottom:1px solid #edf0f2;text-align:left;white-space:nowrap}th{font-size:12px;color:#586170;background:#fafbfc}
tr.clickable{cursor:pointer}tr.clickable:hover{background:#f4fbf6}.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:700}.badge.open{background:#fff0d8;color:#9a5a00}.badge.done{background:#dcf3e5;color:#146c3a}
.two-cols{display:grid;grid-template-columns:1.5fr 1fr;gap:16px}.cards-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.investment-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff}.investment-card:hover{border-color:#a9cfb6}.card-title{display:flex;justify-content:space-between;gap:10px}.card-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.card-stats span{font-size:12px;color:var(--muted)}.card-stats b{display:block;color:var(--text);margin-top:3px}
.summary-lines>div,.simple-list>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #edf0f2}.simple-list small{display:block;color:var(--muted);margin-top:4px}.summary-lines .total{font-size:17px;font-weight:700}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.form-grid.four{grid-template-columns:repeat(4,1fr)}label{font-size:13px;font-weight:700;color:#344054}input,select,textarea{width:100%;border:1px solid #cdd6df;border-radius:9px;padding:10px;margin-top:6px;background:#fff}.form-actions{margin-top:14px;display:flex;gap:8px;flex-wrap:wrap}
.settlement{border:1px solid #b7dbc3;background:#f4fbf6;border-radius:12px;padding:16px;text-align:center}.settlement span{display:block;color:#52705c;font-size:13px}.settlement strong{display:block;color:var(--green);font-size:23px;margin-top:7px}.settlement b{display:block;color:var(--green);font-size:28px;margin-top:4px}
.alert{padding:12px 14px;border-radius:10px;margin-bottom:14px}.alert.error{background:#fff0f0;color:#8f1d1d;border:1px solid #f2c2c2}.alert.success{background:#ecf8ef;color:#17683a;border:1px solid #c9e7d2}
.empty{color:var(--muted);padding:25px;text-align:center}
.modal{position:fixed;inset:0;background:#0007;display:none;align-items:center;justify-content:center;padding:18px;z-index:20}.modal.open{display:flex}.modal-card{background:#fff;border-radius:14px;padding:20px;max-width:560px;width:100%;max-height:90vh;overflow:auto}.modal-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:14px}.x{border:0;background:none;font-size:25px;cursor:pointer}
.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef7f1,#f6f8fa);padding:18px}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:0 15px 45px #0002}.brand-icon{display:inline-block;background:var(--green);color:#fff;padding:9px;border-radius:10px;font-weight:800}.stack{display:grid;gap:12px}
.print-sheet{max-width:980px;margin:30px auto;background:#fff;padding:28px;box-shadow:0 2px 20px #0002}.print-actions{display:flex;gap:8px;justify-content:flex-end}.print-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.print-grid>div{border:1px solid var(--line);padding:12px;border-radius:10px}.settlement-print{margin-top:20px;border:2px solid #9fcaae;padding:18px;border-radius:12px;display:flex;justify-content:space-between;font-size:23px;color:var(--green)}
@media(max-width:980px){.app{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:12px}.sidebar nav{flex-direction:row;overflow:auto}.sidebar nav a{white-space:nowrap}.sidebar-bottom{display:none}.content{padding:14px}.kpis{grid-template-columns:repeat(2,1fr)}.two-cols{grid-template-columns:1fr}.cards-grid{grid-template-columns:1fr}.topbar{flex-direction:column}.form-grid.four{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){h1{font-size:23px}.kpis{grid-template-columns:1fr 1fr;gap:9px}.kpi{padding:12px}.kpi strong{font-size:18px}.content{padding:10px}.panel{padding:12px}.form-grid,.form-grid.four{grid-template-columns:1fr}.card-stats{grid-template-columns:1fr}.top-actions{width:100%}.top-actions .btn{flex:1}.print-grid{grid-template-columns:1fr 1fr}}

.switchline{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#f4fbf6;border:1px solid #cce4d4;border-radius:10px;margin-bottom:8px}.switchline input{width:auto;margin:0}.table-wrap td a{color:#0b6b37;text-decoration:underline}textarea{resize:vertical}

.subtabs{display:flex;gap:8px;flex-wrap:wrap;padding:10px}
.legacy-box{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fafbfc;margin-top:10px}
.legacy-box summary{cursor:pointer}
.labor-kpis{margin-top:8px}
@media(max-width:600px){.subtabs .btn{flex:1 1 auto}.labor-kpis{grid-template-columns:1fr 1fr}}

.alert.info{background:#eef6ff;color:#234b72;border:1px solid #c8def3}.stage-panel{border-color:#b8d8c3;background:#fbfffc}.final-result{margin-top:20px;background:#f4fbf6}.archive-danger{background:#fff5f5}.nowrap{white-space:nowrap}

.split-title{font-size:15px;margin:14px 0 8px}
.invoice-split{border-left:4px solid #177245}
.cash-split{border-left:4px solid #8a5b00}
.split-grand-total{margin-top:18px;padding:14px 0;border-top:2px solid var(--line);display:flex;justify-content:space-between;gap:12px;font-size:16px}
.split-settlement-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0 22px}
.split-card{margin:0}
@media(max-width:900px){.split-settlement-grid{grid-template-columns:1fr}}

/* V10 — Magazyn */
.warehouse-actions{margin-top:14px;flex-wrap:wrap}
.negative{font-weight:700;color:#a53333}.positive{font-weight:700;color:#24754b}
.danger-zone{border-color:#ead2d2}
@media(max-width:900px){
 .calendar-day{min-height:90px;padding:4px}.calendar-event{padding:3px;font-size:10px}.calendar-date{font-size:12px}
}
@media(max-width:650px){
 .calendar-grid{gap:2px}.calendar-day{min-height:72px;border-radius:6px}
 .calendar-event small{display:none}.calendar-event{font-size:9px}
 .span2{grid-column:span 1}
}

/* V11 — Notatnik */
.notes-search{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.notes-search input{flex:1 1 280px}
.notes-search select{min-width:180px}
.notes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.note-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;flex-direction:column;min-height:220px}
.note-card.important{border-left:5px solid #b65522}
.note-card.pinned{box-shadow:0 3px 14px rgba(0,0,0,.07)}
.note-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.note-card-head h3{margin:0 0 6px}
.note-meta{display:flex;gap:6px;flex-wrap:wrap}
.note-meta span,.pin-badge{font-size:11px;padding:3px 7px;border-radius:999px;background:#edf1f4}
.note-important{background:#fff0e8!important;color:#9b3f12;font-weight:700}
.pin-badge{white-space:nowrap;background:#e8f4ed}
.note-content{white-space:normal;line-height:1.5;margin:14px 0;flex:1;overflow-wrap:anywhere}
.note-footer{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:10px}
@media(max-width:650px){.notes-grid{grid-template-columns:1fr}.note-footer{align-items:flex-start;flex-direction:column}}
.import-panel{margin-top:14px}.import-panel h3{margin-top:20px}.import-panel input[type=file]{max-width:100%}

.preview-box{margin-top:16px;padding:14px;border:2px solid #c9ddcf;border-radius:12px;background:#fbfffc}.audit-details span{display:inline-block;margin:2px 8px 2px 0}.budget-live{border-left:5px solid #2b7a4b}.subtabs{display:flex;gap:8px;flex-wrap:wrap}.panel code{display:block;padding:12px;background:#f3f5f7;border-radius:8px;overflow-wrap:anywhere}

/* V14 — indywidualny podział Wydatków innych */
.split-expense-box{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fafcfb}
.split-expense-box h3{margin:0 0 6px;font-size:15px}
.split-preview{display:flex;align-items:center;padding-top:24px;font-size:14px}
.split-custom-label{display:none}
@media(max-width:650px){.split-preview{padding-top:0}}

.cost-only-banner{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#f4f8f6;display:flex;flex-direction:column;gap:4px}
.cost-only-banner strong{color:#17623c}
.cost-only-archive{border-left:4px solid #24754b}

.settings-switches{display:grid;gap:6px;margin:10px 0 16px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fafbfc}
.settings-switches.compact{margin:0 0 12px}

.backup-actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0 18px}
.backup-action-card{border:1px solid var(--line);border-radius:12px;padding:16px;background:#fafbfc;display:flex;justify-content:space-between;align-items:center;gap:16px}
.backup-action-card div{display:flex;flex-direction:column;gap:3px}
.backup-action-card strong{font-size:16px}
.backup-action-card span{font-size:12px;color:var(--muted)}
.backup-console{background:#10151b;border-radius:12px;overflow:hidden;color:#e9edf1;font-family:Consolas,Monaco,monospace;font-size:12px}
.console-row{display:grid;grid-template-columns:75px 145px 120px 75px 1fr;gap:10px;padding:10px 12px;border-bottom:1px solid #27303a;align-items:start}
.console-row:last-child{border-bottom:0}
.console-row.ok .console-status{color:#72d597;font-weight:800}
.console-row.error .console-status{color:#ff8585;font-weight:800}
.console-time,.console-kind,.console-source{color:#b8c1ca}
.console-file strong{color:#fff}.console-file span{color:#d7dde3}.console-file small{display:block;color:#8fa2b3;margin-top:3px}
.console-empty{padding:20px;color:#9ba8b5}
@media(max-width:900px){.backup-actions-grid{grid-template-columns:1fr}.console-row{grid-template-columns:70px 1fr;gap:4px 10px}.console-file{grid-column:1/-1}}
@media(max-width:600px){.backup-action-card{align-items:stretch;flex-direction:column}.backup-action-card .btn{width:100%}}


/* V17 — mobile UI refresh */
.logo{align-items:flex-start}.logo img{height:38px;width:auto;display:block}.logo-text{display:flex;flex-direction:column;gap:2px}.logo-text strong{font-size:18px}.sidebar nav a{font-weight:700}.sidebar nav a,.sidebar-bottom a{transition:all .18s ease}.sidebar nav a:hover,.sidebar-bottom a:hover{background:#f4f7f9}.topbar h1{line-height:1.15}.topbar .muted{max-width:780px}.panel,.kpi,.investment-card,.backup-action-card,.modal-card{box-shadow:0 10px 28px rgba(15,23,34,.06)}@media(max-width:980px){.sidebar{position:sticky;top:0;z-index:15;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);gap:12px}.logo{padding-bottom:4px;border-bottom:1px solid var(--line)}.sidebar nav{display:grid;grid-auto-flow:column;grid-auto-columns:max-content;overflow:auto;padding-bottom:4px;scrollbar-width:none}.sidebar nav::-webkit-scrollbar{display:none}.sidebar nav a{padding:10px 12px;border:1px solid var(--line);background:#fff}.sidebar nav a.active{background:#e8f4ec;border-color:#c5e0ce}.content{padding-top:12px}.top-actions .btn{min-height:44px}}@media(max-width:700px){body{background:#eef2f6}.content{padding:10px 10px 18px}.topbar{margin-bottom:12px}.topbar h1{font-size:24px}.top-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.top-actions .btn,.top-actions a{width:100%}.kpis{grid-template-columns:1fr;gap:10px}.kpi{padding:14px}.kpi strong{font-size:20px}.panel{padding:14px;border-radius:16px}.panel-head{flex-direction:column;align-items:flex-start}.table-wrap{border:1px solid var(--line);border-radius:12px;background:#fff}table{min-width:640px}.cards-grid,.two-cols,.backup-actions-grid,.split-settlement-grid{grid-template-columns:1fr}.form-grid,.form-grid.four{grid-template-columns:1fr}.btn{width:100%;min-height:46px}.subtabs{overflow:auto;flex-wrap:nowrap;scrollbar-width:none;padding:6px 0 10px}.subtabs::-webkit-scrollbar{display:none}.subtabs .btn{width:auto;white-space:nowrap;flex:0 0 auto}.settings-switches{padding:10px}.backup-console{font-size:11px}}@media(max-width:480px){.logo img{height:32px}.logo-text strong{font-size:16px}.sidebar{padding:10px}.sidebar nav a{font-size:13px;padding:9px 11px}.top-actions{grid-template-columns:1fr}.modal{padding:10px}.modal-card{padding:14px;border-radius:16px}.console-row{padding:9px 10px}}

/* V17.1 — poprawka logo i prawdziwy interfejs mobilny */
.dexbrand{display:inline-flex;align-items:center;font-weight:900;font-style:italic;font-size:24px;letter-spacing:-1.2px;white-space:nowrap;line-height:1}
.dexbrand .dex{color:#263241}.dexbrand .max{color:#70c900}.logo{gap:12px;min-width:0}.logo-text{min-width:0}.logo-text strong{white-space:nowrap}
.mobile-menu-btn,.mobile-bottom-nav,.mobile-nav-overlay{display:none}

@media(max-width:760px){
 body{padding-bottom:72px}
 .app{display:block;min-height:100vh}
 .sidebar{position:fixed!important;top:0;left:0;bottom:0;width:min(86vw,340px);height:100dvh;z-index:60;transform:translateX(-105%);transition:transform .24s ease;background:#fff!important;border:0!important;border-radius:0 18px 18px 0;box-shadow:0 20px 55px #0004;padding:18px 14px!important;display:flex!important;flex-direction:column!important;gap:14px!important}
 .sidebar.mobile-open{transform:translateX(0)}
 .sidebar .logo{display:flex!important;padding:4px 4px 14px!important;border-bottom:1px solid var(--line)!important}
 .sidebar nav{display:flex!important;flex-direction:column!important;overflow:auto!important;gap:6px!important;padding:0!important;grid-auto-flow:unset!important}
 .sidebar nav a{display:block!important;width:100%!important;padding:13px 14px!important;border:0!important;border-radius:11px!important;background:#fff!important;font-size:15px!important;white-space:normal!important}
 .sidebar nav a.active{background:#e8f4ec!important;color:var(--green)!important}
 .sidebar-bottom{display:block!important;margin-top:auto!important;padding-top:10px;border-top:1px solid var(--line)}
 .sidebar-bottom a{display:block;padding:12px 14px;border-radius:10px}
 .mobile-menu-btn{display:inline-flex;position:fixed;right:12px;top:10px;z-index:35;border:1px solid #d5dde4;background:#fff;color:#263241;border-radius:11px;padding:10px 12px;font-weight:800;box-shadow:0 5px 18px #0002;width:auto;min-height:42px;margin:0}
 .mobile-nav-overlay{display:block;position:fixed;inset:0;background:#0007;z-index:55;opacity:0;pointer-events:none;transition:opacity .2s}.mobile-nav-overlay.show{opacity:1;pointer-events:auto}
 body.nav-open{overflow:hidden}
 .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:45;background:rgba(255,255,255,.98);border-top:1px solid #dbe3e9;box-shadow:0 -8px 24px #0002;padding:6px 4px max(6px,env(safe-area-inset-bottom));height:68px}
 .mobile-bottom-nav a,.mobile-bottom-nav button{border:0;background:none;box-shadow:none;color:#44515f;padding:4px 2px;margin:0;min-height:auto;width:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:20px;text-decoration:none}
 .mobile-bottom-nav span{font-size:10px;font-weight:700}
 .content{padding:58px 10px 12px!important}
 .topbar{background:linear-gradient(135deg,#0f1722,#163650);color:#fff;border-radius:16px;padding:16px;margin:0 0 12px;box-shadow:0 10px 26px #0002}
 .topbar .muted{color:#d6e0e8}.topbar h1{font-size:23px}
 .top-actions .btn{background:#75c900;border-color:#75c900;color:#10200a}
 .kpis{grid-template-columns:1fr 1fr!important;gap:8px!important}.kpi{border-radius:14px!important;padding:12px!important}.kpi span{font-size:11px}.kpi strong{font-size:18px!important}.kpi.highlight{grid-column:1/-1}
 .panel{margin-bottom:10px!important}.panel-head{gap:8px!important}.panel-head h2{font-size:18px}
 .cards-grid{gap:9px!important}.investment-card{padding:13px!important;border-radius:14px!important}.card-stats{grid-template-columns:1fr 1fr!important}
 .form-grid,.form-grid.four{grid-template-columns:1fr!important;gap:9px!important}input,select,textarea{min-height:48px!important;font-size:16px!important;padding:12px!important}.btn{min-height:46px!important;font-size:15px!important}
 .table-wrap{overflow:visible!important;border:0!important;background:transparent!important}
 .table-wrap table{display:block!important;min-width:0!important;width:100%!important}.table-wrap thead{display:none!important}.table-wrap tbody{display:grid!important;gap:9px!important}.table-wrap tr{display:block!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:14px!important;padding:10px 12px!important;box-shadow:0 4px 14px #0000000d!important}.table-wrap td{display:grid!important;grid-template-columns:minmax(92px,38%) 1fr!important;gap:10px!important;align-items:start!important;padding:7px 0!important;border-bottom:1px solid #edf1f4!important;white-space:normal!important;text-align:right!important;overflow-wrap:anywhere!important}.table-wrap td:last-child{border-bottom:0!important}.table-wrap td::before{content:attr(data-label);font-size:11px;font-weight:800;color:#667085;text-align:left;text-transform:none}.table-wrap td:empty{display:none!important}.table-wrap td .actions,.table-wrap td .form-actions{justify-content:flex-end}.table-wrap td .btn{width:auto!important;min-height:38px!important;padding:8px 10px!important;font-size:13px!important}.table-wrap td form{max-width:100%}
 .summary-lines>div,.simple-list>div{align-items:flex-start}.summary-lines>div>*:last-child,.simple-list>div>*:last-child{text-align:right}
 .subtabs{position:sticky;top:55px;z-index:20;background:#eef2f6;margin:0 -4px 10px;padding:7px 4px!important}
 .modal{align-items:flex-end!important;padding:0!important}.modal-card{max-width:none!important;width:100%!important;max-height:92dvh!important;border-radius:18px 18px 0 0!important;padding:16px!important}
 .backup-console{border-radius:12px}.console-row{grid-template-columns:72px 1fr!important}.console-file{grid-column:1/-1!important}
}
@media(max-width:420px){.kpis{grid-template-columns:1fr!important}.kpi.highlight{grid-column:auto}.table-wrap td{grid-template-columns:90px 1fr!important}.mobile-bottom-nav span{font-size:9px}}


/* V17.2 — prawdziwe logo DEX-MAX w panelu rozliczeń */
.logo img{height:46px;max-width:118px;object-fit:contain;object-position:left center;flex:0 0 auto}.logo-text strong{font-size:18px;line-height:1.1}.logo-text small{line-height:1.15}.sidebar .logo{align-items:center}.sidebar .logo-text{justify-content:center}
@media(max-width:760px){.logo img{height:38px;max-width:96px}.sidebar .logo{align-items:center}.logo-text strong{font-size:17px;white-space:normal}.logo-text small{font-size:12px}}
@media(max-width:420px){.logo img{height:34px;max-width:90px}.logo-text strong{font-size:16px}}

/* V18 — marka Dolatowski&Koperski */
.dk-side-brand{display:block!important;padding:4px 0 14px!important}.dk-side-brand strong{display:block;font-size:21px;letter-spacing:-.6px;color:#17202a;line-height:1.05}.dk-side-brand small{display:block;font-size:9px;line-height:1.25;color:#667085;margin-top:5px}.dk-login-brand{margin-bottom:14px}.dk-login-brand strong{display:block;font-size:25px;letter-spacing:-.7px;color:#17202a}.dk-login-brand small{display:block;font-size:10px;color:#667085;margin-top:4px}.logo.dk-side-brand img{display:none!important}@media(max-width:760px){.dk-side-brand strong{font-size:20px}.dk-side-brand small{font-size:9px}}


/* V18.1 — poprawki mobile: akcje w jednej linii + brak globalnego Dodaj inwestycję */
@media(max-width:760px){
  /* Komórka akcji nie rezerwuje pustej kolumny etykiety. */
  .table-wrap td[data-label=""],
  .table-wrap td:last-child:has(> .actions){
    display:block!important;
    width:100%!important;
    text-align:left!important;
    padding-top:10px!important;
  }
  .table-wrap td[data-label=""]::before,
  .table-wrap td:last-child:has(> .actions)::before{display:none!important}

  /* Oznacz rozliczoną / Edytuj / Usuń zawsze w jednym wierszu. */
  .table-wrap td .actions{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    width:100%!important;
    overflow:visible!important;
  }
  .table-wrap td .actions form{
    display:block!important;
    width:auto!important;
    flex:0 0 auto!important;
    margin:0!important;
  }
  .table-wrap td .actions .btn{
    width:auto!important;
    min-width:0!important;
    min-height:38px!important;
    padding:8px 9px!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    flex:0 0 auto!important;
  }
  /* Jeśli ekran jest bardzo wąski, zmniejsz przyciski zamiast przenosić je niżej. */
  @media(max-width:390px){
    .table-wrap td .actions{gap:4px!important}
    .table-wrap td .actions .btn{padding:7px 6px!important;font-size:11px!important}
  }
}


/* V18.3 — stabilne zakładki inwestycji + kompaktowy nagłówek mobile */
@media(max-width:760px){
  .topbar{padding:12px 14px!important;min-height:0!important;margin-bottom:10px!important}
  .topbar h1{font-size:20px!important;margin:0!important;line-height:1.15!important}
  .topbar .muted{display:none!important}
  .subtabs{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
    overflow:visible!important;
    flex-wrap:initial!important;
    margin:0 0 10px!important;
    padding:6px!important;
    background:#fff!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    box-shadow:0 4px 14px rgba(15,23,34,.06)!important;
  }
  .subtabs .btn{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px 5px!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.15!important;
    white-space:normal!important;
    text-align:center!important;
    flex:none!important;
    border-radius:9px!important;
  }
}
@media(max-width:390px){
  .subtabs{gap:4px!important;padding:5px!important}
  .subtabs .btn{font-size:11px!important;padding:7px 3px!important}
}


/* V18.4 — zwarte sekcje mobilne w inwestycji */
@media(max-width:700px){
  /* Szczegółowy + Zbiorczy zawsze obok siebie */
  .workers-period-head{display:block!important}
  .workers-period-head>div:first-child{margin-bottom:10px}
  .workers-period-head .actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important}
  .workers-period-head .actions .btn{width:100%!important;min-height:42px!important;padding:9px 8px!important;font-size:14px!important}

  /* Import godzin: inwestycja w pierwszym rzędzie, Od + Do obok siebie, przycisk pod spodem */
  .labor-import-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important}
  .labor-import-grid .import-project{grid-column:1/-1!important}
  .labor-import-grid .import-from{grid-column:1!important}
  .labor-import-grid .import-to{grid-column:2!important}
  .labor-import-grid .import-submit{grid-column:1/-1!important}
  .labor-import-grid label{min-width:0!important}
  .labor-import-grid input,.labor-import-grid select{width:100%!important;min-width:0!important}
  .labor-import-grid .import-submit .btn{margin-top:0!important}

  /* Bieżący okres — mniejsze fonty i odstępy */
  .current-period-summary{padding:12px!important}
  .current-period-summary h2{font-size:20px!important;margin-bottom:8px!important}
  .current-period-summary .muted{font-size:13px!important;line-height:1.35!important;margin:6px 0 12px!important}
  .current-period-summary .summary-lines>div{padding:8px 0!important;gap:10px!important;align-items:center!important}
  .current-period-summary .summary-lines span{font-size:14px!important;line-height:1.25!important}
  .current-period-summary .summary-lines b{font-size:16px!important;line-height:1.15!important;white-space:nowrap!important}
  .current-period-summary .summary-lines .total span{font-size:15px!important;font-weight:700!important}
  .current-period-summary .summary-lines .total b{font-size:17px!important}
  .current-period-summary .split-title{font-size:14px!important;margin:12px 0 6px!important}
  .current-period-summary .settlement{padding:12px!important}
  .current-period-summary .settlement strong{font-size:17px!important}
  .current-period-summary .settlement b{font-size:20px!important}
  .current-period-summary .cost-only-banner{padding:11px!important;margin-top:12px!important;font-size:13px!important}
  .current-period-summary .cost-only-banner strong{font-size:15px!important}
}
@media(max-width:390px){
  .workers-period-head .actions .btn{font-size:13px!important}
  .labor-import-grid{gap:7px!important}
  .labor-import-grid label{font-size:12px!important}
  .current-period-summary .summary-lines span{font-size:13px!important}
  .current-period-summary .summary-lines b{font-size:15px!important}
}


/* V18.5 — ULTRA COMPACT MOBILE: mniej przewijania, więcej elementów obok siebie */
@media(max-width:760px){
  /* Ogólna gęstość */
  body{padding-bottom:60px!important}
  .content{padding:50px 7px 8px!important}
  .panel{padding:9px!important;margin-bottom:7px!important;border-radius:12px!important}
  .panel-head{margin-bottom:7px!important;gap:6px!important}
  .panel h2,.panel-head h2{font-size:16px!important;line-height:1.15!important;margin:0 0 2px!important}
  .panel h3{font-size:14px!important;margin:9px 0 5px!important}
  .muted{font-size:11px!important;line-height:1.28!important}
  label{font-size:11px!important;line-height:1.15!important}
  input,select,textarea{min-height:36px!important;padding:7px 8px!important;font-size:13px!important;border-radius:8px!important;margin-top:3px!important}
  textarea{min-height:62px!important}
  .btn,button.btn{min-height:34px!important;padding:6px 8px!important;font-size:12px!important;line-height:1.05!important;border-radius:8px!important;width:auto!important}
  .btn.small{min-height:30px!important;padding:5px 7px!important;font-size:11px!important}
  .actions,.form-actions{gap:5px!important}

  /* Nagłówek inwestycji */
  .topbar{padding:9px 11px!important;margin-bottom:7px!important;border-radius:12px!important}
  .topbar h1{font-size:18px!important;line-height:1.1!important}

  /* 3 zakładki inwestycji zawsze w jednym rzędzie */
  .subtabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;padding:4px!important;margin-bottom:7px!important;border-radius:10px!important}
  .subtabs .btn{width:100%!important;min-width:0!important;min-height:34px!important;padding:5px 2px!important;font-size:10.5px!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

  /* Szczegółowy + Zbiorczy: BEZWZGLĘDNIE jedna linia */
  .workers-period-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:6px!important}
  .workers-period-head>div:first-child{margin:0!important;min-width:0!important}
  .workers-period-head>div:first-child .muted{margin:2px 0 0!important}
  .workers-period-head .actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px!important;width:auto!important;align-items:center!important;justify-content:flex-end!important}
  .workers-period-head .actions .btn{display:inline-flex!important;width:auto!important;min-width:78px!important;min-height:32px!important;padding:5px 7px!important;font-size:10.5px!important;white-space:nowrap!important;flex:0 0 auto!important}

  /* KPI pracowników — 4 małe pola w dwóch kolumnach */
  .labor-kpis{grid-template-columns:1fr 1fr!important;gap:5px!important;margin:5px 0!important}
  .labor-kpis .kpi{padding:7px!important;border-radius:9px!important}
  .labor-kpis .kpi span{font-size:10px!important;margin:0!important}
  .labor-kpis .kpi strong{font-size:15px!important;margin-top:3px!important}

  /* Import: inwestycja + OD + DO w jednym rzędzie, przycisk pod nimi */
  .labor-import-grid{display:grid!important;grid-template-columns:minmax(0,1.6fr) minmax(0,.8fr) minmax(0,.8fr)!important;gap:5px!important;align-items:end!important}
  .labor-import-grid .import-project{grid-column:1!important;min-width:0!important}
  .labor-import-grid .import-from{grid-column:2!important;min-width:0!important}
  .labor-import-grid .import-to{grid-column:3!important;min-width:0!important}
  .labor-import-grid .import-submit{grid-column:1/-1!important;margin-top:1px!important}
  .labor-import-grid label{min-width:0!important;font-size:10px!important}
  .labor-import-grid input,.labor-import-grid select{width:100%!important;min-width:0!important;height:36px!important;font-size:11px!important;padding:5px 6px!important}
  .labor-import-grid .import-submit .btn{width:100%!important;min-height:34px!important;font-size:12px!important}
  .import-panel{margin-top:7px!important}
  .import-panel .panel-head{margin-bottom:5px!important}
  .import-panel .panel-head .muted{font-size:10.5px!important}

  /* Bieżący okres — ciaśniej */
  .current-period-summary{padding:9px!important}
  .current-period-summary h2{font-size:16px!important;margin:0 0 4px!important}
  .current-period-summary>.muted,.current-period-summary p.muted{font-size:11px!important;line-height:1.25!important;margin:3px 0 7px!important}
  .current-period-summary .summary-lines>div{padding:5px 0!important;gap:6px!important;align-items:center!important}
  .current-period-summary .summary-lines span{font-size:11.5px!important;line-height:1.16!important}
  .current-period-summary .summary-lines b{font-size:13px!important;line-height:1.05!important;white-space:nowrap!important}
  .current-period-summary .summary-lines .total span{font-size:12px!important}
  .current-period-summary .summary-lines .total b{font-size:14px!important}
  .current-period-summary .cost-only-banner{padding:8px!important;margin-top:7px!important;font-size:11px!important;line-height:1.25!important}
  .current-period-summary .cost-only-banner strong{font-size:12.5px!important}
  .current-period-summary .settlement{padding:8px!important}
  .current-period-summary .settlement span{font-size:10px!important}
  .current-period-summary .settlement strong{font-size:14px!important;margin-top:3px!important}
  .current-period-summary .settlement b{font-size:17px!important;margin-top:2px!important}

  /* Karty/tabele mobilne bardziej zwarte */
  .table-wrap tbody{gap:5px!important}
  .table-wrap tr{padding:6px 8px!important;border-radius:9px!important}
  .table-wrap td{grid-template-columns:80px 1fr!important;gap:5px!important;padding:4px 0!important;font-size:11.5px!important}
  .table-wrap td::before{font-size:9.5px!important}
  .table-wrap td .actions{gap:3px!important}
  .table-wrap td .actions .btn{min-height:28px!important;padding:4px 5px!important;font-size:10px!important}

  /* Podsumowania / karty / formularze */
  .kpis{gap:5px!important}
  .kpi{padding:7px!important;border-radius:9px!important}
  .kpi span{font-size:10px!important}
  .kpi strong{font-size:15px!important;margin-top:3px!important}
  .cards-grid{gap:6px!important}
  .investment-card{padding:9px!important;border-radius:10px!important}
  .card-stats{gap:5px!important;margin-top:7px!important}
  .card-stats span{font-size:10px!important}
  .card-stats b{font-size:12px!important}
  .form-grid,.form-grid.four{gap:5px!important}

  /* Dolna nawigacja niższa */
  .mobile-bottom-nav{height:58px!important;padding:3px 2px max(3px,env(safe-area-inset-bottom))!important}
  .mobile-bottom-nav a,.mobile-bottom-nav button{font-size:17px!important;gap:1px!important}
  .mobile-bottom-nav span{font-size:9px!important}
}

@media(max-width:390px){
  .workers-period-head{grid-template-columns:1fr!important}
  .workers-period-head .actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .workers-period-head .actions .btn{width:100%!important;min-width:0!important}
  .labor-import-grid{grid-template-columns:minmax(0,1.3fr) minmax(0,.85fr) minmax(0,.85fr)!important;gap:4px!important}
  .labor-import-grid label{font-size:9.5px!important}
  .labor-import-grid input,.labor-import-grid select{font-size:10.5px!important;padding:4px!important}
  .subtabs .btn{font-size:9.5px!important}
}


/* V18.6 — delikatne oznaczenie firmy w wydatkach */
.table-wrap tr.expense-dexmax{background:rgba(22,131,74,.07)}
.table-wrap tr.expense-elektrobart{background:rgba(31,90,138,.07)}
.table-wrap tr.expense-dexmax:hover{background:rgba(22,131,74,.11)}
.table-wrap tr.expense-elektrobart:hover{background:rgba(31,90,138,.11)}
@media(max-width:760px){
  .table-wrap tr.expense-dexmax{background:rgba(22,131,74,.085)!important;border-color:rgba(22,131,74,.22)!important}
  .table-wrap tr.expense-elektrobart{background:rgba(31,90,138,.085)!important;border-color:rgba(31,90,138,.22)!important}
}
