* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f2f4f7; color: #222; }
a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* --- top --- */
.top { background: #0d47a1; color: #fff; position: sticky; top: 0; z-index: 50; }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 14px; }
.logo { color: #fff; font-size: 22px; font-weight: 700; }
.logo b { color: #ffd54f; }
.menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.menu > a, .kat-menu > a { color: #e3ecff; padding: 8px 10px; border-radius: 6px; white-space: nowrap; }
.menu > a:hover, .kat-menu > a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }
.kat-menu { position: relative; }
.kat-lista { display: none; position: absolute; right: 0; top: 100%; background: #fff; min-width: 240px; max-height: 70vh; overflow: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }
.kat-lista a { display: block; color: #222; padding: 9px 14px; }
.kat-lista a:hover { background: #eef3fb; }
.kat-menu:hover .kat-lista, .kat-menu:focus-within .kat-lista { display: block; }

/* --- przyciski --- */
.btn { display: inline-block; background: #1565c0; color: #fff !important; border: 0; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.btn:hover { background: #0d47a1; text-decoration: none; }
.btn-alt { background: #2e7d32; }
.btn-alt:hover { background: #1b5e20; }
.btn-maly { padding: 7px 12px; font-size: 13px; }
.btn-szary { background: #607d8b; }
.btn-danger { background: #c62828; }

/* --- layout --- */
.tresc { max-width: 1200px; margin: 18px auto; padding: 0 14px; }
.kolumny { display: grid; grid-template-columns: 270px 1fr; gap: 18px; align-items: start; }
.panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px; }
.panel h3 { margin-bottom: 10px; font-size: 16px; border-bottom: 1px solid #e5e9f0; padding-bottom: 8px; }

/* --- filtry --- */
.filtry label { display: block; font-size: 14px; padding: 3px 0; cursor: pointer; }
.filtry input[type=checkbox] { margin-right: 6px; }
.filtry select, .filtry input[type=text], .filtry input[type=email], .filtry input[type=password], .filtry input[type=number] {
    width: 100%; padding: 9px 10px; margin: 4px 0 10px; border: 1px solid #c7d0dd; border-radius: 7px; font-size: 14px;
}
.filtry .grupa { margin-bottom: 12px; }
.filtry .grupa > b { display: block; font-size: 13px; text-transform: uppercase; color: #607d8b; margin-bottom: 4px; }
.filtr-nag { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filtr-nag select { padding: 8px 10px; border: 1px solid #c7d0dd; border-radius: 7px; }

/* --- oferty --- */
.oferta { display: flex; gap: 14px; background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.oferta.demo { border-left: 4px dashed #ffb300; }
.of-logo { flex: 0 0 64px; }
.of-logo img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.brak-logo { display: block; width: 64px; height: 64px; border-radius: 10px; background: #e3ecff; color: #0d47a1; font-size: 28px; font-weight: 700; text-align: center; line-height: 64px; }
.of-cialo { flex: 1; min-width: 0; }
.of-cialo h3 { font-size: 17px; margin-bottom: 5px; }
.typ { font-size: 11px; padding: 2px 8px; border-radius: 20px; vertical-align: middle; }
.typ.zleceniodawca { background: #e3f2fd; color: #0d47a1; }
.typ.zleceniobiorca { background: #e8f5e9; color: #1b5e20; }
.typ.demo-t { background: #fff8e1; color: #b26a00; }
.typ.pilne { background: #ff5252; color: #fff; font-weight: 700; }
.typ.koniec { background: #eceff1; color: #546e7a; }
.of-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #5c6b7a; margin: 3px 0; }
.stawka { color: #1b5e20; font-weight: 600; }
.of-opis { font-size: 14px; color: #444; margin-top: 6px; }

/* --- paginacja --- */
.paginacja { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.paginacja a, .paginacja b, .paginacja span { padding: 7px 12px; border-radius: 7px; background: #fff; border: 1px solid #d5dde8; font-size: 14px; }
.paginacja b { background: #0d47a1; color: #fff; border-color: #0d47a1; }
.paginacja span { border: 0; background: none; }

/* --- info o czynie (wyskakujace powiadomienia innerHTML) --- */
#info-czyn { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 999; width: min(480px, 92vw); pointer-events: none; }
.czyn { pointer-events: auto; background: #263238; color: #fff; padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); animation: wjazd .25s ease; font-size: 14px; }
.czyn.ok { background: #2e7d32; }
.czyn.blad { background: #c62828; }
@keyframes wjazd { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* --- formularze --- */
.form-wiersz { margin-bottom: 12px; }
.form-wiersz label { display: block; font-size: 13px; color: #546e7a; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
    width: 100%; padding: 10px; border: 1px solid #c7d0dd; border-radius: 8px; font-size: 15px; font-family: inherit;
}
textarea { resize: vertical; min-height: 110px; }
.radio-wiersz label, .check-wiersz label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; padding: 4px 0; font-size: 14px; }

/* --- profil / zdjecia --- */
.profil-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.profil-top .logo-podglad img { width: 110px; height: 110px; object-fit: cover; border-radius: 14px; }
.zdjecia-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.zdjecia-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; }
.zdjecia-grid .puste { height: 90px; border: 2px dashed #c7d0dd; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #90a4ae; font-size: 26px; cursor: pointer; }
.licznik-znakow { font-size: 12px; color: #78909c; text-align: right; }

/* --- tabele admin --- */
table.tabela { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.tabela th, .tabela td { padding: 9px 10px; border-bottom: 1px solid #e5e9f0; text-align: left; }
.tabela th { background: #eef3fb; font-size: 12px; text-transform: uppercase; color: #546e7a; }
.tabela input[type=number] { width: 90px; padding: 6px; }
.tabela-wrap { overflow-x: auto; }

/* --- zakladki --- */
.zakladki { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.zakladki a { padding: 9px 16px; background: #fff; border-radius: 8px; border: 1px solid #d5dde8; font-size: 14px; }
.zakladki a.aktywna { background: #0d47a1; color: #fff; border-color: #0d47a1; }

/* --- szczegoly oferty --- */
.oferta-full h1 { font-size: 22px; margin-bottom: 8px; }
.dane-kontaktowe { background: #fffde7; border: 1px solid #ffe082; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.zgloszenie-wiersz { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1f5; flex-wrap: wrap; }

.stopka { text-align: center; color: #90a4ae; font-size: 13px; padding: 24px 10px; }

/* --- responsywnosc --- */
@media (max-width: 900px) {
    .kolumny { grid-template-columns: 1fr; }
    .filtry-kolumna { order: 2; }
    .burger { display: block; margin-left: auto; }
    .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; }
    .menu.otwarte { display: flex; }
    .kat-lista { position: static; box-shadow: none; max-height: none; border: 1px solid #d5dde8; margin: 4px 0; }
    .kat-menu:hover .kat-lista { display: none; }
    .kat-menu.otwarte .kat-lista { display: block; }
    .oferta { flex-direction: column; }
    .of-logo img, .brak-logo { width: 52px; height: 52px; line-height: 52px; font-size: 22px; }
}

/* combo miasto: naglowek = pole wpisywania (bez ramki, lupa+linia sygnalizuja edycje) + X + strzalka; lista ponizej */
.miasto-box { position: relative; width: 100%; flex-basis: 100%; background: #fff; font-size: 14px; }
.miasto-head { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.miasto-box .miasto-head input { flex: 1; width: 100%; min-width: 0; border: 0; padding: 7px 0 2px 20px; font-size: 14px; outline: none; color: #333; box-shadow: none; }
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='6' cy='6' r='4.5' stroke='%2390a4ae' stroke-width='1.5' fill='none'/%3E%3Cline x1='9.5' y1='9.5' x2='13' y2='13' stroke='%2390a4ae' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat left center; }
.miasto-head input::placeholder { color: #90a4ae; font-style: italic; }
.miasto-x { color: #b0bec5; font-size: 16px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.miasto-x:hover { color: #e53935; }

.miasto-body { display: none; }
.miasto-box.open .miasto-body { display: block; }
.miasto-body select { width: 100%; border: 0; margin: 0; font-size: 13px; outline: none; }
.miasto-body select option { padding: 4px 8px; }
option.miasto-prio { color: #e67e22; }
/* checkbox "zapamietaj panstwo" w niebieskim menu */
.zapam-panstwo { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #cfe3ff; cursor: pointer; white-space: nowrap; font-weight: 400; }
.zapam-panstwo input { margin: 0; accent-color: #ffd54f; }

/* drzewo kategorii w lewej kolumnie indexu � glowne zawsze rozwiniete, glebiej tylko aktywna galea */
.kat-box h3 { margin-bottom: 8px; }
.kat-wszystkie { display: block; padding: 5px 6px; margin-bottom: 6px; border-bottom: 1px solid #e3eaf3; font-weight: 600; font-size: 14px; }
.kat-wszystkie.akt { color: #1565c0; }
ul.kat-drzewo, ul.kat-sub { list-style: none; margin: 0; padding: 0; }
ul.kat-sub { margin-left: 14px; padding-left: 8px; border-left: 1px dotted #c7d0dd; }
ul.kat-drzewo li > a, ul.kat-sub li > a { display: block; padding: 3px 6px; border-radius: 5px; font-size: 13px; color: #37474f; text-decoration: none; }
ul.kat-drzewo > li > a { font-weight: 600; font-size: 14px; color: #263238; }
ul.kat-drzewo li > a:hover { background: #eef3f9; color: #1565c0; }
ul.kat-drzewo li > a.akt, ul.kat-sub li > a.akt { background: #e3f0fb; color: #0d47a1; font-weight: 600; }
.kat-ile { color: #90a4ae; font-weight: 400; font-size: 12px; }
/* kaskadowe selecty kategorii w formularzu oferty */
#kat-kaskada { display: flex; gap: 8px; flex-wrap: wrap; }
#kat-kaskada select.kat-poziom { flex: 1; min-width: 150px; padding: 9px; border: 1px solid #c7d0dd; border-radius: 7px; background: #fff; }


/* ================= AUKCJE ================= */
.panel-nawig { display: flex; gap: 4px; margin-bottom: 10px; }
.panel-nawig > a { padding: 9px 18px; background: #eceff4; border-radius: 8px 8px 0 0; font-weight: 700; font-size: 14px; color: #546e7a; text-decoration: none; }
.panel-nawig > a.akt { background: #1565c0; color: #fff; }
.panel-nawig.pod { margin-top: -4px; }
.panel-nawig.pod > a { padding: 6px 14px; background: #f4f7fb; border-radius: 7px; font-weight: 500; font-size: 13px; }
.panel-nawig.pod > a.akt { background: #e3f0fb; color: #0d47a1; }

.aukcja { display: flex; gap: 14px; align-items: flex-start; }
.aukcja .auk-glowne { flex: 1; min-width: 0; }
.aukcja .auk-bok { width: 250px; flex-shrink: 0; }
.auk-zdjecia img#auk-gl { max-width: 100%; max-height: 380px; border-radius: 8px; display: block; margin: 0 auto 8px; }
.auk-miniatury { display: flex; gap: 6px; flex-wrap: wrap; }
.auk-miniatury img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.auk-miniatury img:hover { border-color: #1565c0; }
.auk-brak-foto { background: #eceff4; border-radius: 8px; padding: 60px 0; text-align: center; color: #90a4ae; }
.auk-par { margin: 10px 0; }
.auk-akcja { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.auk-podobny { padding: 7px 0; border-bottom: 1px solid #eef2f7; }
.auk-podobny:last-child { border-bottom: 0; }

.zdj-grid { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.zdj-kwadrat { width: 88px; height: 88px; border: 2px dashed #b0bec5; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: #f7fafc; }
.zdj-kwadrat.plus { font-size: 34px; color: #90a4ae; cursor: pointer; }
.zdj-kwadrat.plus:hover { border-color: #1565c0; color: #1565c0; }
.zdj-kwadrat img { width: 100%; height: 100%; object-fit: cover; }
.zdj-x { position: absolute; top: 2px; right: 5px; background: rgba(255,255,255,.85); border-radius: 50%; width: 18px; height: 18px; text-align: center; line-height: 17px; cursor: pointer; color: #e53935; font-weight: 700; }

.par-wiersz { display: flex; gap: 8px; margin-bottom: 6px; }
.par-wiersz input { flex: 1; }

.auk-pole { border: 1px solid #dfe6ee; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.auk-pole .rodz { display: block; padding: 3px 0; font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ok-txt { color: #2e7d32; font-weight: 600; }
.blad-txt { color: #c62828; }
.szary { color: #78909c; }
.typ.promo { background: #e53935; }

@media (max-width: 900px) {
  .aukcja { flex-direction: column; }
  .aukcja .auk-bok { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
}


.zdj-e { position: absolute; bottom: 2px; right: 5px; background: rgba(255,255,255,.85); border-radius: 50%; width: 18px; height: 18px; text-align: center; line-height: 17px; cursor: pointer; color: #1565c0; font-size: 11px; }
.oplata-info { font-size: 13px; color: #546e7a; margin: 6px 0 10px; }
.oplata-info b { color: #0d47a1; }

/* koleko postepu kaskady kategorii w wystaw-przedmiot */
.kat-prog { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.kat-prog svg { display: block; transform: rotate(-90deg); }
.kat-prog .kp-tlo { fill: none; stroke: #e3eaf2; stroke-width: 4; }
.kat-prog .kp-pel { fill: none; stroke: #1976d2; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 100.5; transition: stroke-dashoffset .3s, stroke .3s; }
.kat-prog .kp-pel.ok { stroke: #2e7d32; }
.kat-prog span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #546e7a; }
