/* =====================================================================
   BUDMAR – nowy panel (rama z prototypu + dotychczasowe podstrony)
   Kolorystyka: A / B / C / D (domyślnie D – grafit + bordo), wybór w panelu „Wygląd”.
   Zasada: czerwień tylko w logo i przy błędach, zieleń tylko jako „OK”,
   przyciski w stalowym granacie.
   ===================================================================== */

/* ================= TOKENY ================= */
html {
  --brand: #1f5582; --brand-2: #173f63; --brand-wash: #e8f0f7; --brand-ink: #173f63; --accent: #e0484e;
  --bg: #f3f5f8; --card: #ffffff; --surface: #f4f7fa; --soft: #eef2f6; --soft-2: #e3e9ef;
  --ink: #121a22; --mid: #46535e; --faint: #5f6c77; --line: #dde3e9; --field: #d3dae2;
  --ok: #12a46b; --ok-wash: #e7f7ef; --ok-ink: #0b7a4e;
  --warn: #e8a00e; --warn-wash: #fdf5e1; --warn-ink: #9a6700;
  --bad: #d7141d; --bad-wash: #fdeceb; --bad-ink: #b2111a;
  --info: #2563eb; --info-wash: #eaf1fe; --info-ink: #1d4ed8;
  --side-bg: linear-gradient(180deg, #5e1015 0%, #85191f 58%, #74161b 100%);
  --side-ink: rgba(255,255,255,.9); --side-mid: rgba(255,236,236,.62); --side-line: rgba(255,255,255,.16); --side-hover: rgba(255,255,255,.09);
  --nav-on-ink: #5e1015; --nav-on-ic: #85191f; --pip-ring: #85191f;
  --app-bg: radial-gradient(1100px 480px at 85% -8%, #f3e9e9 0%, transparent 60%), radial-gradient(800px 380px at 0% 0%, #eef1f5 0%, transparent 55%);
  --sh: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.04);
  --sh-float: 0 1px 2px rgba(16,24,40,.04), 0 10px 28px -14px rgba(0,40,90,.22);
  --sh-pop: 0 10px 30px -10px rgba(15,29,36,.3), 0 2px 6px rgba(15,29,36,.08);
  --r-sm: 8px; --r: 10px; --r-card: 14px; --r-lg: 18px;
  --side-w: 260px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html[data-palette="a"] {
  --brand: #0b4f96; --brand-2: #003e7e; --brand-wash: #e9f0f9; --brand-ink: #003e7e; --accent: #c4262d;
  --side-bg: linear-gradient(180deg, #002a57 0%, #003e7e 55%, #00376f 100%);
  --side-ink: rgba(255,255,255,.86); --side-mid: rgba(255,255,255,.58); --side-line: rgba(255,255,255,.12); --side-hover: rgba(255,255,255,.08);
  --nav-on-ink: #002a57; --nav-on-ic: #003e7e; --pip-ring: #003e7e;
  --app-bg: radial-gradient(1100px 480px at 85% -8%, #dfe9f6 0%, transparent 60%), radial-gradient(800px 380px at 0% 0%, #eef1f7 0%, transparent 55%);
}
html[data-palette="c"] {
  --brand: #0f6a83; --brand-2: #0b5266; --brand-wash: #e5f2f5; --brand-ink: #0b5266; --accent: #c4262d;
  --side-bg: rgba(255,255,255,.94);
  --side-ink: #121a22; --side-mid: #5f6c77; --side-line: #dde3e9; --side-hover: #eef2f6;
  --nav-on-ink: #fff; --nav-on-ic: #bfe6ef; --pip-ring: #eef2f6;
  --app-bg: radial-gradient(1100px 480px at 85% -8%, #e2eff2 0%, transparent 60%), radial-gradient(800px 380px at 0% 0%, #f0f2f4 0%, transparent 55%);
}

html[data-palette="d"] {
  --brand: #7a1a20; --brand-2: #5e1015; --brand-wash: #f6e9ea; --brand-ink: #5e1015; --accent: #c4262d;
  --side-bg: linear-gradient(180deg, #1b1f24 0%, #22272d 60%, #1d2126 100%);
  --side-ink: rgba(255,255,255,.88); --side-mid: rgba(255,255,255,.55); --side-line: rgba(255,255,255,.1); --side-hover: rgba(255,255,255,.07);
  --nav-on-ink: #5e1015; --nav-on-ic: #85191f; --pip-ring: #22272d;
  --app-bg: radial-gradient(1100px 480px at 85% -8%, #efe8e8 0%, transparent 60%), radial-gradient(800px 380px at 0% 0%, #eef1f5 0%, transparent 55%);
}

/* ================= PODSTAWY (nadpisanie szablonu Kode) ================= */
body { font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--ink); text-shadow: none; -webkit-font-smoothing: antialiased;
  background-color: var(--bg); background-image: var(--app-bg); background-attachment: fixed; }
h1, h2, h3, h4, h5, h6, .panel-title, .page-header .title { font-family: var(--font); }
a { color: var(--brand); } a:hover, a:focus { color: var(--brand-2); }
::selection { background: var(--brand-wash); }
.ic { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.loading { background: var(--bg); }

/* ================= RAMA: menu boczne + treść ================= */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 12px; align-self: start; height: calc(100vh - 24px); margin: 12px 0 12px 12px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; gap: 12px; border-radius: var(--r-lg); background: var(--side-bg); color: var(--side-ink);
  box-shadow: 0 20px 40px -20px rgba(60,10,14,.55), 0 2px 6px rgba(40,10,12,.15); overflow: hidden; z-index: 40; font-family: var(--font); }
.side a { text-decoration: none; }
.side .logo { display: flex; align-items: center; gap: 11px; padding: 4px 6px 0; color: #fff; }
.logo-b { width: 38px; height: 38px; flex: none; border-radius: 9px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(0,0,0,.4); }
.logo-b svg { width: 28px; height: 28px; display: block; }
.logo-b .m-line { stroke: #b3242a; } .logo-b .m-fill { fill: #b3242a; } .logo-b .m-cut { fill: #fff; }
.side .wm { display: flex; flex-direction: column; line-height: 1.05; }
.side .wm b { font-size: 17px; font-weight: 800; letter-spacing: .06em; color: var(--side-ink); }
.side .wm small { font-size: 8.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--side-mid); margin-top: 4px; white-space: nowrap; }
.s-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 0; padding: 0 8px 0 10px; border-radius: var(--r); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.72); }
.s-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font-size: 13.5px; box-shadow: none; padding: 0; }
.s-search input::placeholder { color: rgba(255,255,255,.7); }
.s-search:focus-within { background: #fff; color: var(--faint); } .s-search:focus-within input { color: #121a22; }
.s-search kbd { font: 500 10.5px var(--font); background: none; box-shadow: none; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 1px 5px; }
.side .nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.side .nav:before, .side .nav:after { display: none; }
.nav-t { padding: 12px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--side-mid); }
.side .nav a, .side .nav summary { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; font-size: 14px; line-height: 1.35; color: var(--side-ink); cursor: pointer; list-style: none; transition: background .15s; }
.side .nav summary::-webkit-details-marker { display: none; }
.side .nav a:hover, .side .nav summary:hover, .side .nav a:focus { background: var(--side-hover); color: var(--side-ink); }
.side .nav .ic { color: var(--side-mid); }
.side .nav > a.on { background: #fff; color: var(--nav-on-ink); font-weight: 600; box-shadow: 0 6px 16px -6px rgba(0,0,0,.45), inset 3px 0 0 var(--accent); }
.side .nav > a.on .ic { color: var(--nav-on-ic); }
.side .nav details > div a.on { color: var(--side-ink); background: var(--side-hover); font-weight: 600; }
.cnt { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600; background: #ffd27a; color: #4a2c00; }
.side .nav .car { margin-left: auto; transition: transform .15s; } .side .nav details[open] .car { transform: rotate(90deg); }
.side .nav details > div { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 29px; margin-left: 8px; border-left: 1px solid var(--side-line); }
.side .nav details > div a { padding: 6px 10px; font-size: 13.5px; color: var(--side-mid); }
.s-foot { display: flex; flex-direction: column; gap: 8px; }
.s-icons { display: flex; gap: 6px; }
.s-icons button, .s-icons a { position: relative; flex: 1; height: 36px; border: 0; border-radius: var(--r); background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); display: grid; place-items: center; }
.s-icons button:hover, .s-icons a:hover { background: rgba(255,255,255,.16); color: #fff; }
.side .s-user { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; line-height: 1.3; }
.side .s-user:hover { background: rgba(255,255,255,.14); color: #fff; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 600; background: #fff center/cover no-repeat; color: var(--brand-2); }
.s-user b { display: block; font-weight: 600; font-size: 13.5px; } .s-user small { display: block; font-size: 12px; color: var(--side-mid); }
/* C – jasne menu */
html[data-palette="c"] .side { border: 1px solid var(--line); box-shadow: var(--sh-float); }
html[data-palette="c"] .logo-b { box-shadow: 0 0 0 1px var(--line), 0 4px 12px -6px rgba(0,0,0,.25); }
html[data-palette="c"] .side .wm b { color: #4b4d52; }
html[data-palette="c"] .s-search { background: #fff; border-color: var(--field); color: var(--faint); }
html[data-palette="c"] .s-search input { color: var(--ink); } html[data-palette="c"] .s-search input::placeholder { color: var(--faint); }
html[data-palette="c"] .s-search kbd { border-color: var(--line); color: var(--mid); }
html[data-palette="c"] .side .nav a:hover, html[data-palette="c"] .side .nav summary:hover { color: var(--ink); }
html[data-palette="c"] .side .nav > a.on { background: var(--brand-2); box-shadow: inset 3px 0 0 var(--accent); }
html[data-palette="c"] .s-icons button, html[data-palette="c"] .s-icons a { background: var(--soft); color: var(--mid); }
html[data-palette="c"] .side .s-user { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
html[data-palette="c"] .av { background-color: var(--brand-wash); color: var(--brand-ink); }
html[data-palette="c"] .side .nav { scrollbar-color: rgba(0,0,0,.2) transparent; }
/* D – grafit + bordo */
html[data-palette="d"] .side { box-shadow: 0 20px 40px -20px rgba(10,12,16,.6), 0 2px 6px rgba(10,12,16,.18); }
html[data-palette="d"] .side .nav > a.on { box-shadow: 0 6px 16px -6px rgba(0,0,0,.45), inset 3px 0 0 #c4262d; }

.main { min-width: 0; padding: 24px clamp(16px, 2.6vw, 32px) 48px; }
.topbar { display: none; }
.tb-logo { font-weight: 800; letter-spacing: .06em; color: var(--ink); }
.scrim { display: none; }
.ibtn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--mid); display: inline-grid; place-items: center; padding: 0; }
.ibtn:hover { background: var(--soft); color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--brand-ink); font-weight: 600; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- panel „Wygląd” ---------- */
.look { position: fixed; left: 24px; bottom: 140px; z-index: 1100; width: 300px; max-width: calc(100vw - 32px); padding: 14px 16px 12px; border-radius: 14px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-pop); display: flex; flex-direction: column; gap: 8px; font-family: var(--font); }
.look-h { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.look h5 { margin: 6px 0 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.look-pal { display: flex; flex-direction: column; gap: 6px; }
.look-pal button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-align: left; line-height: 1.3; }
.look-pal button:hover { background: var(--soft); }
.look-pal button.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-wash); }
.look-pal i { width: 30px; height: 30px; border-radius: 8px; flex: none; background: linear-gradient(135deg, var(--s1) 50%, var(--s2) 50%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.look-pal b { display: block; font-size: 13.5px; font-weight: 600; } .look-pal small { font-size: 12px; color: var(--mid); }
.look .linkbtn { align-self: flex-start; margin-top: 4px; }

/* ================= TREŚĆ PODSTRON (dotychczasowe widoki) ================= */
.main .content { margin: 0 !important; padding: 0; background: none; min-height: 0; max-width: 1400px; }
.main .container-padding { padding: 0; }
.main .content > .container-padding > .row { margin-left: -10px; margin-right: -10px; }
.main .content [class*="col-"] { padding-left: 10px; padding-right: 10px; }

/* nagłówek strony jak w prototypie */
.page-header { background: none; margin: 0 0 18px; padding: 0; border: 0; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px; }
.page-header .title { font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; color: var(--ink); padding: 0; }
.page-header .breadcrumb { background: none; padding: 0; margin: 0; font-size: 13px; }
.breadcrumb > li, .breadcrumb > li a { color: var(--mid); } .breadcrumb > li a:hover { color: var(--brand-ink); } .breadcrumb > .active { color: var(--mid); }
.breadcrumb > li + li:before { color: var(--faint); content: "›\00a0"; }
.page-header .right { position: static; min-width: 0; text-align: left; margin-top: 10px; }

/* panele = karty */
.panel { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: var(--r-card); box-shadow: var(--sh-float); margin-bottom: 18px; }
.panel-title { color: var(--ink); font-size: 15.5px; font-weight: 650; text-transform: none; letter-spacing: -.01em; border-bottom: 1px solid var(--line); padding: 14px 20px; }
.panel-tools .icon, .panel-tools .icon .fa { color: var(--faint); }
.panel-footer { background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-card) var(--r-card); }
.panel-heading { border-radius: var(--r-card) var(--r-card) 0 0; }
.panel-etykiety:empty { display: none; }

/* przyciski: granat zamiast niebieskiego i zielonego */
.btn { border-radius: var(--r-sm); font-weight: 550; box-shadow: var(--sh); transition: background .15s, border-color .15s, color .15s; text-shadow: none; }
.btn-default, .btn-primary, .btn-success, .btn-info { background-color: var(--brand-2); border: 1px solid var(--brand-2); color: #fff; }
.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default,
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.btn-success:hover, .btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success,
.btn-info:hover, .btn-info:focus, .btn-info:active { background-color: var(--brand); border-color: var(--brand); color: #fff; }
.btn-light, .btn-white { background-color: var(--card); color: var(--ink); border: 1px solid var(--field); }
.btn-light:hover, .btn-light:focus, .btn-light:active, .btn-light.active, .open > .dropdown-toggle.btn-light,
.btn-white:hover, .btn-white:focus, .btn-white:active, .btn-white.active, .open > .dropdown-toggle.btn-white { background-color: var(--soft); color: var(--ink); border-color: var(--field); }
.btn-danger { background-color: var(--bad-wash); color: var(--bad-ink); border: 1px solid transparent; }
.btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active { background-color: #fbdcda; color: var(--bad-ink); }
.btn-warning { background-color: var(--warn-wash); color: var(--warn-ink); border: 1px solid transparent; }
.btn-warning:hover, .btn-warning:focus { background-color: #fbecc4; color: var(--warn-ink); }
.btn-xs { border-radius: 6px; }

/* formularze */
.form-control { border: 1px solid var(--field); border-radius: var(--r-sm); box-shadow: none; color: var(--ink); }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input-group-addon { background: var(--surface); border-color: var(--field); color: var(--mid); }
.control-label { color: var(--mid); }
.checkbox-primary input[type="checkbox"]:checked + label::before, .checkbox input[type="checkbox"]:checked + label::before,
.radio-primary input[type="radio"]:checked + label::before { background-color: var(--brand-2); border-color: var(--brand-2); }
.checkbox input[type="checkbox"]:checked + label::after { color: #fff; }
.radio-primary input[type="radio"]:checked + label::after { background-color: var(--brand-2); }
.checkbox label::before, .radio label::before { border-color: var(--field); border-radius: 5px; }
.pagination > li > a, .pagination > li > span { color: var(--ink); border-color: var(--line); }
.pagination > li:first-child > a, .pagination > li:first-child > span { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pagination > li:last-child > a, .pagination > li:last-child > span { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > a:focus { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-pop); padding: 6px; }
.dropdown-menu > li > a { border-radius: 6px; color: var(--ink); }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background: var(--soft); color: var(--ink); }
.modal-content { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-pop); }
.modal-header { border-bottom: 1px solid var(--line); } .modal-footer { border-top: 1px solid var(--line); }

/* tabele jak w prototypie */
.table > thead > tr > th, .table > thead > tr > td { background: var(--surface); color: var(--mid); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line) !important; }
.table.lista > thead > tr > td { border: 0 !important; border-bottom: 1px solid var(--line) !important; }
.table > thead > tr > td:first-child, .table > thead > tr > th:first-child { border-top-left-radius: 10px; }
.table > thead > tr > td:last-child, .table > thead > tr > th:last-child { border-top-right-radius: 10px; }
.table > tbody > tr > td { border-top: 0; border-bottom: 1px solid var(--line); padding: 11px 12px; vertical-align: middle; }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: transparent; }
.table > tbody > tr:hover > td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.table-with-border, .table-with-border > tbody > tr > td, .table-bordered, .table-bordered > tbody > tr > td { border-color: var(--line); }

/* statusy jako „pigułki” jak w prototypie */
.label { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
.label-default { background: var(--info-wash); color: var(--info-ink); }
.label-primary { background: var(--brand-wash); color: var(--brand-ink); }
.label-info { background: #e1f1f6; color: #0b5266; }
.label-success { background: var(--ok-wash); color: var(--ok-ink); }
.label-warning { background: var(--warn-wash); color: var(--warn-ink); }
.label-danger { background: var(--bad-wash); color: var(--bad-ink); }
.label-grey { background: var(--soft); color: var(--mid); }

/* komunikaty */
.kode-alert { border-radius: var(--r); }
.kode-alert.alert3 { background: var(--ok-wash); color: var(--ok-ink); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.kode-alert.alert3 h4, .kode-alert.alert3 a { color: var(--ok-ink); }
.kode-alert.alert6 { background: var(--bad-wash); color: var(--bad-ink); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.kode-alert.alert6 h4, .kode-alert.alert6 a { color: var(--bad-ink); }

/* ================= LOGOWANIE ================= */
body.bm-login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.bm-login .login-form { width: 400px; max-width: 100%; padding: 0; }
.bm-login .login-form form { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: 0 24px 60px -30px rgba(16,24,40,.45); overflow: hidden; background: var(--card); }
.bm-login-top { background: var(--side-bg); padding: 22px 26px; display: flex; align-items: center; gap: 12px; }
.bm-login-top .wm { display: flex; flex-direction: column; line-height: 1.05; }
.bm-login-top .wm b { font-size: 18px; font-weight: 800; letter-spacing: .06em; color: var(--side-ink); }
.bm-login-top .wm small { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-mid); margin-top: 4px; }
html[data-palette="c"] .bm-login-top { border-bottom: 1px solid var(--line); }
.bm-login .login-form form .form-area { padding: 28px 26px 26px; }
.bm-login .login-form form .form-area .btn { height: 46px; font-size: 15px; }
.bm-login .footer-links a { color: var(--mid) !important; }

/* ================= TELEFON / TABLET ================= */
@media (max-width: 1024px) {
  .main .content { margin-left: 0 !important; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; top: 8px; bottom: 8px; left: 8px; height: auto; margin: 0; width: 280px; transform: translateX(-110%); transition: transform .25s ease; z-index: 1050; }
  body.menu-open .side { transform: none; } body.menu-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; z-index: 1040; background: rgba(10,20,35,.4); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 1000; margin: -16px -16px 16px; padding: 10px 16px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .main { padding: 16px 16px 40px; }
  .look { left: 16px; right: 16px; width: auto; bottom: 16px; }
}
@media (max-width: 760px) {
  .main .container-padding { margin-left: 0; margin-right: 0; }
  .page-header .title { font-size: 22px; }
}

/* ---------- lista zleceń (stary widok): bez czarnych ramek, spokojne wiersze ---------- */
.table.lista > tbody > tr > td { border-left: 0 !important; border-right: 0 !important; }
.table.lista > tbody > tr.row_szczegoly > td { border-bottom: 0; color: var(--mid); background: none; }
.table.lista > tbody > tr:not(.row_szczegoly) > td { border-top: 1px solid var(--line); border-bottom: 0; }
.table.lista .color-blue, .table.lista a.color-blue { color: var(--brand-ink) !important; }
.table.lista .f-size-18 { font-size: 15px; }
.table.lista tr.background > td { background: transparent; }
@media (max-width: 760px) {
  .panel-title .panel-tools { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
}

/* ================= LISTA ZLECEŃ – widok z prototypu ================= */
.bm-page { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.ph .eb { font-size: 13px; color: var(--mid); } .ph .eb b { color: var(--ink); font-weight: 600; }
.ph h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .btn, .bm-toolbar .btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; font-size: 14px; }
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.att { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--sh-float); position: relative; overflow: hidden; color: var(--ink); transition: transform .15s; }
.att:hover, .att:focus { transform: translateY(-2px); color: var(--ink); text-decoration: none; }
.att::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.att.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), var(--sh-float); }
.att .sq { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.att b { display: block; font-weight: 600; font-size: 13.5px; } .att small { display: block; font-size: 12px; color: var(--mid); }
.att .go { margin-left: auto; color: var(--faint); font-size: 18px; }
.t-bad { background: var(--bad-wash); color: var(--bad-ink); } .t-warn { background: var(--warn-wash); color: var(--warn-ink); } .t-info { background: var(--info-wash); color: var(--info-ink); }
.bm-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r); background: var(--soft-2); }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--mid); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--line); }
.seg.scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.seg.scroll::-webkit-scrollbar { display: none; }
.bm-toolbar .seg.scroll { flex: 0 1 auto; }

/* karta listy */
.lista_master { padding: 0; overflow: visible; }
.lista_master > .panel-body { padding: 0; }
.bm-list-h small { font-weight: 500; font-size: 13px; }
.bm-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 20px; }
.bm-filters .search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; margin: 0; border: 1px solid var(--field); border-radius: var(--r-sm); background: var(--card); color: var(--faint); flex: 1 1 320px; max-width: 520px; font-weight: 400; }
.bm-filters .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); height: 100%; }
.bm-filters .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.lista_master .responsive-table { overflow-x: auto; }
.lista_master .pagination { margin: 14px 20px; }
.lista_master .pag-top { display: none; }

/* tabela */
.table.bm-lista { margin: 0; border-collapse: separate; border-spacing: 0; width: 100%; }
.table.bm-lista > thead > tr > td { padding: 10px 12px; white-space: nowrap; border-radius: 0 !important; }
.table.bm-lista > thead > tr > td:first-child, .table.bm-lista > tbody > tr > td:first-child { padding-left: 20px; }
.table.bm-lista > thead td.is_sort { cursor: pointer; } .table.bm-lista > thead td.is_sort:hover { color: var(--ink); }
.table.bm-lista > thead td.asc::after { content: " ↑"; } .table.bm-lista > thead td.desc::after { content: " ↓"; }
.table.bm-lista > tbody > tr > td { padding: 12px; border-top: 0 !important; border-bottom: 1px solid var(--line) !important; vertical-align: top; font-size: 14px; color: var(--ink); background: var(--card); }
.table.bm-lista > tbody > tr.bm-row { cursor: pointer; }
.table.bm-lista > tbody > tr.bm-row:hover > td { background: color-mix(in srgb, var(--soft) 60%, var(--card)); }
.table.bm-lista > tbody > tr.sel > td { background: var(--brand-wash); }
.table.bm-lista small { display: block; font-size: 12px; color: var(--faint); line-height: 1.4; margin-top: 2px; }
.bm-lista .c-nr { white-space: nowrap; }
.bm-lista .c-nr .nr { font-weight: 700; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.bm-lista .c-nr .nr.sub { color: #8a4b00; }
.bm-lista .zdz_number { cursor: pointer; color: var(--brand) !important; }
.bm-lista .c-zl { min-width: 240px; } .bm-lista .c-zl .t { font-weight: 550; line-height: 1.4; }
.bm-lista .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--soft); color: var(--mid); text-decoration: none !important; }
a.tag:hover { color: var(--ink); background: var(--soft-2); }
.tag.warn { background: var(--warn-wash); color: var(--warn-ink); }
.bm-lista .meta { display: inline-flex; gap: 10px; color: var(--faint); font-size: 12px; }
.bm-lista .meta a, .bm-lista .meta span { display: inline-flex; align-items: center; gap: 3px; color: var(--faint); }
.bm-lista .meta a:hover { color: var(--ink); } .bm-lista .meta a.imp { color: var(--bad-ink); }
.bm-lista .meta .ic { width: 14px; height: 14px; }
.bm-lista .c-lok { min-width: 160px; } .bm-lista .c-wyk { min-width: 140px; }
.bm-lista .c-st { white-space: nowrap; } .bm-lista .chk { display: inline-grid; place-items: center; margin-left: 6px; color: var(--ok); vertical-align: middle; } .bm-lista .chk .ic { width: 15px; height: 15px; }
.bm-lista .c-dat, .bm-lista .c-ter { white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.late { color: var(--bad-ink); font-weight: 600; } .due.soon { color: var(--warn-ink); font-weight: 600; }
.bm-lista small.late { color: var(--bad-ink); font-weight: 600; }
.bm-lista .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bm-lista .c-act { width: 1%; white-space: nowrap; }
.row-act { display: flex; gap: 4px; justify-content: flex-end; }
.ia { width: 30px; height: 30px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--faint); display: inline-grid; place-items: center; padding: 0; }
.ia:hover, .open > .ia { background: var(--soft); color: var(--ink); border-color: var(--line); }
.row-act .dropdown-menu a.danger { color: var(--bad-ink); }
.table.bm-lista td.bm-sub { padding: 10px 20px; background: var(--warn-wash) !important; color: var(--warn-ink); border-bottom: 1px solid var(--line) !important; font-size: 13px; }
.table.bm-lista .komentarze-nieprzeczytane-box { padding: 0; }
.table.bm-lista .label.label-warning { background: var(--warn-wash) !important; color: var(--warn-ink) !important; }
/* gęstość kompaktowa */
body.compact .table.bm-lista > tbody > tr > td { padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; vertical-align: middle; }
body.compact .bm-lista .c-zl .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
body.compact .bm-lista .tags, body.compact .bm-lista td small:not(.late) { display: none; }

/* panel boczny */
.drawer-bg { position: fixed; inset: 0; z-index: 1060; background: rgba(20,16,16,.35); }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; z-index: 1065; width: min(560px, calc(100vw - 20px)); background: var(--card); border-radius: 18px; box-shadow: var(--sh-pop); display: flex; flex-direction: column; overflow: hidden; font-family: var(--font); }
.drawer header { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.drawer header .top { display: flex; align-items: center; gap: 10px; }
.drawer header .top .nr { color: inherit; font-weight: 700; }
.drawer header h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.35; }
.drawer .tags { display: flex; gap: 6px; flex-wrap: wrap; } .drawer .meta { display: inline-flex; gap: 10px; color: var(--faint); font-size: 12px; } .drawer .meta a, .drawer .meta span { display: inline-flex; gap: 3px; align-items: center; color: var(--faint); } .drawer .meta .ic { width: 14px; height: 14px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.drawer .body h4 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.drawer .desc { font-size: 14px; line-height: 1.6; background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.drawer .kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.drawer .kv > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.drawer .kv small { display: block; font-size: 12px; color: var(--mid); font-weight: 400; }
.drawer .kv b { font-size: 14.5px; font-weight: 600; } .drawer .kv b small { color: var(--faint); }
.drawer footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface); }
.drawer footer .btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; }
.drawer footer .sp { flex: 1; }

/* lista na telefonie: wiersze jako karty */
@media (max-width: 900px) {
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
}
@media (max-width: 760px) {
  .ph h1 { font-size: 22px; }
  .attn { grid-template-columns: 1fr; gap: 8px; }
  .bm-filters { padding: 12px; } .bm-filters .search { flex-basis: 100%; max-width: none; }
  .table.bm-lista thead { display: none; }
  .table.bm-lista, .table.bm-lista tbody { display: block; }
  .table.bm-lista > tbody > tr.bm-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--card); }
  .table.bm-lista > tbody > tr.bm-row > td { display: block; padding: 0 !important; border: 0 !important; background: none !important; }
  .bm-lista .c-nr { grid-column: 1; } .bm-lista .c-st { grid-column: 2; grid-row: 1; text-align: right; }
  .bm-lista .c-zl, .bm-lista .c-lok, .bm-lista .c-wyk { grid-column: 1 / -1; min-width: 0; }
  .bm-lista .c-lok small, .bm-lista .c-wyk small { display: inline; margin-left: 6px; }
  .bm-lista .c-dat { display: none !important; }
  .bm-lista .c-ter { grid-column: 1; } .bm-lista .c-war { grid-column: 2; }
  .bm-lista .c-act { grid-column: 1 / -1; width: auto; }
  .table.bm-lista > tbody > tr:not(.bm-row) { display: block; } .table.bm-lista > tbody > tr:not(.bm-row) > td { display: block; }
}
.lista_master > .panel-title { margin: 0; border-radius: 16px 16px 0 0; }
.table.bm-lista > tbody > tr > td, .table.bm-lista > thead > tr > td { padding-left: 10px; padding-right: 10px; }
.bm-lista .c-zl { min-width: 200px; } .bm-lista .c-lok, .bm-lista .c-wyk { min-width: 0; }
@media (max-width: 1500px) and (min-width: 761px) { .bm-lista .c-dat { display: none; } }

