 [hidden] { display: none !important; }
/* =========================
   MOTYWY (łatwa podmiana)
   ========================= */
:root{
  /* Podmień na font MZW */
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.08);

  /* Akcent BIP (czerwony pasek) */
  --bip-red: #b5162b;
  --bip-red-2: #9e1326;

  /* Kolory bazowe (domyślnie dark jak Twoja strona MZW) */
  --bg: #141414;
  --surface: #252525;
  --surface-2: #303030;
  --text: #f5f1e8;
  --muted: #b3a89c;
  --border: rgba(255,255,255,.10);

  --link: #f0c040;
  --link-hover: #c19f5a;

  --input-bg: rgba(255,255,255,.06);
  --input-text: var(--text);
  --input-border: rgba(255,255,255,.14);
}

/* Jasny motyw – zmieniasz tylko ten blok */
html[data-theme="light"]{
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --text: #1e1b16;
  --muted: #61584f;
  --border: rgba(0,0,0,.10);

  --link: #8b5a00;
  --link-hover: #6f4700;

  --input-bg: rgba(0,0,0,.04);
  --input-text: var(--text);
  --input-border: rgba(0,0,0,.14);
}

/* =========================
   DARK CONTRAST (wysoki kontrast)
   ========================= */
html[data-theme="dark-contrast"]{
  --bg: #000000;
  --surface: #000000;
  --surface-2: #0b0b0b;

  --text: #ffff00;          /* ŻÓŁTY */
  --muted: #e6e600;

  --border: #ffff00;

  --link: #ffff00;
  --link-hover: #ffffff;

  --input-bg: #000000;
  --input-text: #ffff00;
  --input-border: #ffff00;
}

/* =========================
   DOSTĘPNOŚĆ – POWIĘKSZANIE TEKSTU
   ========================= */

/* bazowy rozmiar */
html{
  font-size: 16px;
}

/* poziom 1 */
html.font-scale-1{
  font-size: 18px; /* +12% */
}

/* poziom 2 */
html.font-scale-2{
  font-size: 20px; /* +25% */
}

/* poziom 3 */
html.font-scale-3{
  font-size: 22px; /* +38% */
}

/* drobna korekta elementów UI */
html[class*="font-scale"] .mobile-bar__label{
  font-size: 0.9em;
}



/* =========================
   RESET / BAZA
   ========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a{ color: var(--link); text-decoration:none; }
a:hover{ color: var(--link-hover); }
.container{
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}


/* =========================
    INNE ELEMENTY BAZOWE
    ========================= */
    
hr { border:none; border-top: 1px dashed var(--border); }
.t_center{ text-align: center; }
.t_right{ text-align: right; }
.bold{ font-weight: 700; }
.normal { font-weight: 400; }
.small{ font-size: 0.9em; }
.bip-content .content img {
    max-width: 100%;
    height: auto;
}



   /* =========================
   BIP BADGE (LOGO)
   ========================= */
.bip-badge{
  width: 70px;
}

.bip-badge img{
  width: 70px;
  object-fit: contain;
  display: block;
}



/* =========================
   TOP (jak w załączniku)
   ========================= */
.bip-top{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.bip-top__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  padding: 16px 0;
}
.brand{
  display:flex;
  gap: 12px;
  align-items:center;
  min-width: 280px;
}
.brand__logo{
  width: 60px;
  display:grid; place-items:center;
}
.brand__logo img {
  width: 100%;
}
.brand__text strong{
  display:block;
  font-size: 20px;
  color: var(--text);
}
.brand__text small{
  display:block;
  color: var(--muted);
  margin-top: 2px;
  font-size: 13px;
}
/* =========================
   BREADCRUMBS (okruszki)
   ========================= */

