/* Kalkulator ofert Vipolimexu. Kolory, czcionki i układ z makiety (projekt/makieta, 2.12.2026). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caslon-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caslon-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --tlo: #F5F5F9; --tekst: #1C1C3A; --granat: #262262; --czerwien: #B0123A; --linia: #DCDCE6; --linia-jasna: #ECECF2; --linia-pola: #C6C6D6;
  --szary: #5A5A72; --ciemnoszary: #3D3D55; --granat-jasny: #ECECF7;
  --dec-linia: #E0B24A; --dec-tlo: #FFF4DB; --dec-tekst: #6B4300;
  --dane-linia: #F0A9B8; --dane-tlo: #FDECEF; --dane-tekst: #8E1230;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--tlo); color: var(--tekst); font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--granat); text-decoration: none; }
a:hover { color: var(--czerwien); }
h1 { margin: 0; font-family: "Libre Caslon Text", Georgia, serif; font-size: 30px; font-weight: 700; color: var(--granat); letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--granat); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #7A7AD0; outline-offset: 2px; }
.ukryte { display: none !important; }
.tylko-czytnik { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.szare { color: var(--szary); }
.male { font-size: 12px; color: var(--szary); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.lamanie { overflow-wrap: anywhere; }

/* nagłówek strony */
.gora { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 10px 32px; background: #FFFFFF; border-bottom: 1px solid var(--linia); }
.gora img { height: 30px; width: auto; display: block; }
.gora .podtytul { font-size: 13px; color: var(--szary); border-left: 1px solid var(--linia); padding-left: 16px; }
.gora nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.gora nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--ciemnoszary); font-weight: 500; }
.gora nav a.aktywna { background: var(--granat-jasny); color: var(--granat); font-weight: 600; }
.kto { display: flex; align-items: center; gap: 10px; color: var(--ciemnoszary); }
.kto .kolko { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--granat); color: #FFFFFF; font-size: 13px; font-weight: 600; }
.kto form { margin: 0; }
.link { min-height: 44px; padding: 0 10px; border: none; background: none; color: var(--granat); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }

main { max-width: 1520px; margin: 0 auto; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 24px; }
main.waska { max-width: 1120px; padding-top: 32px; }
.naglowek { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.naglowek > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.okruszki { font-size: 13px; color: var(--szary); overflow-wrap: anywhere; }
.opis-strony { color: var(--szary); }

/* przyciski, pola */
.przycisk { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--linia-pola); background: #FFFFFF; color: var(--granat); font-weight: 600; cursor: pointer; text-align: center; }
.przycisk:hover { color: var(--granat); border-color: var(--granat); }
.przycisk.glowny { border-color: var(--granat); background: var(--granat); color: #FFFFFF; font-weight: 700; }
.przycisk.glowny:hover { background: #1B1850; color: #FFFFFF; }
.przycisk.duzy { min-height: 48px; }
.przycisk.szeroki { width: 100%; }
.przycisk[disabled] { border-color: var(--linia); background: var(--linia-jasna); color: var(--szary); cursor: not-allowed; font-weight: 700; }
.przycisk.cichy { color: var(--szary); }
.przycisk.dec { border-color: var(--dec-tekst); color: var(--dec-tekst); }
.przycisk.dane { border-color: var(--dane-tekst); color: var(--dane-tekst); }
.pole { height: 44px; padding: 0 12px; border: 1px solid var(--linia-pola); border-radius: 8px; background: #FFFFFF; min-width: 0; }
select.pole { padding: 0 10px; }
.pole.liczba { width: 120px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pole.duza { height: 48px; font-size: 20px; font-weight: 700; color: var(--granat); }
.pole.pelna { width: 100%; }
label, .etykieta { font-size: 13px; font-weight: 600; }
.pole-grupa { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pole-wiersz { display: flex; align-items: center; gap: 10px; }
.wyjasnienie { padding: 10px 12px; border-radius: 8px; background: var(--tlo); font-size: 12px; color: var(--ciemnoszary); }

.karta { background: #FFFFFF; border: 1px solid var(--linia); border-radius: 12px; }
.karta.wnetrze { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.komunikat { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--granat); background: var(--granat-jasny); color: var(--granat); font-weight: 600; }
.komunikat.blad { border-color: var(--dane-linia); background: var(--dane-tlo); color: var(--dane-tekst); }
.w-karcie { margin: 14px 16px 0; }

.znaczek { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--granat-jasny); color: var(--granat); white-space: nowrap; }
.znaczek.obrys { background: none; border: 1px solid var(--linia); color: var(--ciemnoszary); }
.znaczek.pelny { background: var(--granat); color: #FFFFFF; }
.znaczek.dec { border: 1px solid var(--dec-linia); background: var(--dec-tlo); color: var(--dec-tekst); }
.znaczek.dane { border: 1px solid var(--dane-linia); background: var(--dane-tlo); color: var(--dane-tekst); }

/* logowanie */
.logowanie { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.logowanie .karta { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.logowanie img { height: 34px; width: auto; align-self: flex-start; }
.logowanie form { display: flex; flex-direction: column; gap: 14px; }

/* oferty */
.zrzut { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; background: #FFFFFF; border: 2px dashed #9A9AC0; border-radius: 16px; text-align: center; }
.zrzut.nad { border-color: var(--granat); background: var(--granat-jasny); }
.zrzut .tytul { font-size: 18px; font-weight: 700; color: var(--granat); }
.zrzut input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.przewijanie { overflow-x: auto; }
.tabela-ofert { min-width: 900px; }
.tabela-ofert .rzad { display: grid; grid-template-columns: minmax(260px, 2.4fr) minmax(140px, 1.2fr) 70px minmax(240px, 2fr) 96px 150px; column-gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--linia-jasna); }
.tabela-ofert .rzad:last-child { border-bottom: none; }
.tabela-ofert .rzad.glowka, .glowka { padding-top: 10px; padding-bottom: 10px; background: var(--tlo); border-bottom: 1px solid var(--linia); font-size: 12px; font-weight: 600; color: var(--szary); }
.tabela-ofert .nazwa { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tabela-ofert .nazwa strong { color: var(--granat); }
.tabela-ofert .akcje { display: flex; gap: 6px; justify-content: flex-end; }
.tabela-ofert .akcje form { margin: 0; }
.stan { display: flex; flex-wrap: wrap; gap: 6px; }
.czytam { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ciemnoszary); }
.pasek { height: 6px; border-radius: 3px; background: var(--linia-jasna); overflow: hidden; }
.pasek i { display: block; width: 40%; height: 6px; background: var(--granat); border-radius: 3px; animation: jedzie 1.4s ease-in-out infinite; }
@keyframes jedzie { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .pasek i { animation: none; width: 60%; } }
.pusto { padding: 32px 20px; text-align: center; color: var(--szary); }

/* wycena */
.dwie { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.pozycje { flex: 999 1 760px; min-width: 0; overflow: hidden; }
.bok { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.filtry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--linia); }
.pigulka { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--linia); background: #FFFFFF; color: var(--ciemnoszary); font-weight: 500; cursor: pointer; }
.pigulka.aktywna { border-color: var(--granat); background: var(--granat); color: #FFFFFF; font-weight: 600; }
.pigulka.dec { border-color: var(--dec-linia); background: var(--dec-tlo); color: var(--dec-tekst); font-weight: 600; }
.pigulka.dane { border-color: var(--dane-linia); background: var(--dane-tlo); color: var(--dane-tekst); font-weight: 600; }
.pigulka.dec.aktywna { box-shadow: 0 0 0 2px var(--dec-tekst); }
.pigulka.dane.aktywna { box-shadow: 0 0 0 2px var(--dane-tekst); }
.filtry .szukaj { flex: 1 1 180px; max-width: 260px; margin-left: auto; }
.hurtowo { border-bottom: 1px solid var(--linia); }
.hurtowo > summary, .szczegoly > summary, .zwijane > summary { cursor: pointer; font-weight: 600; color: var(--granat); }
.hurtowo > summary { padding: 12px 16px; min-height: 44px; }
.hurtowo form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 0 16px 16px; }
.siatka-poz { min-width: 1000px; }
.siatka-poz .rzad { display: grid; grid-template-columns: 64px minmax(170px, 2fr) 96px 56px 60px minmax(260px, 2.4fr) 84px 84px; column-gap: 14px; align-items: start; padding: 14px 16px; border-bottom: 1px solid var(--linia-jasna); }
.siatka-poz .rzad.glowka { align-items: center; padding-top: 10px; padding-bottom: 10px; }
.siatka-poz .rzad.pominieta > *:not(.kat) { opacity: 0.45; }
.siatka-poz img, .siatka-poz .bez-zdjecia { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--linia-jasna); border-radius: 8px; background: #FFFFFF; }
.siatka-poz .bez-zdjecia { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--szary); text-align: center; }
.siatka-poz .co { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.siatka-poz .symbol { font-weight: 700; color: var(--granat); }
.siatka-poz .opis { font-size: 13px; color: var(--ciemnoszary); }
.siatka-poz .cena { display: flex; flex-direction: column; gap: 2px; }
.siatka-poz .kat { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.siatka-poz .wybor { display: flex; align-items: center; gap: 8px; }
.siatka-poz .wybor select { flex: 1 1 auto; }
.siatka-poz .wybor .clo { flex: 0 0 auto; width: 52px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.siatka-poz .netto { font-weight: 700; color: var(--granat); }
.siatka-poz .brutto { color: var(--szary); }
.podp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--szary); }
.ramka { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; font-size: 13px; }
.ramka.dec { border: 1px solid var(--dec-linia); background: var(--dec-tlo); color: var(--dec-tekst); }
.ramka.dane { border: 1px solid var(--dane-linia); background: var(--dane-tlo); color: var(--dane-tekst); }
.ramka .tytul { font-weight: 700; }
.ramka .guziki { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ramka form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.ramka .przycisk { background: #FFFFFF; }
.szczegoly > summary { font-size: 12px; font-weight: 600; min-height: 24px; }
.szczegoly form { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; padding-top: 10px; }
.szczegoly .cala { grid-column: 1 / -1; }
.szczegoly .guziki { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.szczegoly .pole { width: 100%; }
.stopka-tabeli { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--szary); }
.stopka-tabeli .strony { display: flex; gap: 8px; }
.linia-podsum { display: flex; justify-content: space-between; gap: 12px; }
.gotowe { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--granat); border-radius: 10px; background: var(--granat-jasny); color: var(--granat); }
.gotowe .tytul { font-weight: 700; }
.tytul-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding-top: 10px; align-items: end; }
.wybor-pola { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; min-height: 44px; }
.wybor-pola input { width: 20px; height: 20px; }

/* kolumny */
.kolumny-ust { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.podglad { border-collapse: collapse; font-size: 12px; }
.podglad th, .podglad td { border: 1px solid var(--linia-jasna); padding: 4px 6px; text-align: left; vertical-align: top; max-width: 220px; min-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podglad th { background: var(--tlo); font-weight: 600; }
.podglad th select { width: 100%; height: 36px; min-width: 120px; }
.podglad td.nr, .podglad th.nr { min-width: 36px; width: 36px; color: var(--szary); text-align: right; background: var(--tlo); position: sticky; left: 0; }
.podglad tr.nag td { background: var(--granat-jasny); font-weight: 600; }
.podglad tr.przed td { color: var(--szary); }

/* cła i przypisania, ustawienia */
.tabela-cel { min-width: 700px; }
.tabela-cel .rzad { display: grid; grid-template-columns: minmax(220px, 2.6fr) 64px 92px 64px minmax(170px, 1.5fr) 96px; column-gap: 14px; align-items: center; padding: 4px 20px; border-bottom: 1px solid var(--linia-jasna); }
.tabela-cel .rzad.glowka { padding-top: 10px; padding-bottom: 10px; }
.tabela-cel .rzad > .zwijane { justify-self: end; }
.tabela-cel .rzad > .zwijane[open] { grid-column: 1 / -1; justify-self: stretch; }
.tabela-cel .nazwa { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: 600; padding: 8px 0; }
.tabela-cel .nazwa .male { font-weight: 400; }
.tabela-cel .stawka { font-weight: 700; color: var(--granat); }
.zwijane > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--linia-pola); background: #FFFFFF; list-style: none; }
.zwijane > summary::-webkit-details-marker { display: none; }
.zwijane[open] > summary { background: var(--granat-jasny); }
.zwijane form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 12px 0; align-items: end; }
.zwijane .cala { grid-column: 1 / -1; }
.sekcja-glowka { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--linia); }
.sekcja-glowka .zwijane { flex: 1 1 100%; }
.sekcja-glowka .zwijane > summary { background: var(--granat); color: #FFFFFF; border-color: var(--granat); font-weight: 700; padding: 0 16px; }
.pamiec { flex: 1 1 420px; min-width: 0; }
.wpis { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--linia); border-radius: 10px; }
.wpis .gorna { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.wpis .gorna strong { color: var(--granat); }
.wpis .co { font-size: 13px; color: var(--ciemnoszary); overflow-wrap: anywhere; }
.wpis .znaczki { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wpis .guziki { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.wpis form { margin: 0; }
.kafle { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.trzy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.para { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.para .pole { width: 88px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.para label { font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 6px 24px rgba(28, 28, 58, 0.18); }
.htmx-request.pozycje, .htmx-request .pozycje { opacity: 0.6; transition: opacity 0.2s; }

/* węższe ekrany (laptop): tabela pozycji ma się mieścić razem z cenami, bez przewijania w bok */
@media (max-width: 1480px) {
  .siatka-poz { min-width: 840px; }
  .siatka-poz .rzad { grid-template-columns: 56px minmax(130px, 2fr) 80px 44px 52px minmax(230px, 2.4fr) 74px 74px; column-gap: 10px; padding-left: 12px; padding-right: 12px; }
  .siatka-poz img, .siatka-poz .bez-zdjecia { width: 56px; height: 56px; }
  .bok { flex-basis: 300px; }
  main { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 720px) {
  .gora { padding: 10px 16px; }
  main { padding: 16px 16px 40px; }
  h1 { font-size: 24px; }
}