/* ================= LISTA ZLECEŃ – karty z kalendarzykiem terminu (propozycja 3) ================= */
.table.bm-lista.cards, .table.bm-lista.cards > tbody { display: block; width: 100%; }
.table.bm-lista.cards > thead { display: block; }
.table.bm-lista.cards > thead > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 20px 12px; }
.table.bm-lista.cards > thead > tr::before { content: "Sortuj:"; font-size: 12.5px; color: var(--faint); margin-right: 4px; }
.table.bm-lista.cards > thead > tr > td { display: none; }
.table.bm-lista.cards > thead > tr > td.is_sort { display: inline-flex; align-items: center; height: 28px; padding: 0 11px !important; border: 1px solid var(--line) !important; border-radius: 99px !important; background: var(--card); font-size: 12px; letter-spacing: .03em; color: var(--mid); }
.table.bm-lista.cards > thead > tr > td.is_sort.asc, .table.bm-lista.cards > thead > tr > td.is_sort.desc { background: var(--brand-wash); color: var(--brand-ink); border-color: transparent !important; }
.table.bm-lista.cards > tbody { padding: 0 20px 20px; }
.table.bm-lista.cards > tbody > tr.bm-row { display: block; margin: 0 0 14px; cursor: default; background: none; padding: 0; border: 0; }
.table.bm-lista.cards > tbody > tr.bm-row > td.bm-card { display: block; padding: 0 !important; border: 0 !important; background: none !important; font-size: 13.5px; }
.table.bm-lista.cards > tbody > tr.bm-row:hover > td { background: none !important; }