/* czerwony pasek z okruszkami */
.bip-crumbbar{
  background: var(--bip-red);
  border-top: 1px solid rgba(255,255,255,.10);
}
.breadcrumbs{
  display:flex;
  align-items:center;
  gap: 10px;
  min-height: 52px;
  color: rgba(255,255,255,.92);
  font-size: 15px;
}
.breadcrumbs a{ color: #fff; opacity: .95; }
.breadcrumbs a:hover{ opacity: 1; text-decoration: underline; }
.breadcrumbs .sep{ opacity: .85; }
.breadcrumbs [aria-current="page"]{ font-weight: 700; }

/* =========================
   LAYOUT CONTENT
   ========================= */
.bip-main{
  padding: 24px 0 36px;
}
.bip-layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}
.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.bip-sidebar .panel{ padding: 16px; }
.panel__title{
  margin: 0 0 10px;
  font-size: 16px;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
}

.bip-content{
  /* -- aby długi tekst się łamał poprawnie */
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  /* ------------------------------- */
}

.bip-content .panel{
  padding: 18px;
}
.page-title{
  margin: 0;
  font-size: 26px;
}
.page-meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.page-meta .dot{ opacity:.7; }

.content{ margin-top: 18px; }
.content h2{ margin: 22px 0 10px; }
.notice{
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 75%, transparent);
}

/* =========================
   ETYKIETY OPERACYJNE
   ========================= */
.tag{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;  /*13px*/
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* DODANIE */
.tag-success{
  background: rgba(0, 160, 80, .18);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, .35);
}

/* ZMIANA */
.tag-warning{
  background: rgba(240, 192, 64, .18);
  color: #f0c040;
  border: 1px solid rgba(240, 192, 64, .35);
}

/* USUNIĘCIE */
.tag-danger{
  background: rgba(200, 50, 50, .18);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, .35);
}
/* INFORMACJA */
.tag-info{
  background: rgba(52, 152, 219, .18);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, .35);
}
/* ARCHIWUM */
.tag-archive{
  background: rgba(150, 150, 150, .18);
  color: #95a5a6;
  border: 1px solid rgba(149, 165, 166, .35);
}

/* mobile */
@media (max-width: 640px){
  .tag{
    font-size: 0.70rem; /*12px*/
  }
}

/* ============= button Przycisk w białej ramce ============= */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: var(--text-main) !important; /* biały tekst */
    text-decoration: none !important;
    border: 1px solid var(--border);
   
    border-radius: 6px;
    margin-top: 20px;

    transition: all 0.3s ease;
    backdrop-filter: blur(3px); /* elegancki nowoczesny efekt */
}



/* Efekt hover */
.btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: var(--border);

}

@media (max-width: 600px) {
    .btn-more.btn-mobile-fullwidth {
        width:100%;
        text-align: center;
    }
}

/* =========================
   LISTA AKTUALNOŚCI
   ========================= */

.news-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.news-item a{
  display: flex;
  justify-content: space-between;
  gap: 0px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
  flex-direction: column;
}

.news-item a:hover{
  background: color-mix(in oklab, var(--surface-2) 90%, transparent);
  border-color: color-mix(in oklab, var(--link) 40%, var(--border));
}

.news-title{
  font-weight: 500;
}

.news-pubdate{
  display: block;
  margin-top: 0px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}


/* =========================
   PAGINACJA
   ========================= */

.pagination{
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.pagination .page{
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.pagination .page:hover{
  background: color-mix(in oklab, var(--surface-2) 90%, transparent);
}

.pagination .page.is-active{
  font-weight: 700;
  border-color: color-mix(in oklab, var(--link) 60%, var(--border));
}

.pagination .page.disabled{
  opacity: .5;
  pointer-events: none;
}

/* =========================
   TABELKI
   ========================= */
/* TOP actions */
.top-actions{
  display:flex;
  align-items:center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle{
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 65%, transparent);
  color: var(--text);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap: 10px;
  transition: border-color .18s ease;
}

.theme-toggle__icon{
  font-size: 18px;
  line-height: 1;
}
.theme-toggle:hover{
  border-color: color-mix(in oklab, var(--link) 55%, var(--border));
}
.theme-toggle__text{ font-size: 14px; color: color-mix(in oklab, var(--text) 92%, var(--muted)); }
.theme-toggle--full{ width:100%; justify-content:center; }




/* TABLE styling */
.content table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}
.content thead th{
  text-align:left;
  font-size: 14px;
  padding: 12px 12px;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
  background: color-mix(in oklab, var(--surface-2) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.content tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.content tbody tr:last-child td{ border-bottom: none; }
.content tbody tr:hover td{
  background: color-mix(in oklab, var(--surface-2) 65%, transparent);
}
/* TABLE mobile */
@media (max-width: 640px){
  .bip-content table td,
  .bip-content table th{
    font-size: 0.8rem;
  }
}

/* MOBILE BAR (jak na screenie) */
.mobile-bar{
  display:none;
}
@media (max-width: 980px){
  /* żeby content nie wchodził pod pasek */
  body{ padding-bottom: 74px; }

  .mobile-bar{
    display:grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    background: var(--bip-red);
    border-top: 1px solid rgba(255,255,255,.18);
    z-index: 9997;
  }
  .mobile-bar__btn{
    appearance:none;
    border:0;
    background: transparent;
    color:#fff;
    cursor:pointer;
    display:flex;
    flex-direction: column;
    align-items:center;
    justify-content:center;
    gap: 4px;
    font: inherit;
  }
  .mobile-bar__btn + .mobile-bar__btn{
    border-left: 1px solid rgba(255,255,255,.22);
  }
  .mobile-bar__icon{ font-size: 20px; line-height: 1; }
  .mobile-bar__label{ font-size: 14px; opacity: .95; }

  /* ukryj sidebar na mobile (menu idzie do drawera) */
  .bip-sidebar{ display:none; }
}

/* Drawer z lewej */
.mobile-drawer{
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  
}
.mobile-drawer.is-open{
  pointer-events: auto;
}
.mobile-drawer__backdrop{
  position:absolute;
  inset:0;
  z-index: 1;
  border:0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .22s ease;
}
.mobile-drawer.is-open .mobile-drawer__backdrop{
  opacity: 1;
}
.mobile-drawer__panel{
  position:absolute;
  top:0; left:0;
  height:100%;
  z-index: 9999;
  width: min(360px, 86vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-101%);
  transition: transform .22s ease;
  display:flex;
  flex-direction: column;
}
.mobile-drawer.is-open .mobile-drawer__panel{
  transform: translateX(0);
}
.mobile-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer__close{
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 65%, transparent);
  color: var(--text);
  border-radius: 10px;
  height: 38px;
  width: 44px;
  cursor:pointer;
}
.mobile-drawer__foot{
  margin-top: auto;
  padding: 12px 12px 18px;
  border-top: 1px solid var(--border);
}




/* =========================
   MENU BIP – WERSJA ZWARTA
   ========================= */

/* ===== SIDEBAR ===== */

/* Wyłączenie animacji tylko na start (JS zdejmie klasę po inicjalizacji) */
html.nav-noanim .submenu,
html.nav-noanim .m-submenu,
html.nav-noanim .has-submenu .chev{
  transition: none !important;
}

/* strzałka */
.has-submenu .chev{
  margin-left: auto;
  transition: transform .18s ease;
}
.has-submenu [aria-expanded="true"] .chev{
  transform: rotate(180deg);
}

.nav{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px; /* minimalne odstępy */
}

/* linki bez podmenu */
.nav a{
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  line-height: 1.3;
  transition: background .15s ease;
}


.nav a:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

/* aktywna pozycja */
.nav a.is-active{
  font-weight: 700;
  background: color-mix(in oklab, var(--link) 14%, var(--surface-2));
  border: 1px solid color-mix(in oklab, var(--link) 38%, var(--border));
}

/* ===== ELEMENT Z PODMENU ===== */

.has-submenu{
  display: block;
}

/* przycisk-rodzic */
.nav-parent{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1.3;
  text-align: left;
}

.nav-parent:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}



/* ===== SUBMENU ===== */

.submenu{
  list-style: none;
  margin: 0;
  padding: 2px 0 0 12px; /* mniejszy odstęp od rodzica */
  display: grid;
  gap: 2px;

  /* animacja */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
}

/* otwarte submenu */
.submenu.is-open{
  opacity: 1;
  transform: translateY(1px);
}

/* linki w submenu */
.submenu a{
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.95em;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
}

.submenu a:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  color: var(--text);
}