.bm-card .z { display: grid; grid-template-columns: 92px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: box-shadow .15s, border-color .15s; color: var(--ink); }
.bm-card .z:hover { box-shadow: var(--sh-float); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.bm-card .ic { width: 15px; height: 15px; flex: none; }
.bm-card .s { color: var(--mid); font-weight: 400; }
.bm-card .sp { flex: 1; }

/* kalendarzyk */
.bm-card .cal { --c: var(--soft-2); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 6px; text-align: center; background: color-mix(in srgb, var(--c) 10%, var(--card)); border-right: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); color: var(--ink); }
.bm-card .cal .m { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bm-card .cal .d { font-size: 30px; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bm-card .cal .mm { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.bm-card .cal .x { margin-top: 8px; font-size: 11px; font-weight: 700; line-height: 1.25; padding: 3px 6px; border-radius: 6px; color: var(--mid); }
.bm-card .cal.n { background: var(--surface); border-right-color: var(--line); }
.bm-card .cal.bad { --c: var(--bad); color: var(--bad-ink); }
.bm-card .cal.bad .x { background: var(--bad); color: #fff; }
.bm-card .cal.warn { --c: var(--warn); color: var(--warn-ink); }
.bm-card .cal.warn .x { background: var(--warn-wash); color: var(--warn-ink); }

.bm-card .mn { min-width: 0; }
.bm-card .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; flex-wrap: wrap; row-gap: 8px; }
.bm-card .hd .nr { font-size: 17px; font-weight: 750; letter-spacing: -.01em; color: var(--brand-ink); white-space: nowrap; }
.bm-card .hd .nr.sub { color: #8a4b00; }
.bm-card .hd .nr2 { font-size: 13px; color: var(--faint); font-weight: 500; white-space: nowrap; }
.bm-card .hd .label { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.bm-card .hd .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.bm-card .hd .label.label-warning { background: var(--warn-wash) !important; color: var(--warn-ink) !important; }
.bm-card .chk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, var(--card)); color: var(--ok); }
.bm-card .chk .ic { width: 13px; height: 13px; }
.bm-card .chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--soft); color: var(--mid); font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.bm-card a.chip:hover { background: var(--soft-2); color: var(--ink); }
.bm-card .chip.warn { background: var(--warn-wash); color: var(--warn-ink); }
.bm-card .chip .ic { width: 13px; height: 13px; }
.bm-card .zdz_number { cursor: pointer; color: var(--info-ink) !important; background: var(--info-wash); }

.bm-card .acts { display: flex; gap: 6px; align-items: center; }
.bm-card .acts .ia { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--mid); }
.bm-card .acts .ia:hover, .bm-card .acts .open > .ia { color: var(--ink); border-color: var(--field); background: var(--soft); }
.bm-card .acts .dropdown-menu a.danger { color: var(--bad-ink); }
.bm-card .btn-open { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 10px; font-size: 13px; }

.bm-card .ds { display: flex; gap: 14px; align-items: flex-start; padding: 8px 18px 10px; }
.bm-card .op { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; max-width: 120ch; overflow-wrap: anywhere; }
.bm-card .z.open .op { display: block; }
.bm-card .more { display: none; flex: none; border: 0; background: none; padding: 2px 0; color: var(--info-ink); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.bm-card .z.cut .more { display: inline-flex; }

.bm-card .line { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-top: 1px dashed var(--line); white-space: nowrap; min-width: 0; }
.bm-card .line .it { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bm-card .line .it > .ic { color: var(--faint); }
.bm-card .line .it > span { overflow: hidden; text-overflow: ellipsis; }
.bm-card .line .lok { flex: 1.2 1 0; } .bm-card .line .wyk { flex: 1 1 0; } .bm-card .line .zgl { flex: none; }
.bm-card .line.podw { background: var(--warn-wash); color: var(--warn-ink); border-top-style: solid; }
.bm-card .line.podw a { color: inherit; font-weight: 700; text-decoration: underline; }
.bm-card .line.ft .tg { display: flex; gap: 6px; align-items: center; }
.bm-card .mt { display: inline-flex; gap: 12px; color: var(--faint); font-size: 12.5px; font-weight: 500; }
.bm-card .mt a, .bm-card .mt span { display: inline-flex; gap: 4px; align-items: center; color: var(--faint); }
.bm-card .mt a:hover { color: var(--ink); } .bm-card .mt a.imp { color: var(--bad-ink); }
.bm-card .mt .ic { width: 14px; height: 14px; }
.bm-card .val { margin-left: auto; font-size: 15.5px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* nieprzeczytane komentarze */
.bm-card .km { margin: 0 18px 14px; background: color-mix(in srgb, var(--warn-wash) 70%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); border-radius: 12px; padding: 10px 12px; }
.bm-card .kmh { display: flex; align-items: center; gap: 8px; color: var(--warn-ink); font-size: 12.5px; margin-bottom: 8px; }
.bm-card .kmh .cnt { background: var(--warn); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; }
.bm-card .kmh a { color: var(--info-ink); font-weight: 600; }
.bm-card .kmh a[disabled] { opacity: .6; pointer-events: none; }
.bm-card .kc { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 10px; padding: 7px 8px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.bm-card .kc + .kc { margin-top: 6px; }
.bm-card .kc .av { width: 28px; height: 28px; border-radius: 50%; background: var(--warn-wash); color: var(--warn-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.bm-card .kc .kt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.bm-card .kc .kt > div { flex: none; display: flex; gap: 8px; align-items: baseline; }
.bm-card .kc .kt b { font-size: 13px; } .bm-card .kc .kt .f { color: var(--faint); font-size: 12px; }
.bm-card .kc p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bm-card .btn-xs2 { height: 28px; padding: 0 10px; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; border-radius: 8px; flex: none; }
.bm-card .btn-xs2 .fa { color: var(--ok); }
.bm-card .btn-xs2[disabled] { opacity: .6; pointer-events: none; }

/* widok kompaktowy */
body.compact .bm-card .op { -webkit-line-clamp: 1; font-size: 14px; }
body.compact .bm-card .ds { padding-top: 4px; padding-bottom: 6px; }
body.compact .bm-card .cal { padding: 10px 4px; } body.compact .bm-card .cal .d { font-size: 24px; }
body.compact .bm-card .line { padding-top: 7px; padding-bottom: 7px; }
body.compact .table.bm-lista.cards > tbody > tr.bm-row { margin-bottom: 8px; }

/* laptop / tablet / telefon */
@media (max-width: 1200px) {
  .bm-card .line:not(.ft):not(.podw) { flex-wrap: wrap; row-gap: 6px; }
  .bm-card .line .lok, .bm-card .line .wyk { flex: 1 1 260px; }
}
@media (max-width: 760px) {
  .table.bm-lista.cards > tbody { padding: 0 10px 12px; }
  .table.bm-lista.cards > thead > tr { padding: 0 12px 10px; }
  .bm-card .z { grid-template-columns: 64px minmax(0, 1fr); }
  .bm-card .cal { padding: 12px 4px; } .bm-card .cal .d { font-size: 22px; } .bm-card .cal .x { font-size: 10px; padding: 2px 4px; }
  .bm-card .hd { padding: 12px 12px 0; } .bm-card .hd .acts { width: 100%; }
  .bm-card .hd .btn-open { margin-left: auto; }
  .bm-card .ds, .bm-card .line { padding-left: 12px; padding-right: 12px; }
  .bm-card .line { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .bm-card .line .it { flex: 1 1 100% !important; }
  .bm-card .line .it > span { white-space: nowrap; }
  .bm-card .line.ft .tg { flex-wrap: wrap; }
  .bm-card .km { margin: 0 12px 12px; }
  .bm-card .kc { flex-wrap: wrap; } .bm-card .kc .kt { flex-basis: calc(100% - 40px); flex-direction: column; gap: 2px; } .bm-card .kc p { white-space: normal; }
  .bm-card .kc .btn-xs2 { margin-left: 38px; }
}
@media (max-width: 760px) {
  .bm-card .z { grid-template-columns: minmax(0, 1fr); }
  .bm-card .cal { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); text-align: left; }
  .bm-card .cal.n { border-bottom-color: var(--line); }
  .bm-card .cal .d { font-size: 18px; } .bm-card .cal .mm { font-size: 12px; }
  .bm-card .cal .x { margin: 0 0 0 auto; align-self: center; }
  .bm-card .kmh { flex-wrap: wrap; } .bm-card .kmh .sp { display: none; } .bm-card .kmh a { flex-basis: 100%; }
  .bm-card .kc .kt > div { flex-wrap: wrap; }
}

/* ================= LISTA ZLECEŃ v2 – osobne karty: Zlecenie | Termin | Akcje + wartość ================= */
.bm-card .z.u-n, .bm-card .z.u-ok, .bm-card .z.u-warn, .bm-card .z.u-bad { --u: var(--soft-2); }
.bm-card .z.u-ok { --u: var(--ok); } .bm-card .z.u-warn { --u: var(--warn); } .bm-card .z.u-bad { --u: var(--bad); }
.cards2 .bm-card .z { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 150px 236px; border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.cards2 .bm-card .z { overflow: visible; }
.cards2 .bm-card .z::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 5px; border-radius: 12px 0 0 12px; background: var(--u); }
.cards2 > tbody > tr.bm-row { margin-bottom: 10px; }
.cards2 .bm-card .zl { min-width: 0; padding: 13px 16px 13px 20px; display: flex; flex-direction: column; gap: 5px; }
.cards2 .bm-card .r1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px; }
.cards2 .bm-card .r1 .nr { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; color: var(--brand-ink); white-space: nowrap; }
.cards2 .bm-card .r1 .nr.sub { color: #8a4b00; }
.cards2 .bm-card .r1 .nr2 { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.cards2 .bm-card .r1 .label { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.cards2 .bm-card .r1 .label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.cards2 .bm-card .r1 .label.label-warning { background: var(--warn-wash) !important; color: var(--warn-ink) !important; }
.cards2 .bm-card .chip { height: 22px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.cards2 .bm-card .mt { margin-left: auto; gap: 11px; font-size: 12px; white-space: nowrap; }
.cards2 .bm-card .mt .ic { width: 13px; height: 13px; }
.cards2 .bm-card .mt .zdz_number { cursor: pointer; color: var(--info-ink) !important; background: none; font-weight: 600; }
.cards2 .bm-card .kbadge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: #ffe8cc; color: #9a3412 !important; font-size: 12px; font-weight: 750; white-space: nowrap; text-decoration: none !important; box-shadow: 0 0 0 1px #fcd9a8 inset; }
.cards2 .bm-card .kbadge .ic { width: 13px; height: 13px; }
.cards2 .bm-card .ds { padding: 0; gap: 10px; align-items: baseline; }
.cards2 .bm-card .op { font-size: 14.5px; font-weight: 650; line-height: 1.45; color: var(--ink); }
.cards2 .bm-card .z.has-new .op { font-weight: 800; }
.cards2 .bm-card .r4 { display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 13px; color: var(--ink); }
.cards2 .bm-card .r4 .it { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cards2 .bm-card .r4 .it > .ic { width: 14px; height: 14px; color: var(--faint); align-self: center; }
.cards2 .bm-card .r4 b { font-weight: 600; }
.cards2 .bm-card .podw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; padding: 6px 10px; border-radius: 8px; background: var(--warn-wash); color: var(--warn-ink); font-size: 12.5px; }
.cards2 .bm-card .podw .ic { width: 14px; height: 14px; }
.cards2 .bm-card .podw a { color: inherit; font-weight: 700; text-decoration: underline; }

.cards2 .bm-card .tm { padding: 13px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.cards2 .bm-card .tm .k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.cards2 .bm-card .tm .d { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cards2 .bm-card .due { font-size: 12.5px; font-weight: 600; color: var(--mid); }
.cards2 .bm-card .due.bad { color: var(--bad-ink); font-weight: 750; }
.cards2 .bm-card .due.warn { color: var(--warn-ink); font-weight: 700; }
.cards2 .bm-card .due.ok { color: var(--ok-ink); }

.cards2 .bm-card .ac2 { padding: 12px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cards2 .bm-card .ac2 .acts { gap: 5px; }
.cards2 .bm-card .ac2 .ia { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; padding: 0; }
.cards2 .bm-card .ac2 .ia .ic { width: 17px; height: 17px; }
.cards2 .bm-card .pr { text-align: right; line-height: 1.2; display: flex; flex-direction: column; align-items: flex-end; }
.cards2 .bm-card .pr b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cards2 .bm-card .pr small { font-size: 11.5px; color: var(--faint); }
.cards2 .bm-card .pr a { font-size: 12.5px; font-weight: 600; }

/* nieprzeczytane komentarze – pełna szerokość karty */
.cards2 .bm-card .km { grid-column: 1 / -1; margin: 0 14px 14px 20px; padding: 0; background: #fff8ec; border: 1px solid #fcd9a8; border-left: 4px solid #f59e0b; border-radius: 10px; overflow: hidden; }
.cards2 .bm-card .kmh { margin: 0; padding: 8px 12px; font-size: 12.5px; color: #9a3412; border-bottom: 1px solid #fce3bf; }
.cards2 .bm-card .kmh .ic { width: 15px; height: 15px; }
.cards2 .bm-card .komentarze-nieprzeczytane-list { padding: 4px 0; }
.cards2 .bm-card .kc { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 8px 12px; background: none; box-shadow: none; border-radius: 0; font-size: 13.5px; }
.cards2 .bm-card .kc + .kc { margin-top: 0; border-top: 1px dashed #fce3bf; }
.cards2 .bm-card .kc .av { width: 30px; height: 30px; background: #ffe8cc; color: #9a3412; }
.cards2 .bm-card .kc .kt { display: block; }
.cards2 .bm-card .kc .ka { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cards2 .bm-card .kc p { margin: 2px 0 0; white-space: normal; overflow: visible; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.cards2 .bm-card .kc .kb { display: flex; gap: 6px; }
.cards2 .bm-card .kc .btn-xs2 .ic { width: 13px; height: 13px; }

body.compact .cards2 .bm-card .zl { padding-top: 9px; padding-bottom: 9px; gap: 3px; }
body.compact .cards2 .bm-card .ac2 .ia { width: 32px; height: 32px; }
body.compact .cards2 > tbody > tr.bm-row { margin-bottom: 7px; }

@media (max-width: 1200px) {
  .cards2 .bm-card .z { grid-template-columns: minmax(0, 1fr) 132px 214px; }
  .cards2 .bm-card .ac2 .ia { width: 33px; height: 33px; }
  .cards2 .bm-card .mt { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 760px) {
  .cards2 .bm-card .z { grid-template-columns: minmax(0, 1fr) auto; }
  .cards2 .bm-card .zl { grid-column: 1 / -1; padding: 12px 12px 8px 16px; }
  .cards2 .bm-card .tm { border-left: 0; border-top: 1px solid var(--line); padding: 10px 12px 10px 16px; }
  .cards2 .bm-card .ac2 { border-left: 0; border-top: 1px solid var(--line); padding: 10px 12px; }
  .cards2 .bm-card .ac2 .acts { flex-wrap: wrap; justify-content: flex-end; }
  .cards2 .bm-card .r4 { flex-direction: column; }
  .cards2 .bm-card .km { margin: 0 10px 12px 14px; }
  .cards2 .bm-card .kc { grid-template-columns: 30px minmax(0, 1fr); }
  .cards2 .bm-card .kc .kb { grid-column: 2; flex-wrap: wrap; }
  .cards2 .bm-card .kc .btn-xs2 { margin-left: 0; }
  .cards2 .bm-card .kmh { flex-wrap: wrap; } .cards2 .bm-card .kmh .sp { display: none; } .cards2 .bm-card .kmh a { flex-basis: 100%; }
}

/* lista v2 – czytelniejsze karty i odstępy */
.cards2 > tbody { padding-top: 4px; }
.cards2 > tbody > tr.bm-row { margin-bottom: 16px; }
.cards2 .bm-card .z { border-color: #d6dde5; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 6px 16px -10px rgba(16,24,40,.22); transition: box-shadow .15s, border-color .15s; }
.cards2 .bm-card .z:hover { border-color: color-mix(in srgb, var(--brand) 35%, #d6dde5); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 12px 26px -14px rgba(16,24,40,.32); }
.cards2 .bm-card .z::before { width: 6px; }
.cards2 .bm-card .z.u-ok { --u: color-mix(in srgb, var(--ok) 55%, #fff); }
.cards2 .bm-card .zl { padding: 16px 20px 16px 24px; gap: 7px; }
.cards2 .bm-card .r1 .nr { font-size: 17px; }
.cards2 .bm-card .op { font-size: 15px; font-weight: 600; }
.cards2 .bm-card .r4 { padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--line); }
.cards2 .bm-card .tm, .cards2 .bm-card .ac2 { background: #f8fafc; }
.cards2 .bm-card .tm { padding: 16px; }
.cards2 .bm-card .ac2 { padding: 14px 16px; border-radius: 0 12px 12px 0; }
.cards2 .bm-card .z.has-new .ac2 { border-radius: 0 12px 0 0; }
.cards2 .bm-card .z.has-new .op { font-weight: 600; }
.cards2 .bm-card .km { margin: 0; border-radius: 0 0 12px 12px; border-width: 1px 0 0 0; border-left: 0; border-top-color: #fcd9a8; }
.cards2 .bm-card .kmh { padding: 9px 18px 9px 24px; font-size: 13px; }
.cards2 .bm-card .kc { padding: 10px 18px 10px 24px; }
@media (max-width: 760px) {
  .cards2 > tbody > tr.bm-row { margin-bottom: 12px; }
  .cards2 .bm-card .zl { padding: 13px 14px 12px 18px; }
  .cards2 .bm-card .ac2 { border-radius: 0 0 12px 0; }
  .cards2 .bm-card .z.has-new .ac2 { border-radius: 0; }
  .cards2 .bm-card .km { margin: 0; }
  .cards2 .bm-card .kmh, .cards2 .bm-card .kc { padding-left: 18px; padding-right: 12px; }
}
.cards2 .bm-card .kmh { background: #ffedd5; border-bottom-color: #fcd9a8; font-weight: 700; }
.cards2 .bm-card .kmh .ic { color: #ea580c; }

/* lista v2 – kolory: numer grafitowy, wszystkie linki w jednym kolorze, „Pokaż całość” pod opisem */
.cards2 .bm-card { --lnk: #1f5582; --lnk-h: #173f63; }
.cards2 .bm-card .r1 .nr { color: var(--ink); }
.cards2 .bm-card .r1 .nr:hover { color: var(--brand); text-decoration: none; }
.cards2 .bm-card .ds { flex-direction: column; align-items: flex-start; gap: 2px; }
.cards2 .bm-card .more { padding: 0; font-size: 12.5px; color: var(--lnk); }
.cards2 .bm-card .more:hover { color: var(--lnk-h); text-decoration: underline; }
.cards2 .bm-card .r4 a, .cards2 .bm-card .pr a, .cards2 .bm-card .kmh a, .cards2 .bm-card .mt .zdz_number { color: var(--lnk) !important; font-weight: 600; }
.cards2 .bm-card .r4 a:hover, .cards2 .bm-card .pr a:hover, .cards2 .bm-card .kmh a:hover { color: var(--lnk-h) !important; text-decoration: underline; }
.cards2 .bm-card .r4 a[href^="tel:"] { font-weight: 500; }
.cards2 .bm-card .pr a { display: inline-flex; align-items: center; height: 28px; margin-top: 4px; padding: 0 10px; border: 1px dashed color-mix(in srgb, var(--lnk) 45%, #fff); border-radius: 8px; font-size: 12.5px; }
.cards2 .bm-card .pr a:hover { background: color-mix(in srgb, var(--lnk) 8%, #fff); text-decoration: none; }

/* lista v2 – termin w pigułkach, podwykonawca na fioletowo */
.cards2 .bm-card .due { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; margin-top: 4px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--mid); white-space: nowrap; }
.cards2 .bm-card .due.bad { background: #fde8e8; color: #b42318; box-shadow: inset 0 0 0 1px #f6c4c4; }
.cards2 .bm-card .due.warn { background: #fef3c7; color: #92400e; box-shadow: inset 0 0 0 1px #fbe0a0; }
.cards2 .bm-card .due.ok { background: var(--ok-wash); color: var(--ok-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, #fff); }
.cards2 .bm-card .podw { background: #f5f3ff; color: #5b21b6; box-shadow: inset 0 0 0 1px #ddd6fe; }
.cards2 .bm-card .podw a { color: #5b21b6; }

/* lista v2 – podświetlenia grafitowe zamiast bordo, wyraźniejsza ramka po najechaniu */
.table.bm-lista.cards2 > thead > tr > td.is_sort.asc, .table.bm-lista.cards2 > thead > tr > td.is_sort.desc { background: #2b3138; color: #fff; }
.table.bm-lista.cards2 > thead > tr > td.is_sort:hover { border-color: #9aa5b1 !important; }
.cards2 .bm-card .z:hover { border-color: #8a96a3; box-shadow: 0 0 0 1px #8a96a3, 0 14px 30px -16px rgba(16,24,40,.38); }
.cards2 .bm-card .r1 .nr:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* lista v2 – pasek tylko dla pilnych (po terminie / dziś-jutro), schowany pod ramką */
.cards2 .bm-card .z::before { left: 0; top: 0; bottom: 0; width: 5px; border-radius: 11px 0 0 11px; }
.cards2 .bm-card .z.u-n::before, .cards2 .bm-card .z.u-ok::before { display: none; }

/* lista v2 – termin na końcu linii lokalizacja/wykonawca (bez osobnej kolumny) */
.cards2 .bm-card .z { grid-template-columns: minmax(0, 1fr) 236px; }
.cards2 .bm-card .r4 { align-items: center; }
.cards2 .bm-card .r4 .tin { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cards2 .bm-card .r4 .tin .k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.cards2 .bm-card .r4 .tin b { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cards2 .bm-card .r4 .tin .due { margin: 0; }
@media (max-width: 1200px) { .cards2 .bm-card .z { grid-template-columns: minmax(0, 1fr) 214px; } }
@media (max-width: 760px) {
  .cards2 .bm-card .z { grid-template-columns: minmax(0, 1fr); }
  .cards2 .bm-card .ac2 { border-radius: 0 0 12px 12px; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .cards2 .bm-card .z.has-new .ac2 { border-radius: 0; }
  .cards2 .bm-card .r4 .tin { margin-left: 0; }
}
@media (max-width: 760px) {
  .cards2 .bm-card .r4 { align-items: flex-start; }
  .cards2 .bm-card .ac2 .pr { margin-left: auto; }
}
/* termin z ikonkami: kalendarz przy dacie, ptaszek przy realizacji, wykrzyknik po terminie */
.cards2 .bm-card .r4 .tin b { display: inline-flex; align-items: center; gap: 6px; }
.cards2 .bm-card .r4 .tin b .ic { width: 15px; height: 15px; color: var(--faint); }
.cards2 .bm-card .due .ic { width: 13px; height: 13px; margin-right: 4px; stroke-width: 2.4; }

/* lista v2 – numer zlecenia w jasnogranatowej plakietce */
.cards2 .bm-card .r1 .nr { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: #e8f0f7; color: #173f63; box-shadow: inset 0 0 0 1px #c9d9e8; font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cards2 .bm-card .r1 .nr:hover { background: #dbe7f2; color: #173f63; text-decoration: none; }
.cards2 .bm-card .r1 .nr.sub { background: #fdf1e3; color: #8a4b00; box-shadow: inset 0 0 0 1px #f3d6b3; }

/* ================= OKNO ZLECENIA – PANEL Z PRAWEJ (wersja C) ================= */
#zlecenieModal.bmz { padding: 0 !important; }
#zlecenieModal.bmz .modal-dialog { position: fixed; top: 10px; right: 10px; bottom: 10px; left: auto; margin: 0; width: min(1000px, calc(100vw - 20px)); max-width: none; transform: translateX(48px); transition: transform .22s ease-out; }
#zlecenieModal.bmz.in .modal-dialog { transform: none; }
#zlecenieModal.bmz .modal-content { height: 100%; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(10,12,16,.55); }
#zlecenieModal.bmz .modal-body { flex: 1 1 auto; overflow: auto; padding: 0 22px 18px; background: #fff; }
/* nagłówek */
#zlecenieModal.bmz .modal-header { flex: none; padding: 16px 22px 12px; background: linear-gradient(180deg, #f5f6f8, #fff); border-bottom: 0; position: relative; }
#zlecenieModal.bmz .modal-header .close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 8px; opacity: .6; font-size: 26px; line-height: 30px; }
#zlecenieModal.bmz .modal-header .close:hover { background: #eef1f4; opacity: 1; }
#zlecenieModal.bmz .bmz-r1 { display: flex; align-items: center; gap: 10px; padding-right: 44px; min-height: 32px; flex-wrap: wrap; }
#zlecenieModal.bmz .bmz-sp { flex: 1; }
#zlecenieModal.bmz .bmz-nr { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 7px; background: #e8f0f7; color: #173f63; box-shadow: inset 0 0 0 1px #c9d9e8; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
#zlecenieModal.bmz .bmz-nr:empty { display: none; }
#zlecenieModal.bmz .bmz-st .label { font-size: 12px; padding: 5px 10px; border-radius: 99px; }
#zlecenieModal.bmz .bmz-edit { height: 34px; padding: 0 14px; border-radius: 8px; background: #2b3138; border-color: #2b3138; color: #fff; font-weight: 600; }
#zlecenieModal.bmz .bmz-edit:hover { background: #1d2126; color: #fff; }
#zlecenieModal.bmz .bmz-mode-e { display: none; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; background: #fef3c7; color: #92400e; font-weight: 700; font-size: 12.5px; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-edit { display: none; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-mode-e { display: inline-flex; }
#zlecenieModal.bmz .modal-header .modal-title { margin: 10px 0 2px; font-size: 19px; font-weight: 700; color: #1d232a; line-height: 1.3; padding-right: 30px; }
#zlecenieModal.bmz .bmz-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: #6b747e; font-size: 13px; }
#zlecenieModal.bmz .bmz-meta .fa { color: #8a96a3; margin-right: 3px; }
#zlecenieModal.bmz .bmz-meta a { color: #1f5582; font-weight: 600; }
/* zakładki u góry zamiast kolumny po lewej */
#zlecenieModal.bmz .modal-body > .row { margin: 0; }
#zlecenieModal.bmz .modal-body > .row > [class*="col-"] { width: 100%; float: none; padding: 0; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 { position: sticky; top: 0; z-index: 20; background: #fff; padding: 4px 0 12px; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .panel { margin: 0; padding: 0 !important; background: none; box-shadow: none; border: 0; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group { display: flex; gap: 4px; margin: 0 !important; padding: 4px; background: #eef1f4; border-radius: 11px; overflow-x: auto; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 7px 12px; border: 0 !important; border-radius: 8px !important; background: none; color: #5b6570; font-weight: 600; font-size: 13px; white-space: nowrap; box-shadow: none; text-align: center; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item .fa { color: #8a96a3; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item:hover { background: rgba(255,255,255,.6); color: #1d232a; }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item.tab_active { background: #fff; color: #1d232a; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item.tab_active .fa { color: #2b3138; }
#zlecenieModal.bmz .bmz-c { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #d9dee3; color: #3b444d; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
#zlecenieModal.bmz .zdarzenia_unread_badge { border-radius: 99px; background: #b42318; padding: 2px 7px; font-size: 11px; }
#zlecenieModal.bmz .bmz-tab-edit { display: none !important; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-tab-edit { display: flex !important; background: #fff7e0 !important; color: #92400e !important; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-tab-edit .fa { color: #b45309 !important; }
#zlecenieModal.bmz .podwykonawca_alert:empty { display: none; }
#zlecenieModal.bmz .podwykonawca_alert { padding: 10px 0 0; }
/* panele w zakładkach – płasko, sekcje oddzielone linią */
#zlecenieModal.bmz .tab-content > .tab-pane > .panel { margin: 0 0 14px; border: 1px solid #e3e7eb; border-radius: 12px; box-shadow: none; background: #fff; }
#zlecenieModal.bmz .tab-content > .tab-pane > .panel > .panel-title { border-bottom: 1px solid #eef1f4; padding: 12px 16px; font-size: 13px; font-weight: 700; color: #4a535d; text-transform: none; min-height: 0; height: auto !important; }
#zlecenieModal.bmz .tab-content > .tab-pane > .panel > .panel-body { padding: 14px 16px; }
/* podgląd: etykieta nad wartością, dwie kolumny */
#zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body > :not(.form-group) { grid-column: 1 / -1; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body > hr { display: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-group { margin: 0 !important; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-group .row { margin: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-group .row > [class*="col-"] { width: 100%; float: none; padding: 0; text-align: left !important; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-group .control-label { padding: 0; margin: 0 0 2px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: #7a838d; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-group .control-label b { font-weight: 700; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .form-control-static { padding: 0; min-height: 0; font-size: 14.5px; color: #1d232a; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; background: none; border: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats > li { flex: 1; width: auto; float: none; padding: 10px 12px; border-radius: 10px; background: #f6f7f9; border: 0; min-height: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats > li.arrow { display: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats .title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7a838d; font-weight: 700; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats h3 { font-size: 17px; margin: 2px 0 0; font-weight: 800; color: #1d232a; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .zlecenie_desc { display: block; font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .panel-title .form-group .control-label { font-size: 13px; color: #4a535d; }
/* edycja: zmienione pola */
#zlecenieModal.bmz .form-group.bmz-chg > .col-md-12 > .row > .control-label,
#zlecenieModal.bmz .form-group.bmz-chg .control-label:first-child { color: #b45309; }
#zlecenieModal.bmz .form-group.bmz-chg .control-label { color: #b45309 !important; }
#zlecenieModal.bmz .form-group.bmz-chg .control-label:after { content: " • zmieniono"; font-weight: 600; font-size: 11.5px; letter-spacing: 0; text-transform: none; color: #b45309; white-space: nowrap; }
#zlecenieModal.bmz .form-group.bmz-chg .form-control,
#zlecenieModal.bmz .form-group.bmz-chg .bootstrap-select > .btn { border-color: #e0a84a !important; background-color: #fffdf5 !important; }
#zlecenieModal.bmz[data-mode="edit"] .modal-content { box-shadow: 0 0 0 3px #f3d48a, 0 30px 70px -20px rgba(10,12,16,.55); }
/* stopka: podgląd = podpowiedź + Zamknij; edycja lub zmiany = ciemny pasek z Zapisz */
#zlecenieModal.bmz .modal-footer { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 22px; background: #f8f9fb; text-align: left; }
#zlecenieModal.bmz .modal-footer > .btn { margin: 0; }
#zlecenieModal.bmz .bmz-info { flex: 1; color: #7a838d; font-size: 12.5px; }
#zlecenieModal.bmz .bmz-dirty-txt { flex: 1; display: none; }
#zlecenieModal.bmz .bmz-l-e, #zlecenieModal.bmz .bmz-back { display: none; }
#zlecenieModal.bmz .btn-save, #zlecenieModal.bmz .btn-save-and-close { display: none; }
#zlecenieModal.bmz[data-mode="edit"] .modal-footer, #zlecenieModal.bmz.bmz-is-dirty .modal-footer { background: #2b3138; border-top-color: #2b3138; color: #fff; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-info, #zlecenieModal.bmz.bmz-is-dirty .bmz-info { display: none; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-dirty-txt, #zlecenieModal.bmz.bmz-is-dirty .bmz-dirty-txt { display: block; }
#zlecenieModal.bmz[data-mode="edit"] .btn-save, #zlecenieModal.bmz[data-mode="edit"] .btn-save-and-close,
#zlecenieModal.bmz.bmz-is-dirty .btn-save, #zlecenieModal.bmz.bmz-is-dirty .btn-save-and-close { display: inline-flex; align-items: center; gap: 6px; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-l-v, #zlecenieModal.bmz.bmz-is-dirty .bmz-l-v { display: none; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-l-e, #zlecenieModal.bmz.bmz-is-dirty .bmz-l-e { display: inline; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-back { display: inline-block; }
#zlecenieModal.bmz[data-mode="edit"] .modal-footer .btn-white, #zlecenieModal.bmz.bmz-is-dirty .modal-footer .btn-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
#zlecenieModal.bmz[data-mode="edit"] .modal-footer .btn-success, #zlecenieModal.bmz.bmz-is-dirty .modal-footer .btn-success { background: #fff; border-color: #fff; color: #2b3138; font-weight: 700; }
#zlecenieModal.bmz[data-mode="edit"] .modal-footer .btn-save-and-close, #zlecenieModal.bmz.bmz-is-dirty .modal-footer .btn-save-and-close { background: #3fa66b; border-color: #3fa66b; color: #fff; }
/* telefon: panel na cały ekran */
@media (max-width: 760px) {
  #zlecenieModal.bmz .modal-dialog { top: 0; right: 0; bottom: 0; width: 100vw; }
  #zlecenieModal.bmz .modal-content { border-radius: 0; }
  #zlecenieModal.bmz .modal-header { padding: 12px 14px 10px; }
  #zlecenieModal.bmz .modal-body { padding: 0 14px 14px; }
  #zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body { grid-template-columns: 1fr; padding: 12px; }
  #zlecenieModal.bmz #zlecenieModal_tabs_info .topstats { grid-template-columns: 1fr 1fr; }
  #zlecenieModal.bmz .tab-content > .tab-pane > .panel > .panel-body { padding: 12px; }
  #zlecenieModal.bmz .bmz-edit { order: 9; }
  #zlecenieModal.bmz .bmz-info { display: none; }
  #zlecenieModal.bmz .modal-footer { padding: 10px 14px; flex-wrap: wrap; }
  #zlecenieModal.bmz .modal-footer > .btn { flex: 1; justify-content: center; }
  #zlecenieModal.bmz .bmz-dirty-txt { flex-basis: 100%; }
}
/* pasek narzędzi w zakładkach (Wydruk, menu) – bez pustej belki */
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child > .panel-title { border: 0; padding: 12px 16px 0; display: flex; justify-content: flex-end; }
#zlecenieModal.bmz .panel-title .panel-tools { position: static; float: none; display: flex; gap: 6px; margin: 0 0 0 auto; }
#zlecenieModal.bmz .panel-title .panel-tools .btn { padding: 6px 12px !important; height: 32px; border-radius: 8px; font-size: 13px; }
#zlecenieModal.bmz .tab-content > .tab-pane > .panel > .panel-title:has(.panel-tools) { display: flex; align-items: center; gap: 10px; }
/* edycja: etykieta nad polem, pola na całą szerokość */
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .panel-body .form-group { margin-left: 0; margin-right: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .panel-body > .form-group { margin-bottom: 14px; }
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group .row { margin: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group .control-label[class*="col-"] { width: 100%; float: none; padding: 0; margin: 0 0 4px; text-align: left !important; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7a838d; }
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group .control-label b { font-weight: 700; }
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group [class*="col-md-8"], #zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group [class*="col-sm-8"],
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group [class*="col-md-offset-4"], #zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group [class*="col-sm-offset-4"],
#zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group .row > .col-md-12, #zlecenieModal.bmz #zlecenieModal_tabs_zlecenie .form-group > .col-md-12 { width: 100%; float: none; padding-left: 0 !important; padding-right: 0 !important; margin-left: 0; }
#zlecenieModal.bmz .zdarzenia_unread_badge { color: #fff; }
#zlecenieModal.bmz .modal-header .modal-title { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#zlecenieModal.bmz #zlecenieModal_tabs_info .topstats:before, #zlecenieModal.bmz #zlecenieModal_tabs_info .topstats:after,
#zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body:before, #zlecenieModal.bmz #zlecenieModal_tabs_info .panel-body:after { display: none; }
/* --- podgląd „Szczegóły” jak na makiecie C --- */
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel { display: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child { display: block; border: 0; margin: 0; background: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child > .panel-body { display: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child > .panel-title { padding: 0; margin: -4px 0 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child > .panel-title a[href="#drukuj2"] { display: none; }
#zlecenieModal.bmz .bmz-sec { padding: 4px 0 18px; margin-bottom: 18px; border-bottom: 1px solid #eef1f4; }
#zlecenieModal.bmz .bmz-sec:last-child { border-bottom: 0; margin-bottom: 0; }
#zlecenieModal.bmz .bmz-sec > h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: #4a535d; }
#zlecenieModal.bmz .bmz-sec > h4 .fa { color: #8a96a3; width: 16px; text-align: center; }
#zlecenieModal.bmz .bmz-sec > h4 a { margin-left: auto; font-weight: 600; font-size: 12.5px; color: #1f5582; }
#zlecenieModal.bmz .bmz-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
#zlecenieModal.bmz .bmz-f.span2 { grid-column: span 2; }
#zlecenieModal.bmz .bmz-f.span3 { grid-column: 1 / -1; }
#zlecenieModal.bmz .bmz-f > label { display: block; margin: 0 0 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7a838d; }
#zlecenieModal.bmz .bmz-f .bmz-lock { font-size: 11px; color: #a3abb3; margin-left: 2px; }
#zlecenieModal.bmz .bmz-f > .v { font-size: 14.5px; color: #1d232a; line-height: 1.55; padding: 4px 10px; margin: 0 -10px; border-radius: 7px; word-break: break-word; }
#zlecenieModal.bmz .bmz-f[data-go] > .v { cursor: text; transition: background .12s; }
#zlecenieModal.bmz .bmz-f[data-go]:hover > .v { background: #f1f4f7; box-shadow: inset 0 0 0 1px #e3e8ed; }
#zlecenieModal.bmz .bmz-f[data-go]:hover > label:after { content: " · zmień"; text-transform: none; letter-spacing: 0; font-weight: 600; color: #1f5582; }
#zlecenieModal.bmz .bmz-f .mut { color: #9aa3ac; }
#zlecenieModal.bmz .bmz-f .bmz-tel { font-weight: 700; color: #1f5582; }
#zlecenieModal.bmz .bmz-f .label { font-size: 12px; padding: 4px 9px; border-radius: 99px; }
#zlecenieModal.bmz .bmz-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: #f1f3f5; color: #4a535d; vertical-align: middle; }
#zlecenieModal.bmz .bmz-pill.warn { background: #fef3c7; color: #92400e; }
#zlecenieModal.bmz .bmz-pill.bad { background: #fde8e8; color: #b42318; }
#zlecenieModal.bmz .bmz-pill.ok { background: #e7f6ec; color: #166534; }
#zlecenieModal.bmz .bmz-pill.vio { background: #f5f3ff; color: #5b21b6; }
#zlecenieModal.bmz .bmz-last { background: #f6f7f9; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
#zlecenieModal.bmz .bmz-last .table { margin: 0; background: none; }
#zlecenieModal.bmz .bmz-term:empty, #zlecenieModal.bmz .bmz-st:empty { display: none; }
#zlecenieModal.bmz .bmz-ico { width: 34px; height: 34px; padding: 0; border-radius: 8px; border: 0; background: none; color: #4a535d; font-size: 16px; }
#zlecenieModal.bmz .bmz-ico:hover { background: #eef1f4; color: #1d232a; }
#zlecenieModal.bmz .bmz-last-change { margin-left: auto; color: #7a838d; font-size: 12.5px; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-last-change, #zlecenieModal.bmz.bmz-is-dirty .bmz-last-change, #zlecenieModal.bmz[data-mode="edit"] .bmz-print { display: none; }
#zlecenieModal.bmz .form-group.bmz-flash { animation: bmzFlash 1.4s ease-out; border-radius: 8px; }
@keyframes bmzFlash { 0%, 40% { background: #fff4d6; box-shadow: 0 0 0 6px #fff4d6; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
/* przycisk Edytuj wszystko – jasny, jak na makiecie */
#zlecenieModal.bmz .bmz-edit { background: #fff; border: 1px solid #d5dbe1; color: #1d232a; }
#zlecenieModal.bmz .bmz-edit:hover { background: #f4f6f8; color: #1d232a; }
#zlecenieModal.bmz .modal-header .close { background: none; }
@media (max-width: 760px) {
  #zlecenieModal.bmz .bmz-g { grid-template-columns: 1fr 1fr; }
  #zlecenieModal.bmz .bmz-f.span2 { grid-column: 1 / -1; }
  #zlecenieModal.bmz .bmz-last-change { display: none; }
}
/* pasek akcji podglądu (Zamknij zdarzenie, menu) w prawym górnym rogu pierwszej sekcji */
#zlecenieModal.bmz #zlecenieModal_tabs_info { position: relative; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child { position: absolute; top: 0; right: 0; z-index: 5; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child > .panel-title { margin: 0; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child .panel-tools .btn { height: 30px; padding: 0 11px !important; background: #fff; border: 1px solid #d5dbe1; color: #2b3138; font-size: 12.5px; font-weight: 600; box-shadow: none; }
#zlecenieModal.bmz #zlecenieModal_tabs_info > .panel:first-child .panel-tools .btn:hover { background: #f4f6f8; }
#zlecenieModal.bmz .bmz-view .bmz-sec:first-child > h4 { min-height: 30px; }

/* ================= OKNO ZLECENIA – WARIANT B (pełny ekran: menu | treść | podsumowanie) ================= */
#zlecenieModal.bmz.bmz-b .modal-dialog { top: 10px; left: 10px; right: 10px; bottom: 10px; width: auto; transform: translateY(16px); }
#zlecenieModal.bmz.bmz-b.in .modal-dialog { transform: none; }
#zlecenieModal.bmz.bmz-b .modal-header { padding: 16px 24px 14px; background: #fff; border-bottom: 1px solid #e3e7eb; }
#zlecenieModal.bmz.bmz-b .modal-body { background: #eef1f4; padding: 18px 22px; }
#zlecenieModal.bmz.bmz-b .modal-body > .row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 290px; gap: 18px; align-items: start; max-width: 1600px; margin: 0 auto; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .podwykonawca_alert { grid-column: 1 / -1; padding: 0; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .podwykonawca_alert:empty { display: none; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > [class*="col-"] { width: auto; }
/* menu zakładek po lewej */
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 { position: sticky; top: 0; padding: 0; background: none; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group { flex-direction: column; gap: 3px; padding: 0; background: none; overflow: visible; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item { flex: none; justify-content: flex-start; text-align: left; padding: 10px 12px; border-radius: 9px !important; font-size: 13.5px; color: #4a535d; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item .fa { width: 16px; text-align: center; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item .bmz-c { margin-left: auto; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item .zdarzenia_unread_badge { margin-left: 4px; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item:hover { background: rgba(255,255,255,.7); }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item.tab_active { background: #fff; color: #1d232a; box-shadow: 0 1px 3px rgba(0,0,0,.08), inset 3px 0 0 #2b3138; }
/* treść: sekcje jako białe karty */
#zlecenieModal.bmz.bmz-b .bmz-sec { background: #fff; border: 1px solid #e3e7eb; border-radius: 14px; padding: 16px 20px 18px; margin-bottom: 16px; }
#zlecenieModal.bmz.bmz-b .bmz-sec:last-child { border-bottom: 1px solid #e3e7eb; margin-bottom: 0; }
#zlecenieModal.bmz.bmz-b .bmz-sec > h4 { font-size: 15px; color: #1d232a; margin-bottom: 14px; }
#zlecenieModal.bmz .bmz-sec-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #2b3138 !important; }
#zlecenieModal.bmz .bmz-sec-edit:hover { background: #eef1f4; text-decoration: none; }
#zlecenieModal.bmz .bmz-sec > h4 a.bmz-go-zd { margin-left: auto; }
#zlecenieModal.bmz.bmz-b #zlecenieModal_tabs_info > .panel:first-child { top: 12px; right: 110px; }
#zlecenieModal.bmz.bmz-b .tab-content > .tab-pane > .panel { border-radius: 14px; }
/* prawa kolumna: podsumowanie */
#zlecenieModal.bmz .bmz-aside { display: none; }
#zlecenieModal.bmz.bmz-b .bmz-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
#zlecenieModal.bmz .bmz-card { background: #fff; border: 1px solid #e3e7eb; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#zlecenieModal.bmz .bmz-card .k { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7a838d; }
#zlecenieModal.bmz .bmz-card .big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1d232a; line-height: 1.2; }
#zlecenieModal.bmz .bmz-card .nm { font-weight: 700; }
#zlecenieModal.bmz .bmz-card .label { font-size: 12px; padding: 5px 10px; border-radius: 99px; }
#zlecenieModal.bmz .bmz-card .btn { margin-top: 4px; border-radius: 8px; }
#zlecenieModal.bmz .bmz-card .okc { color: #166534; font-weight: 600; }
#zlecenieModal.bmz .bmz-card .bmz-tel { font-weight: 700; color: #1f5582; }
#zlecenieModal.bmz .bmz-hint { font-size: 12.5px; color: #7a838d; }
#zlecenieModal.bmz .bmz-hint b { color: #1d232a; }
#zlecenieModal.bmz .bmz-steps { display: flex; gap: 4px; width: 100%; margin-top: 4px; }
#zlecenieModal.bmz .bmz-steps i { flex: 1; height: 5px; border-radius: 9px; background: #e3e7eb; }
#zlecenieModal.bmz .bmz-steps i.on { background: #0369a1; }
#zlecenieModal.bmz .bmz-qa { gap: 6px; align-items: stretch; }
#zlecenieModal.bmz .bmz-qa .btn { margin: 0; text-align: left; display: flex; align-items: center; gap: 8px; height: 36px; }
@media (max-width: 1250px) {
  #zlecenieModal.bmz.bmz-b .modal-body > .row { grid-template-columns: 190px minmax(0, 1fr); }
  #zlecenieModal.bmz.bmz-b .bmz-aside { grid-column: 2; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 760px) {
  #zlecenieModal.bmz.bmz-b .modal-dialog { top: 0; left: 0; right: 0; bottom: 0; }
  #zlecenieModal.bmz.bmz-b .modal-body { padding: 10px; }
  #zlecenieModal.bmz.bmz-b .modal-body > .row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 { position: sticky; top: -10px; z-index: 20; background: #eef1f4; padding: 4px 0; }
  #zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group { flex-direction: row; overflow-x: auto; }
  #zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-4 .list-group-item { flex: none; }
  #zlecenieModal.bmz.bmz-b .bmz-aside { grid-column: 1; grid-template-columns: 1fr; }
  #zlecenieModal.bmz.bmz-b .bmz-sec { padding: 14px; }
  #zlecenieModal.bmz.bmz-b #zlecenieModal_tabs_info > .panel:first-child { position: static; }
}
#zlecenieModal.bmz.bmz-b .modal-dialog { width: auto !important; max-width: none !important; }
#zlecenieModal.bmz.bmz-b .modal-body > .row:before, #zlecenieModal.bmz.bmz-b .modal-body > .row:after { display: none; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > .col-md-8 { min-width: 0; }
#zlecenieModal.bmz.bmz-b #zlecenieModal_tabs_info > .panel > .panel-title,
#zlecenieModal.bmz.bmz-b #zlecenieModal_tabs_info .panel-title { background: transparent !important; border: 0 !important; box-shadow: none !important; }
#zlecenieModal.bmz.bmz-b .modal-body > .row > div { min-width: 0; }
#zlecenieModal.bmz.bmz-b .tab-content:has(> #zlecenieModal_tabs_info.active) { background: transparent; box-shadow: none; border: 0; }
#zlecenieModal.bmz.bmz-b #zlecenieModal_tabs_info > .panel:first-child { padding: 0 0 10px; background: transparent; border: 0; box-shadow: none; }

/* ===== LOGOWANIE L1 (podział ekranu) ===== */
body.bm-l1 { margin: 0; background: #f6f7f9; font-size: 14px; color: #1d232a; }
.l1-wrap { display: flex; min-height: 100vh; }
.l1-lp { flex: 1.1; background: linear-gradient(160deg, #132744, #1f4e8c 58%, #173d6e); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.l1-lp:before { content: ""; position: absolute; right: -120px; bottom: -140px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(196,38,45,.35), transparent 65%); pointer-events: none; }
.l1-brand { display: flex; align-items: center; gap: 12px; position: relative; }
.l1-logo { width: 44px; height: 44px; border-radius: 10px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); flex: none; }
.l1-logo svg { width: 30px; height: 30px; }
.l1-logo .m-line { stroke: #b3242a; } .l1-logo .m-fill { fill: #b3242a; } .l1-logo .m-cut { fill: #fff; }
.l1-wm b { display: block; font-size: 19px; letter-spacing: .14em; font-weight: 800; line-height: 1.2; }
.l1-wm small { display: block; font-size: 12px; opacity: .7; }
.l1-big { margin-top: auto; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 460px; position: relative; }
.l1-big em { font-style: normal; color: #ff8a8f; }
.l1-feat { list-style: none; padding: 0; margin: 26px 0 40px; display: grid; gap: 12px; color: rgba(255,255,255,.8); position: relative; }
.l1-feat li { display: flex; gap: 10px; align-items: center; }
.l1-feat li i { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #ff9da1; font-size: 14px; }
.l1-ft { font-size: 12px; color: rgba(255,255,255,.45); position: relative; }
.l1-rp { flex: 1; display: grid; place-items: center; padding: 40px 24px; }
.l1-box { width: 100%; max-width: 400px; }
.l1-brand-m { display: none; margin-bottom: 28px; }
.l1-box h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; font-weight: 700; color: #1d232a; }
.l1-sub { color: #6b747e; margin: 0 0 24px; }
.l1-err { display: flex; gap: 10px; align-items: flex-start; background: #fdecec; border: 1px solid #f3c2c4; color: #8f1a20; border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-size: 13.5px; }
.l1-err i { margin-top: 3px; }
.l1-seg { display: flex; background: #eef1f4; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.l1-seg button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 13px; color: #5b6570; cursor: pointer; }
.l1-seg button.on { background: #fff; color: #1d232a; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.l1-lab { display: block; font-size: 12.5px; font-weight: 600; color: #4a535d; margin: 0 0 6px; }
.l1-in { position: relative; margin-bottom: 16px; }
.l1-in > i { position: absolute; left: 15px; top: 15px; color: #8a96a3; font-size: 16px; }
.l1-in input { width: 100%; height: 46px; border: 1px solid #d5dbe1; border-radius: 10px; padding: 0 44px 0 42px; font-size: 15px; background: #fff; outline: none; transition: .15s; color: #1d232a; box-shadow: none; }
.l1-in input:focus { border-color: #1f4e8c; box-shadow: 0 0 0 3px rgba(31,78,140,.15); }
.l1-eye { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; background: transparent; color: #8a96a3; border-radius: 8px; cursor: pointer; }
.l1-eye:hover { background: #eef1f4; color: #2b3138; }
.l1-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 4px 0 20px; gap: 10px; flex-wrap: wrap; }
.l1-row a, .l1-help a { color: #1f5582; font-weight: 500; }
.l1-chk { display: flex; align-items: center; gap: 8px; color: #4a535d; font-weight: 400; margin: 0; cursor: pointer; }
.l1-chk input { width: 17px; height: 17px; margin: 0; accent-color: #1f4e8c; }
.l1-btn { width: 100%; height: 48px; border: 0; border-radius: 10px; background: #1f4e8c; color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 8px 18px -8px rgba(31,78,140,.6); cursor: pointer; transition: .15s; }
.l1-btn:hover { background: #173d6e; }
.l1-help { font-size: 12.5px; color: #7a838d; text-align: center; margin-top: 18px; }
@media (max-width: 800px) {
  .l1-lp { display: none; }
  .l1-brand-m { display: flex; }
  .l1-brand-m .l1-wm b { color: #1d232a; }
  .l1-brand-m .l1-wm small { color: #6b747e; opacity: 1; }
  .l1-rp { place-items: start center; padding-top: 48px; }
}

/* ===== LISTA ZLECEŃ – szybkie filtry, etykiety, liczniki, „od X dni” ===== */
.table.bm-lista.cards > thead { display: none !important; }
.table.bm-lista > thead td.bm-hid { display: none !important; }
.bm-toolbar .seg button .bm-n, .bm-more .bm-n { font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.07); color: var(--mid); }
.bm-toolbar .seg button .bm-n:empty { display: none; }
.bm-toolbar .seg button.on .bm-n { background: var(--ink); color: #fff; }
.bm-more .bm-n { background: var(--ink); color: #fff; }
.attn:has(> .att:nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.bm-q { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; margin: 0; padding: 0 30px 0 12px; border: 1px solid var(--field); border-radius: var(--r-sm); background: var(--card); font-size: 13px; font-weight: 400; color: var(--faint); white-space: nowrap; cursor: pointer; }
.bm-q:after { content: ""; position: absolute; right: 12px; top: 15px; width: 6px; height: 6px; border: 1.6px solid var(--faint); border-top: 0; border-left: 0; transform: rotate(45deg); pointer-events: none; }
.bm-q select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: none; color: var(--ink); font-weight: 600; font-size: 13px; padding: 0; max-width: 170px; text-overflow: ellipsis; cursor: pointer; }
.bm-q.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bm-q:focus-within { border-color: var(--brand); }
.bm-filters .bm-more { height: 38px; display: inline-flex; align-items: center; gap: 7px; }
.bm-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 20px 14px; margin-top: -4px; }
.bm-chips[hidden] { display: none; }
.bm-chips .lb { font-size: 12px; font-weight: 600; color: var(--faint); margin-right: 2px; }
.bm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border-radius: 99px; background: var(--soft-2); font-size: 12.5px; color: var(--mid); }
.bm-chip b { color: var(--ink); font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.07); color: var(--mid); padding: 0; margin-left: 2px; cursor: pointer; }
.bm-chip button:hover { background: rgba(0,0,0,.15); color: var(--ink); }
.bm-chip button .ic { width: 12px; height: 12px; }
.bm-chips .bm-clr { border: 0; background: none; font-size: 12.5px; font-weight: 600; color: #1f5582; padding: 4px 6px; cursor: pointer; }
.bm-age { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bm-age.a7 { background: #fdf1d3; color: #8a5a00; }
.bm-age.a14 { background: #fde2e3; color: #a1161d; }
@media (max-width: 760px) {
  .attn:has(> .att:nth-child(4)) { grid-template-columns: 1fr 1fr; }
  .attn .att small { display: none; }
  .bm-filters .bm-q:not(.bm-sort) { display: none; }
  .bm-chips { padding: 0 12px 12px; }
  .bm-chips .lb { display: none; }
  .bm-age { margin-left: 0; }
  .cards2 .bm-card .mt { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
}
/* stary panel filtrów – tylko po kliknięciu „Więcej filtrów” */
#bm-filtry .panel-etykiety { display: none; }
.bm-filters .bm-more.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ================= MOTYW E – LEKKI (wg wskazanego szablonu): jasne menu, fiolet, białe karty ================= */
html[data-palette="e"] {
  --brand: #1f4e8c; --brand-2: #183f73; --brand-wash: #eaf1f9; --brand-ink: #173d6e; --accent: #1f4e8c;
  --bg: #ffffff; --surface: #f7f7fb; --soft: #f3f3f8; --soft-2: #ececf3; --line: #ececf3; --field: #e3e3ec;
  --ink: #1f2033; --mid: #555770; --faint: #8a8ba3;
  --info: #2b7de0; --info-wash: #edf5fe; --info-ink: #2167c2;
  --ok: #13a77a; --ok-wash: #e9f8f2; --ok-ink: #0f8a64;
  --warn: #e8a00e; --warn-wash: #fff6e6; --warn-ink: #a86200;
  --bad: #e2643f; --bad-wash: #fff0eb; --bad-ink: #c8471f;
  --side-bg: #f7f7fb; --side-ink: #2f3046; --side-mid: #8a8ba3; --side-line: #e6e6ef; --side-hover: #e9eef6;
  --nav-on-ink: #fff; --nav-on-ic: #fff; --pip-ring: #f7f7fb;
  --app-bg: none;
  --grad: linear-gradient(90deg, #2a62a8 0%, #4f86c9 100%);
  --sh: none; --sh-float: 0 1px 2px rgba(30,30,60,.03);
  --r-card: 16px;
}
html[data-palette="e"] body { background: #fff; }
/* menu boczne: przyklejone, jasne, bez cienia */
html[data-palette="e"] .side { margin: 0; top: 0; height: 100vh; border-radius: 0; border-right: 1px solid var(--line); box-shadow: none; padding: 18px 14px 14px; }
html[data-palette="e"] .logo-b { box-shadow: 0 0 0 1px var(--line); border-radius: 11px; }
html[data-palette="e"] .side .wm b { color: var(--ink); letter-spacing: .04em; }
html[data-palette="e"] .s-search { background: #fff; border-color: var(--field); color: var(--faint); }
html[data-palette="e"] .s-search input { color: var(--ink); } html[data-palette="e"] .s-search input::placeholder { color: var(--faint); }
html[data-palette="e"] .s-search kbd { border-color: var(--line); color: var(--mid); }
html[data-palette="e"] .side .nav { scrollbar-color: rgba(0,0,0,.15) transparent; }
html[data-palette="e"] .side .nav a, html[data-palette="e"] .side .nav summary { border-radius: 11px; padding: 9px 12px; }
html[data-palette="e"] .side .nav a:hover, html[data-palette="e"] .side .nav summary:hover { color: var(--ink); }
html[data-palette="e"] .side .nav > a.on { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px #1f4e8c; }
html[data-palette="e"] .side .nav > a.on .ic { color: #fff; }
html[data-palette="e"] .side .nav details > div a.on { background: var(--brand-wash); color: var(--brand-ink); }
html[data-palette="e"] .cnt { background: #ff7a50; color: #fff; }
html[data-palette="e"] .s-icons button, html[data-palette="e"] .s-icons a { background: #fff; color: var(--mid); box-shadow: inset 0 0 0 1px var(--line); }
html[data-palette="e"] .s-icons button:hover, html[data-palette="e"] .s-icons a:hover { background: var(--brand-wash); color: var(--brand-ink); }
html[data-palette="e"] .side .s-user { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
html[data-palette="e"] .side .s-user:hover { color: var(--ink); background: var(--soft); }
html[data-palette="e"] .av { background-color: var(--brand-wash); color: var(--brand-ink); }
html[data-palette="e"] .main { padding-top: 26px; }
@media (max-width: 1000px) { html[data-palette="e"] .side { height: 100vh; } }
/* przyciski: główny w gradiencie, pozostałe obrysowe */
html[data-palette="e"] .btn { border-radius: 10px; font-weight: 500; }
html[data-palette="e"] .btn-default, html[data-palette="e"] .btn-primary, html[data-palette="e"] .btn-success, html[data-palette="e"] .btn-info { background: var(--grad); border: 1px solid transparent; color: #fff; box-shadow: 0 6px 14px -8px #1f4e8c; }
html[data-palette="e"] .btn-default:hover, html[data-palette="e"] .btn-primary:hover, html[data-palette="e"] .btn-success:hover, html[data-palette="e"] .btn-info:hover,
html[data-palette="e"] .btn-default:focus, html[data-palette="e"] .btn-primary:focus, html[data-palette="e"] .btn-success:focus, html[data-palette="e"] .btn-info:focus { background: linear-gradient(90deg, #1f4e8c, #3a72b8); color: #fff; border-color: transparent; }
html[data-palette="e"] .btn-light, html[data-palette="e"] .btn-white { border-color: var(--field); color: var(--ink); }
html[data-palette="e"] .btn-light:hover, html[data-palette="e"] .btn-white:hover { background: var(--surface); }
/* karty, tabele, pigułki statusu (obrysowe jak w szablonie) */
html[data-palette="e"] .panel { border-color: var(--line); box-shadow: none; }
html[data-palette="e"] .table > thead > tr > th, html[data-palette="e"] .table > thead > tr > td { background: var(--surface); color: var(--mid); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
html[data-palette="e"] .label { background: #fff !important; box-shadow: inset 0 0 0 1px currentColor !important; font-weight: 500; border-radius: 7px; }
html[data-palette="e"] .label-default { color: #2b7de0 !important; }
html[data-palette="e"] .label-primary { color: #183f73 !important; }
html[data-palette="e"] .label-success { color: #13906a !important; }
html[data-palette="e"] .label-warning { color: #c27a00 !important; }
html[data-palette="e"] .label-danger { color: #e2643f !important; }
html[data-palette="e"] .label-grey { color: #8a8ba3 !important; }
html[data-palette="e"] .label[class*="label-"]::before { opacity: 1; }
html[data-palette="e"] .pagination > .active > a, html[data-palette="e"] .pagination > .active > span { background: var(--grad); border-color: transparent; }
html[data-palette="e"] .pagination > li > a, html[data-palette="e"] .pagination > li > span { border-radius: 9px !important; margin: 0 3px; border-color: var(--line); }
html[data-palette="e"] .seg { background: var(--surface); border-radius: 12px; padding: 4px; }
html[data-palette="e"] .seg button { border-radius: 9px; padding: 7px 16px; }
html[data-palette="e"] .seg button.on { box-shadow: 0 1px 3px rgba(30,30,60,.12); }
html[data-palette="e"] .seg button.on .bm-n, html[data-palette="e"] .seg button .bm-n { background: var(--soft-2); color: var(--mid); }
html[data-palette="e"] .seg button.on .bm-n { background: var(--brand-wash); color: var(--brand-ink); }

/* lista zleceń: kafelki jak w szablonie (pierwszy w gradiencie) */
html[data-palette="e"] .att { border-color: var(--line); box-shadow: none; border-radius: 16px; padding: 16px 18px; }
html[data-palette="e"] .att::before { display: none; }
html[data-palette="e"] .att .sq { width: 38px; height: 38px; border-radius: 11px; color: #fff; }
html[data-palette="e"] .att .t-bad { background: #ff7a50; } html[data-palette="e"] .att .t-warn { background: #2fc4dc; } html[data-palette="e"] .att .t-info { background: #2a62a8; }
html[data-palette="e"] .att .sq:not(.t-bad):not(.t-warn):not(.t-info) { background: #4f86c9; }
html[data-palette="e"] .att[data-quick="check"] { background: linear-gradient(120deg, #3a72b8, #9dbbe0); border-color: transparent; color: #fff; }
html[data-palette="e"] .att[data-quick="check"] small, html[data-palette="e"] .att[data-quick="check"] .go { color: rgba(255,255,255,.85); }
html[data-palette="e"] .att[data-quick="check"] .sq { background: rgba(255,255,255,.25); }
html[data-palette="e"] .att.on { box-shadow: 0 0 0 2px #2a62a8; }
html[data-palette="e"] .att[data-quick="check"].on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2a62a8; }
/* lista zleceń: wiersze jak tabela szablonu – jedna biała karta, cienkie linie zamiast osobnych kart */
html[data-palette="e"] .lista_master { border-radius: 16px; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row { margin-bottom: 0; }
html[data-palette="e"] .cards2 .bm-card .z { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row:first-child .bm-card .z { border-top: 0; }
html[data-palette="e"] .cards2 .bm-card .z:hover { box-shadow: none; border-color: var(--line); background: #fbfbfe; }
html[data-palette="e"] .cards2 .bm-card .z::before { border-radius: 0; width: 3px; }
html[data-palette="e"] .cards2 .bm-card .tm, html[data-palette="e"] .cards2 .bm-card .ac2 { background: transparent; border-left: 0; border-radius: 0; }
html[data-palette="e"] .cards2 .bm-card .r1 .nr { background: none; box-shadow: none; padding: 0; height: auto; color: var(--ink); font-weight: 650; }
html[data-palette="e"] .cards2 .bm-card .r1 .nr.sub { background: none; color: #a86200; }
html[data-palette="e"] .cards2 .bm-card .r1 .nr:hover { background: none; color: var(--brand-ink); }
html[data-palette="e"] .cards2 .bm-card .r1 .label { background: #fff !important; border-radius: 7px; height: 24px; font-weight: 500; }
html[data-palette="e"] .cards2 .bm-card .r1 .label.label-warning { background: #fff !important; color: #c27a00 !important; }
html[data-palette="e"] .cards2 .bm-card .r1 .label::before { display: none; }
html[data-palette="e"] .cards2 .bm-card .chip { background: var(--surface); color: var(--mid); }
html[data-palette="e"] .cards2 .bm-card .op { font-weight: 550; }
html[data-palette="e"] .cards2 .bm-card .r4 { border-top-style: solid; border-top-color: #f3f3f8; }
html[data-palette="e"] .cards2 .bm-card { --lnk: #183f73; --lnk-h: #173d6e; }
html[data-palette="e"] .cards2 .bm-card .due { background: #fff; box-shadow: inset 0 0 0 1px var(--field); font-weight: 500; }
html[data-palette="e"] .cards2 .bm-card .due.bad { background: #fff; color: #e2643f; box-shadow: inset 0 0 0 1px #f7c3b1; }
html[data-palette="e"] .cards2 .bm-card .due.warn { background: #fff; color: #c27a00; box-shadow: inset 0 0 0 1px #f3d9a6; }
html[data-palette="e"] .cards2 .bm-card .due.ok { background: #fff; color: #13906a; box-shadow: inset 0 0 0 1px #9fdcc4; }
html[data-palette="e"] .cards2 .bm-card .ac2 .ia { border-radius: 10px; background: #fff; }
html[data-palette="e"] .cards2 .bm-card .ac2 .ia:hover { background: var(--brand-wash); color: var(--brand-ink); border-color: #c9daf0; }
html[data-palette="e"] .cards2 .bm-card .pr b { font-weight: 650; }
html[data-palette="e"] .cards2 .bm-card .km { border-radius: 0; background: #fff8f4; border-top-color: #fde0d3; }
html[data-palette="e"] .cards2 .bm-card .kmh { background: #fff1ea; border-bottom-color: #fde0d3; color: #c8471f; }
html[data-palette="e"] .cards2 .bm-card .kmh .ic { color: #ff7a50; }
html[data-palette="e"] .cards2 .bm-card .bm-age { box-shadow: inset 0 0 0 1px #f7c3b1; background: #fff; }
/* W3 – wyraźne rozdzielenie wierszy: odstęp, pasek koloru statusu, nagłówek wiersza na tle */
html[data-palette="e"] .cards2 .bm-card .z { border-top: 6px solid var(--surface); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row:first-child .bm-card .z { border-top: 0; }
html[data-palette="e"] .cards2 .bm-card .z::before { width: 4px; border-radius: 0 4px 4px 0; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st] .bm-card .z.u-n::before,
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st] .bm-card .z.u-ok::before { display: block; background: var(--st, transparent); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st="0"] { --st: #a3a6b8; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st="1"] { --st: var(--info); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st="2"] { --st: var(--warn); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st="3"] { --st: var(--ok); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row[data-st="10"] { --st: #f0a58c; }
html[data-palette="e"] .cards2 .bm-card .r1 { background: linear-gradient(90deg, #f4f6fa, rgba(244,246,250,0) 75%); margin: -2px -8px 6px; padding: 6px 8px; border-radius: 8px; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row.bm-sel .bm-card .z { background: #f3f7fc; }
html[data-palette="e"] .cards2 > tbody > tr.bm-row.bm-sel .bm-card .z::before, html[data-palette="e"] .cards2 > tbody > tr.bm-row.bm-sel[data-st] .bm-card .z.u-n::before, html[data-palette="e"] .cards2 > tbody > tr.bm-row.bm-sel[data-st] .bm-card .z.u-ok::before { display: block; background: var(--brand); width: 5px; }
.cards2 > tbody > tr.bm-row.bm-sel .bm-card .z { box-shadow: 0 0 0 2px var(--brand); }
html[data-palette="e"] .cards2 > tbody > tr.bm-row.bm-sel .bm-card .z { box-shadow: none; }
@media (max-width: 760px) {
  html[data-palette="e"] .side { height: 100vh; }
  html[data-palette="e"] .cards2 .bm-card .ac2, html[data-palette="e"] .cards2 .bm-card .tm { border-top: 1px solid #f3f3f8; }
}

/* ================= OKNO ZLECENIA – SZUFLADA Z PRAWEJ (wersja D): lista zostaje widoczna ================= */
#zlecenieModal.bmz.bmz-d .modal-dialog { top: 0; right: 0; bottom: 0; left: auto; margin: 0; width: min(780px, 100vw) !important; min-width: 0 !important; max-width: none !important; transform: translateX(60px); }
#zlecenieModal.bmz.bmz-d.in .modal-dialog { transform: none; }
#zlecenieModal.bmz.bmz-d .modal-content { border-radius: 18px 0 0 18px; box-shadow: -30px 0 60px -30px rgba(40,30,90,.35), 0 0 0 1px rgba(30,30,60,.06); }
#zlecenieModal.bmz-d .modal-backdrop.in, #zlecenieModal.bmz-d.in ~ .modal-backdrop.in { opacity: .12 !important; }
#zlecenieModal.bmz.bmz-d .modal-header { background: #fff; border-bottom: 1px solid var(--line, #e3e7eb); padding: 16px 22px 14px; }
#zlecenieModal.bmz.bmz-d .modal-body { padding: 0 22px 18px; }
#zlecenieModal.bmz.bmz-d .modal-body > .row { display: flex; flex-direction: column; }
#zlecenieModal.bmz.bmz-d .modal-body > .row > .podwykonawca_alert { order: -3; }
#zlecenieModal.bmz.bmz-d .modal-body > .row > .bmz-aside { order: -2; }
#zlecenieModal.bmz.bmz-d .modal-body > .row > .col-md-4 { order: -1; }
#zlecenieModal.bmz.bmz-d .modal-body > .row:before, #zlecenieModal.bmz.bmz-d .modal-body > .row:after { display: none; }
/* krótkie podsumowanie nad zakładkami: kosztorys, termin, wykonawca + szybkie akcje */
#zlecenieModal.bmz.bmz-d .bmz-aside { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 0 4px; }
#zlecenieModal.bmz.bmz-d .bmz-aside > .bmz-card:first-child { display: none; }
#zlecenieModal.bmz.bmz-d .bmz-card { padding: 11px 13px; gap: 3px; border-radius: 12px; }
#zlecenieModal.bmz.bmz-d .bmz-card .big { font-size: 18px; }
#zlecenieModal.bmz.bmz-d .bmz-card .btn { display: none; }
#zlecenieModal.bmz.bmz-d .bmz-card.bmz-qa { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; background: none; }
#zlecenieModal.bmz.bmz-d .bmz-card.bmz-qa .btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; height: 32px; font-size: 13px; }
/* pasek etapów + następny krok */
#zlecenieModal.bmz .bmz-next:empty { display: none; }
#zlecenieModal.bmz .bmz-next { margin-top: 12px; }
#zlecenieModal.bmz .bmz-steps2 { display: flex; gap: 4px; }
#zlecenieModal.bmz .bmz-steps2 > div { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600; color: #9a9bb0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#zlecenieModal.bmz .bmz-steps2 i { display: block; height: 5px; border-radius: 9px; background: #ececf3; margin-bottom: 6px; }
#zlecenieModal.bmz .bmz-steps2 .d { color: #13906a; } #zlecenieModal.bmz .bmz-steps2 .d i { background: #3fc7a0; }
#zlecenieModal.bmz .bmz-steps2 .c { color: #1f2033; } #zlecenieModal.bmz .bmz-steps2 .c i { background: var(--brand, #1f4e8c); }
#zlecenieModal.bmz .bmz-nb { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: var(--brand-wash, #eaf1f9); border: 1px solid color-mix(in srgb, var(--brand, #1f4e8c) 18%, #fff); }
#zlecenieModal.bmz .bmz-nb.mut { background: #f7f7fb; border-color: #ececf3; }
#zlecenieModal.bmz .bmz-nb .tx { flex: 1; min-width: 0; line-height: 1.35; }
#zlecenieModal.bmz .bmz-nb .tx b { display: block; font-size: 14px; color: #1f2033; }
#zlecenieModal.bmz .bmz-nb .tx span { font-size: 12.5px; color: #555770; }
#zlecenieModal.bmz .bmz-nb .btn { height: 36px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* stopka: poprzednie / następne */
#zlecenieModal.bmz .bmz-nav { display: inline-flex; align-items: center; gap: 6px; }
#zlecenieModal.bmz .bmz-nav .btn { height: 32px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
#zlecenieModal.bmz .bmz-nav .btn[disabled] { opacity: .45; }
#zlecenieModal.bmz .bmz-pos { font-size: 12px; color: #8a8ba3; margin-left: 4px; white-space: nowrap; }
#zlecenieModal.bmz[data-mode="edit"] .bmz-nav, #zlecenieModal.bmz.bmz-is-dirty .bmz-nav { display: none !important; }
/* okno „Oznacz jako zrealizowane” */
#zlecenieModal .bmz-dlg { position: absolute; inset: 0; z-index: 1200; background: rgba(31,32,51,.32); display: grid; place-items: center; padding: 16px; }
#zlecenieModal .bmz-dlg[hidden] { display: none; }
#zlecenieModal .bmz-dlg-c { width: min(480px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(20,16,60,.45); overflow: hidden; }
#zlecenieModal .bmz-dlg-c .h { padding: 16px 20px 12px; border-bottom: 1px solid #ececf3; }
#zlecenieModal .bmz-dlg-c .h b { font-size: 17px; } #zlecenieModal .bmz-dlg-c .h .sub { font-size: 12.5px; color: #8a8ba3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#zlecenieModal .bmz-dlg-c .b { padding: 16px 20px; display: grid; gap: 14px; }
#zlecenieModal .bmz-dlg-c label { display: grid; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: #555770; }
#zlecenieModal .bmz-dlg-c .form-control { height: 40px; border-radius: 10px; font-weight: 400; }
#zlecenieModal .bmz-dlg-c textarea.form-control { height: auto; }
#zlecenieModal .bmz-d-warn { padding: 9px 12px; border-radius: 10px; background: #fff6e6; border: 1px solid #f3dfa6; color: #6b4a00; font-size: 12.5px; }
#zlecenieModal .bmz-d-warn[hidden], #zlecenieModal .bmz-d-err[hidden] { display: none; }
#zlecenieModal .bmz-d-err { padding: 9px 12px; border-radius: 10px; background: #fff0eb; border: 1px solid #f7c3b1; color: #c8471f; font-size: 13px; font-weight: 600; }
#zlecenieModal .bmz-dlg-c .f { padding: 12px 20px; background: #fafafd; border-top: 1px solid #ececf3; display: flex; justify-content: flex-end; gap: 8px; }
#zlecenieModal .bmz-dlg-c .f .btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; }
/* motyw E w szufladzie */
html[data-palette="e"] #zlecenieModal.bmz .bmz-nr { background: none; box-shadow: none; padding: 0; color: #1f2033; font-weight: 700; }
html[data-palette="e"] #zlecenieModal.bmz .bmz-edit { background: #fff; color: #1f2033; border: 1px solid var(--field); }
html[data-palette="e"] #zlecenieModal.bmz .bmz-edit:hover { background: var(--brand-wash); color: var(--brand-ink); }
html[data-palette="e"] #zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group { background: #f5f5fa; border-radius: 12px; }
html[data-palette="e"] #zlecenieModal.bmz .modal-body > .row > .col-md-4 .list-group-item.tab_active .fa { color: var(--brand); }
html[data-palette="e"] #zlecenieModal.bmz .bmz-card { border-color: #ececf3; }
html[data-palette="e"] #zlecenieModal.bmz .bmz-card .bmz-tel, html[data-palette="e"] #zlecenieModal.bmz .bmz-meta a { color: var(--brand-ink); }
html[data-palette="e"] #zlecenieModal.bmz[data-mode="edit"] .modal-footer, html[data-palette="e"] #zlecenieModal.bmz.bmz-is-dirty .modal-footer { background: #14294a; border-top-color: #14294a; }
html[data-palette="e"] #zlecenieModal.bmz[data-mode="edit"] .modal-content { box-shadow: 0 0 0 3px #c9daf0, -30px 0 60px -30px rgba(40,30,90,.35); }
@media (max-width: 760px) {
  #zlecenieModal.bmz.bmz-d .modal-content { border-radius: 0; }
  #zlecenieModal.bmz.bmz-d .modal-body { padding: 0 12px 14px; }
  #zlecenieModal.bmz.bmz-d .bmz-aside { grid-template-columns: 1fr 1fr; }
  #zlecenieModal.bmz.bmz-d .bmz-aside > .bmz-card:nth-child(4) { grid-column: 1 / -1; }
  #zlecenieModal.bmz .bmz-steps2 > div { font-size: 0; } #zlecenieModal.bmz .bmz-steps2 > div.c { font-size: 11px; flex: 2.5; }
  #zlecenieModal.bmz .bmz-nb { flex-wrap: wrap; } #zlecenieModal.bmz .bmz-nb .tx { flex-basis: 100%; }
  #zlecenieModal.bmz .bmz-nb .btn { flex: 1; justify-content: center; }
  #zlecenieModal.bmz .bmz-nav { flex-basis: 100%; } #zlecenieModal.bmz .bmz-nav .btn { flex: 1; justify-content: center; }
}
#zlecenieModal.bmz.bmz-d .modal-dialog { padding: 0 !important; }
#zlecenieModal.bmz.bmz-d .modal-content { margin: 0; height: 100%; }
#zlecenieModal.bmz.bmz-d .bmz-info { display: none; }
#zlecenieModal.bmz.bmz-d .bmz-last-change { flex: 1; text-align: right; font-size: 12px; color: #8a8ba3; }
@media (max-width: 760px) { #zlecenieModal.bmz .bmz-pos, #zlecenieModal.bmz.bmz-d .bmz-last-change { display: none; } }

/* ===== Lista zleceń: zakładki Aktywne | Archiwum, pasek listy, Mapa w przełączniku widoku ===== */
#bm-tabs .bm-tabs-sep { flex: 0 0 1px; align-self: stretch; margin: 6px 6px 6px 8px; background: var(--line); }
#bm-tabs .bm-tabs-lb { align-self: center; padding: 0 4px 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
#bm-tabs button.arch:not(.on) { color: var(--faint); }
@media (min-width: 761px) {
  .bm-filters .search { flex: 1 1 220px; max-width: 460px; min-width: 180px; }
  .bm-filters > .bm-q { flex: 0 1 auto; min-width: 0; }
  .bm-filters > .bm-q > span { flex: none; }
  .bm-filters > .bm-q select { flex: 1 1 auto; min-width: 48px; max-width: 150px; }
  .bm-filters .bm-more { flex: none; }
}
@media (min-width: 1100px) { .bm-filters { flex-wrap: nowrap; } }

/* ===== „Więcej filtrów” – panel wysuwany z prawej ===== */
.bm-fbg { position: fixed; inset: 0; background: rgba(16,24,40,.38); z-index: 1040; }
.bm-fbg[hidden], .bm-fdr[hidden] { display: none !important; }
.bm-fdr { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; z-index: 1041; display: flex; flex-direction: column; background: var(--card); color: var(--ink); box-shadow: -12px 0 40px rgba(16,24,40,.18); font-size: 13.5px; }
body.bm-fdr-on { overflow: hidden; }
.bm-fdr > header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.bm-fdr > header > div { flex: 1; }
.bm-fdr h3 { margin: 0; font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.bm-fdr h3 .bm-n { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--brand-wash); color: var(--brand-ink); }
.bm-fdr > header p { margin: 2px 0 0; font-size: 12.5px; color: var(--mid); }
.bm-fdr .ibtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--mid); }
.bm-fdr-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.bm-fdr section { padding: 16px 22px; border-top: 1px solid var(--line); }
.bm-fdr section:first-child { border-top: 0; }
.bm-fdr h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.bm-fdr h4 .ic { width: 15px; height: 15px; }
.bm-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-pills button { border: 1px solid var(--field); background: var(--card); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--mid); cursor: pointer; }
.bm-pills button:hover { color: var(--ink); border-color: var(--ink); }
.bm-pills button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bm-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bm-in { display: flex; align-items: center; gap: 8px; height: 38px; margin: 0; min-width: 0; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-sm); background: var(--card); font-weight: 500; }
.bm-in > span { color: var(--faint); font-size: 12.5px; }
.bm-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); height: 100%; padding: 0; box-shadow: none; }
.bm-in:focus-within { border-color: var(--brand); }
.bm-fg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.bm-ff { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; font-weight: 400; }
.bm-ff.w { grid-column: 1 / -1; }
.bm-ff > span { font-size: 12.5px; font-weight: 600; color: var(--mid); }
.bm-fdr .bootstrap-select { width: 100% !important; }
.bm-fdr .bootstrap-select > .btn { height: 38px; border: 1px solid var(--field) !important; border-radius: var(--r-sm) !important; background: var(--card) !important; color: var(--ink) !important; box-shadow: none !important; font-weight: 500; text-transform: none; padding: 0 30px 0 12px; }
.bm-fdr .bootstrap-select.open > .btn, .bm-fdr .bootstrap-select > .btn:focus { border-color: var(--brand) !important; }
.bm-fdr .bootstrap-select .dropdown-menu { max-height: 300px; border-radius: 10px; border-color: var(--line); box-shadow: 0 12px 32px rgba(16,24,40,.18); }
.bm-fnote { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.bm-sw { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; font-weight: 500; cursor: pointer; }
.bm-sw input { position: absolute; opacity: 0; pointer-events: none; }
.bm-sw i { flex: none; position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--field); transition: background .15s; }
.bm-sw i:after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.bm-sw input:checked ~ i { background: var(--brand); }
.bm-sw input:checked ~ i:after { left: 18px; }
.bm-sw input:focus-visible ~ i { outline: 2px solid var(--brand); outline-offset: 2px; }
.bm-fdr > footer { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--card); }
.bm-fdr > footer .btn { height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.bm-fclr { white-space: nowrap; color: var(--mid); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.daterangepicker { z-index: 1060 !important; }
@media (max-width: 600px) {
  .bm-fdr { top: auto; width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .bm-fg, .bm-dates { grid-template-columns: 1fr; }
  .bm-fdr > footer { padding: 12px 16px; gap: 8px; }
  .bm-fdr > footer .btn-light { display: none; }
}

/* ===== Pasek listy (wersja 1): osobne miękkie pigułki; „1–50 z 206 ▾” wybiera liczbę na stronie ===== */
.bm-listbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); }
.bm-listbar .ic { width: 17px; height: 17px; }
.bm-listbar .cv { display: inline-block; flex: none; width: 6px; height: 6px; border: 1.6px solid currentColor; border-top: 0; border-left: 0; opacity: .55; transform: rotate(45deg) translateY(-2px); margin-left: 4px; pointer-events: none; }
.bm-range { font-size: 14px; color: var(--mid); white-space: nowrap; margin-right: 6px; }
.bm-range b { color: var(--ink); font-weight: 650; }
.bm-sortb { display: inline-flex; align-items: center; gap: 6px; height: 38px; margin: 0; padding: 0 12px; border-radius: 11px; background: var(--soft-2); font-size: 13px; font-weight: 500; color: var(--mid); white-space: nowrap; cursor: pointer; }
.bm-sortb:hover { background: var(--line); }
.bm-sortb select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: none; padding: 0; margin: 0; font-size: 13px; font-weight: 650; color: var(--ink); cursor: pointer; }
.bm-sortb:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.bm-sp { flex: 1; }
.bm-vw { display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 3px; border-radius: 11px; background: var(--soft-2); }
.bm-vw button, .bm-vw a { width: 36px; height: 32px; border: 0; border-radius: 8px; background: none; display: grid; place-items: center; color: var(--mid); text-decoration: none; }
.bm-vw button:hover, .bm-vw a:hover { color: var(--ink); }
.bm-vw .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.1), 0 0 0 1px var(--line); }
.bm-pg { display: inline-flex; align-items: center; height: 38px; padding: 0 3px; border-radius: 11px; background: var(--soft-2); }
.bm-pg .ar { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; }
.bm-pg .ar:hover:not(:disabled) { background: var(--card); }
.bm-pg .ar:disabled { color: var(--faint); opacity: .45; cursor: default; }
.bm-ppw { position: relative; }
.bm-pgl { display: inline-flex; align-items: center; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--mid); white-space: nowrap; cursor: pointer; }
.bm-pgl b { color: var(--ink); font-weight: 650; }
.bm-pgl:hover, .bm-pgl.open { background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.bm-ppm { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 150px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.18); }
.bm-ppm[hidden] { display: none; }
.bm-ppm small { display: block; padding: 4px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.bm-ppm button { display: flex; width: 100%; justify-content: space-between; padding: 8px 10px; border: 0; border-radius: 7px; background: none; font-size: 13px; color: var(--ink); cursor: pointer; }
.bm-ppm button:hover { background: var(--soft-2); }
.bm-ppm button.on { background: var(--brand-wash); font-weight: 650; }
.bm-ppm button.on:after { content: "✓"; }
@media (max-width: 760px) {
  .bm-listbar { padding: 10px 12px; }
  .bm-range { margin-right: 0; }
  .bm-sortb .l, .bm-sortb .ic { display: none; }
  .bm-vw button, .bm-vw a { width: 32px; }
  .bm-pg { margin-left: auto; }
}
.bm-sortb select { width: auto; height: auto; min-width: 0; max-width: 190px; box-shadow: none; border-radius: 0; }
.bm-sortb select:focus { box-shadow: none; }
@media (min-width: 768px) { .bm-vw a.bm-map-v { display: grid !important; } }

/* ===== Pulpit ===== */
.dw { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.dw .g { display: grid; gap: 16px; } .dw .g > * { min-width: 0; }
.dw .kg { grid-template-columns: repeat(4, 1fr); } .dw .g2 { grid-template-columns: 1.55fr 1fr; } .dw .g3 { grid-template-columns: repeat(3, 1fr); }
.dw .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.dw .card h3 { margin: 0 0 14px; font-size: 14.5px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.dw .card h3 small { font-weight: 500; color: var(--faint); font-size: 12px; }
.dw .card h3 a { font-size: 12.5px; font-weight: 500; color: var(--lnk); text-decoration: none; }
.dw .t-bad { background: var(--bad-wash); color: var(--bad-ink); } .dw .t-warn { background: var(--warn-wash); color: var(--warn-ink); } .dw .t-ok { background: var(--ok-wash); color: var(--ok-ink); } .dw .t-info { background: var(--info-wash); color: var(--info-ink); } .dw .t-br { background: var(--brand-wash); color: var(--brand-ink); }
.dw .empty { display: flex; align-items: center; gap: 8px; padding: 18px 4px; font-size: 13px; color: var(--faint); }
.dw .empty[hidden] { display: none; }
/* pasek powitalny */
.dw .hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; color: #fff; background: radial-gradient(900px 300px at 85% -40%, rgba(255,255,255,.22), transparent 60%), radial-gradient(600px 300px at 0% 120%, rgba(255,255,255,.12), transparent 60%), linear-gradient(120deg, var(--brand-2, var(--brand)), var(--brand)); box-shadow: 0 18px 40px -18px var(--brand); }
.dw .hero:after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.07); pointer-events: none; }
.dw .hero .top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; position: relative; z-index: 1; }
.dw .hero .eb { font-size: 13px; opacity: .82; }
.dw .hero h1 { margin: 4px 0 6px; font-size: 30px; font-weight: 750; letter-spacing: -.02em; color: #fff; }
.dw .hero p { margin: 0; font-size: 14.5px; opacity: .92; max-width: 600px; } .dw .hero p b { font-weight: 700; }
.dw .hero .act { display: flex; gap: 8px; flex: none; }
.dw .hero .act a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 650; text-decoration: none; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); }
.dw .hero .act a:hover { background: rgba(255,255,255,.26); }
.dw .hero .act a.pr { background: #fff; color: var(--brand-ink, var(--ink)); border-color: #fff; }
.dw .hero .srch { position: relative; z-index: 1; margin: 18px 0 0; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26); border-radius: 14px; padding: 5px 6px 5px 14px; max-width: 620px; }
.dw .hero .srch:focus-within { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); }
.dw .hero .srch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font-size: 14px; height: 34px; }
.dw .hero .srch input::placeholder { color: rgba(255,255,255,.78); }
.dw .hero .srch button { border: 0; border-radius: 10px; background: rgba(255,255,255,.22); color: #fff; font-size: 13px; font-weight: 650; padding: 8px 14px; }
.dw .hero .mini { position: relative; z-index: 1; display: flex; gap: 28px; margin-top: 18px; font-size: 12.5px; opacity: .92; flex-wrap: wrap; }
.dw .hero .mini b { display: block; font-size: 20px; font-weight: 700; }
/* kafelki */
.dw .kp { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; position: relative; transition: transform .15s, box-shadow .15s; }
.dw .kp:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(16,24,40,.25); text-decoration: none; color: inherit; }
.dw .kp .hd { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mid); font-weight: 500; }
.dw .kp .n { padding-right: 104px; flex-wrap: wrap; row-gap: 4px; }
.dw .kp .sq { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dw .kp .n { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.dw .kp .n b { font-size: 32px; font-weight: 750; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dw .kp .dl { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--soft-2); color: var(--mid); white-space: nowrap; }
.dw .kp em { font-style: normal; font-size: 12px; color: var(--faint); }
.dw .kp svg.sp { position: absolute; right: 18px; top: 58px; width: 96px; height: 36px; }
/* do zrobienia */
.dw .tabs { display: flex; gap: 4px; background: var(--soft-2); padding: 4px; border-radius: 12px; margin-bottom: 6px; }
.dw .tabs button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--mid); display: flex; gap: 8px; justify-content: center; align-items: center; white-space: nowrap; }
.dw .tabs button i { font-style: normal; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: rgba(0,0,0,.06); }
.dw .tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--line); }
.dw .tabs button.on i { background: var(--ink); color: #fff; }
.dw .q[hidden] { display: none; }
.dw .q .rw { display: flex; align-items: center; gap: 12px; padding: 11px 8px; margin: 0 -8px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.dw .q .rw:first-child { border-top: 0; }
.dw .q .rw:hover { background: var(--soft); }
.dw .q .nr { font-weight: 650; color: var(--lnk); white-space: nowrap; min-width: 92px; }
.dw .q .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dw .q .tt .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw .q .tt small { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw .q .age { font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.dw .q .bt { font-size: 12.5px; font-weight: 650; padding: 7px 12px; border-radius: 9px; background: var(--ink); color: #fff; white-space: nowrap; }
.dw .q .more { display: block; text-align: center; padding: 10px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--lnk); border-radius: 10px; background: var(--soft); text-decoration: none; }
/* wpisy */
.dw .chips { display: flex; gap: 6px; margin-bottom: 8px; }
.dw .chips button { border: 0; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: var(--soft-2); color: var(--mid); }
.dw .chips button.on { background: var(--ink); color: #fff; }
.dw .fd .rw { display: flex; gap: 11px; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.dw .fd .rw:hover { background: var(--soft); }
.dw .fd .rw[hidden] { display: none; }
.dw .fd .av { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dw .fd .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dw .fd .l2 { margin-top: 2px; color: var(--mid); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw .fd .nr { font-weight: 650; color: var(--lnk); }
.dw .fd .m { font-size: 11.5px; color: var(--faint); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dw .fd .u { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
/* kierownictwo */
.dw .sect { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.dw .sect:after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dw .lg { display: flex; gap: 14px; font-size: 12px; color: var(--mid); font-weight: 500; } .dw .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dw svg.area { width: 100%; height: auto; display: block; }
.dw .ins { margin-top: 10px; font-size: 12.5px; padding: 8px 12px; border-radius: 10px; display: flex; gap: 8px; align-items: center; }
.dw .ins.ok { color: var(--ok-ink); background: var(--ok-wash); } .dw .ins.warn { color: var(--warn-ink); background: var(--warn-wash); }
.dw .bars .f { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.dw .bars .f > span:first-child { width: 130px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.dw .bars .f b { min-width: 36px; text-align: right; white-space: nowrap; }
.dw .bars .bar { height: 10px; border-radius: 99px; background: var(--soft-2); overflow: hidden; flex: 1; }
.dw .bars .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2, var(--brand))); }
.dw .bars.sub { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; } .dw .bars.sub small { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.dw .donut { display: flex; align-items: center; gap: 18px; }
.dw .donut .lgd { display: flex; flex-direction: column; gap: 6px; font-size: 13px; flex: 1; }
.dw .donut .lgd a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 3px 6px; border-radius: 8px; } .dw .donut .lgd a:hover { background: var(--soft); }
.dw .donut .lgd b { margin-left: auto; } .dw .donut .lgd i { width: 10px; height: 10px; border-radius: 3px; }
.dw .money > b { font-size: 26px; font-weight: 750; letter-spacing: -.02em; } .dw .money small { color: var(--faint); font-size: 12px; }
.dw .vb { display: flex; align-items: flex-end; gap: 8px; height: 100px; margin-top: 12px; }
.dw .vb div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); height: 100%; justify-content: flex-end; }
.dw .vb i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--brand); opacity: .82; }
.dw .note { margin-top: 10px; font-size: 12px; color: var(--faint); }
@keyframes bmUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dw > * { animation: bmUp .45s both; } .dw > *:nth-child(2) { animation-delay: .05s; } .dw > *:nth-child(3) { animation-delay: .1s; } .dw > *:nth-child(n+4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .dw > * { animation: none; } .dw .kp { transition: none; } }
@media (max-width: 1200px) { .dw .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) { .dw .g2 { grid-template-columns: 1fr; } .dw .kg { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .dw .hero { padding: 20px; } .dw .hero .top { flex-direction: column; } .dw .hero h1 { font-size: 24px; }
  .dw .hero .act { width: 100%; } .dw .hero .act a { flex: 1; justify-content: center; }
  .dw .hero .mini { gap: 14px 18px; } .dw .hero .mini div { width: calc(50% - 9px); }
  .dw .g3 { grid-template-columns: 1fr; } .dw .kp svg.sp { display: none; } .dw .kp .n { padding-right: 0; } .dw .kp .n b { font-size: 26px; }
  .dw .kp .n { flex-wrap: wrap; gap: 4px 8px; }
  .dw .q .rw { flex-wrap: wrap; } .dw .q .nr { min-width: 0; } .dw .q .tt { flex-basis: 60%; }
  .dw .tabs { overflow-x: auto; scrollbar-width: none; } .dw .tabs button { flex: 1 0 auto; font-size: 12px; padding: 7px 8px; gap: 5px; }
  .dw .card { padding: 16px; }
}