/* ===== MOBILE MENU ===== */

.mobile-nav{
  padding: 10px;
  display: grid;
  gap: 2px;
}

.mobile-nav a{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
}

.mobile-nav a:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

/* mobile – element z podmenu */
.m-item.has-submenu{
  display: block;
}

/* mobile parent */
.m-parent{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1.3;
  text-align: left;
}

.m-parent:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

/* mobile submenu */
.m-submenu{
  margin-top: 2px;
  padding-left: 10px;
  display: grid;
  gap: 2px;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
}

.m-submenu.is-open{
  opacity: 1;
  transform: translateY(0);
}

/* mobile submenu link */
.m-submenu a{
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.95em;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
}

.m-submenu a:hover{
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  color: var(--text);
}


/* =========================
   PANEL INFO BIP – ZWIJANA (BEZ JS, Z ANIMACJĄ)
   checkbox hack: input + label + content
   ========================= */

.panel-info{
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface-2) 65%, transparent);
}


/* belka */
.panel-info-head{
  width: 100%;
  border: 0;
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #fff;
  background: var(--bip-red);

  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  cursor: pointer;
  user-select: none;
}

.panel-info-head[noclick]{
  cursor: default;
}


/* chevron */
.panel-info-chev{
  font-size: 14px;
  line-height: 1;
  transition: transform .25s ease;
}

/* zawartość (animowana) */
.panel-info-body{
  overflow: hidden;
  height: 0;
  transition: height .5s ease;
}

/* otwarty stan */
.panel-info.is-open .panel-info-body{
  /* height ustawia JS */
}

.panel-info.is-open .panel-info-chev{
  transform: rotate(180deg);
}

.panel-info-body .padding-10{
  padding: 10px 14px;
}


/* lista danych */
.metryka-list{
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.metryka-list > div{
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px;
}

.metryka-list dt{
  font-weight: 600;
  color: color-mix(in oklab, var(--text) 85%, var(--muted));
}

.metryka-list dd{
  margin: 0;
  color: var(--text);
}

/* mobile */
@media (max-width: 640px){
  .metryka-list > div{
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* =========================
   ZAŁĄCZNIKI DO ARTYKUŁU
   ========================= */
.article-attachments{
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.attachments-title{
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text);
}

.attachments-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.attachments-list a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 12px 14px;
  border-radius: 12px;

  background: color-mix(in oklab, var(--surface-2) 75%, transparent);
  border: 1px solid var(--border);

  color: var(--text);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.attachments-list a:hover{
  background: color-mix(in oklab, var(--surface-2) 90%, transparent);
}

.attachment-name{
  font-weight: 500;
}

.attachment-meta{
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* === MOBILE < 600px === */
@media (max-width: 600px){
  .attachments-list a{
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .attachment-meta{
    font-size: 12px;
    color: var(--muted);
  }
}


/* =========================
   DOLNA BELKA ARTYKUŁU
   ========================= */
.article-bottom-bar{
   margin: 24px -18px -18px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  border-radius: 0 0 12px 12px;
  font-size: 14px;
}

/* licznik */
.article-views{
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.article-views strong{
  color: var(--text);
  font-weight: 700;
}

/* druk */
.article-print{
  appearance: none;
  border: 0px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  transition: border-color .2s, background-color .2s;
}

.article-print:hover{
  /* border-color: color-mix(in oklab, var(--link) 55%, var(--border)); */
  background-color: color-mix(in oklab, var(--surface-2) 65%, transparent);
}

/* mobile */
@media (max-width: 640px){
  .article-bottom-bar{
    flex-direction: column;
    align-items: flex-start;
  }

  .article-print{
    align-self: flex-end;
  }
}

/* druk – ukryj belkę */
@media print{
  .article-bottom-bar{
    display: none !important;
  }
}


/* =========================
   REJESTR ZMIAN
   ========================= */


/* przewijanie tabeli w poziomie, gdy się nie mieści */
.table-scroll-wrapper{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* płynne przewijanie na mobile */
  border-radius: 12px;              /* żeby pasowało do stylu */
}



/* opcjonalnie: nie łam dat i etykiet */
.table-scroll td:nth-child(3),
.table-scroll td:nth-child(4){
  white-space: nowrap;
}


/* wrapper, który ma scrollować */
.table-scroll-wrapper{
  max-width: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;

  /* kluczowe: żeby nie powodowało scrolla całej strony */
  display: block;
}

/* tabela ma się "mieścić" w wrapperze i dopiero tam rozszerzać */
.table-scroll-wrapper > table{
  width: max-content;  /* szerokość wg zawartości */
  min-width: 100%;     /* ale nie mniejsza niż wrapper */
}


/* opcjonalnie: żeby kolumny nie łamały się dziwnie */
.table-scroll-wrapper .table-scroll th,
.table-scroll-wrapper .table-scroll td{
  white-space: nowrap;
}


/* =========================
   FOOTER (jak w załączniku)
   ========================= */
.bip-footer{
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0 18px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr 1.2fr 1fr ;
  gap: 18px;
}
.footer-grid h3{
  margin: 0 0 10px;
  font-size: 16px;
}
.footer-grid p{
  margin: 0 0 10px;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
}
.footer-links{
  list-style:none; padding:0; margin:0;
  display:grid; gap: 8px;
}
.footer-bottom{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-copy{
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.to-top{
  width: 38px; height: 38px;
  border-radius: 999px;
  display:grid; place-items:center;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  color: var(--text);
}
.to-top:hover{
  border-color: color-mix(in oklab, var(--link) 55%, var(--border));
}

/* =========================
   RWD
   ========================= */
@media (max-width: 980px){
  .bip-layout{ grid-template-columns: 1fr; }
  .brand__text strong{ font-size: 18px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .bip-top__inner{ flex-direction: column; align-items: center; }
  .brand{ min-width: unset; }
  .bip-badge{ align-self: flex-end; }
  .bip-badge img{ width: 36px; }
  .footer-grid{ grid-template-columns: 1fr; }
}



@media print {

  /* tło na papier */
  html, body{
    background: #fff !important;
    color: #000 !important;
    line-height: 1.15 !important;
  }

  /* UKRYJ zbędne elementy, żeby nie zajmowały miejsca */
  .bip-sidebar,
  .bip-footer,
  .mobile-bar,
  .mobile-drawer,
  .bip-crumbbar,
  .top-actions{
    display: none !important;
  }

   /* pokaż sam obrazek BIP */
  .bip-badge{
    display: block !important;
   /* position: fixed; */
    bottom: 10mm;
    right: 10mm;
    width: 22mm;
  }

  .bip-badge img{
    width: 22mm;     /* rozsądny rozmiar na papier */
    height: auto;
  }

  /* ukryj przyciski w top-actions */
  .top-actions button{
    display: none !important;
  }

  /* upewnij się, że kontener top-actions nie zajmuje miejsca */
  .top-actions{
    display: block !important; /* zostaje, ale puste */
  }


  /* zostaw nagłówek BIP */
  .bip-top{
    display: block !important;
    border: 0 !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  .bip-top__inner{
    padding: 6mm 0 !important;  /* zmniejszamy, żeby nie wypychało treści */
    gap: 10px !important;
  }

  /* layout w druku: jedna kolumna */
  .bip-main{
    padding: 0 !important;
    margin: 0 !important;
  }
  .bip-layout,
  .bip-content{
    display: block !important;
  }

  /* sam artykuł */
  article.panel{
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    color: #000 !important;

    margin: 0 !important;
    padding: 0 !important;

    break-before: avoid;
    page-break-before: avoid;
  }

  /* margines kartki */
  @page{
    margin: 12mm;
  }
}








