:root {
--navy: #0f2233;
--navy-2: #1a384f;
--ink: #16232e;
--muted: #5c6c7a;
--line: #e2e8ee;
--bg: #f3f5f7;
--paper: #fff;
--soft: #e7eef4;
--danger: #9e2b23;
--shadow: 0 10px 30px rgba(15, 34, 51, 0.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
margin: 0;
font-family: Manrope, "Segoe UI", sans-serif;
color: var(--ink);
background: var(--bg);
font-size: 16px;
line-height: 1.5;
}

button,
input,
select,
textarea { font-family: inherit; }

img { max-width: 100%; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

::selection { background: #d5e2ee; }

:focus-visible {
outline: 2px solid var(--navy);
outline-offset: 2px;
}

.skip {
position: absolute;
left: -999px;
top: 8px;
background: #fff;
padding: 8px 12px;
z-index: 50;
border-radius: 8px;
}

.skip:focus { left: 8px; }

.sr {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}

.wrap {
width: min(1120px, calc(100% - 32px));
margin: 0 auto;
}

.muted { color: var(--muted); }

.hint {
color: var(--muted);
font-size: 13px;
font-weight: 600;
}

.site-header {
position: sticky;
top: 0;
z-index: 20;
background: #fff;
border-top: 4px solid var(--navy);
border-bottom: 1px solid var(--line);
}

.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
position: relative;
}

.brand img {
height: 104px;
width: auto;
display: block;
}

.site-nav {
display: flex;
align-items: center;
gap: 22px;
}

.site-nav a {
text-decoration: none;
font-weight: 800;
color: var(--navy);
}

.nav-admin { color: var(--muted) !important; font-weight: 700 !important; }

.nav-toggle {
display: none;
width: 42px;
height: 42px;
border: 1px solid var(--line);
background: #fff;
border-radius: 10px;
padding: 0;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 4px;
}

.nav-toggle span {
display: block;
width: 16px;
height: 2px;
background: var(--navy);
}

.hero { padding: 36px 0 8px; }

.eyebrow {
color: var(--navy-2);
font-weight: 800;
font-size: 12px;
letter-spacing: 0.14em;
text-transform: uppercase;
}

.hero h1 {
margin-top: 8px;
font-size: clamp(36px, 5vw, 56px);
line-height: 0.98;
letter-spacing: -0.04em;
font-weight: 800;
color: var(--navy);
}

.lead {
margin-top: 12px;
max-width: 46ch;
color: var(--muted);
font-weight: 600;
}

.search {
display: flex;
gap: 8px;
margin-top: 20px;
max-width: 640px;
}

.search input { flex: 1; }

.offer { padding-bottom: 28px; }

.finder {
margin-top: 18px;
background: #fff;
border: 1px solid var(--line);
border-radius: 18px;
box-shadow: var(--shadow);
overflow: hidden;
}

.finder-tabs {
display: flex;
gap: 4px;
padding: 8px 8px 0;
border-bottom: 1px solid var(--line);
overflow-x: auto;
}

.finder-tabs button {
border: 0;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--muted);
font: inherit;
font-weight: 800;
font-size: 14px;
padding: 10px 14px 12px;
cursor: pointer;
white-space: nowrap;
}

.finder-tabs button span {
margin-left: 4px;
color: #8aa0b4;
font-weight: 700;
}

.finder-tabs button.is-on {
color: var(--navy);
border-bottom-color: var(--navy);
}

.finder-tabs button.is-on span { color: var(--navy); }

.finder-search {
display: flex;
gap: 8px;
padding: 14px 14px 0;
}

.finder-search input { flex: 1; }

.finder-grid {
display: grid;
grid-template-columns: 1.3fr 1fr 1fr 1fr;
gap: 12px;
padding: 14px;
}

.finder-block .finder-grid,
.finder-place { padding-top: 0; }

.finder-label {
margin: 0 14px 8px;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
}

.finder[data-kind="pojazd"] [data-for="przyczepa"],
.finder[data-kind="przyczepa"] [data-for="pojazd"],
.finder[data-kind="inne"] [data-for="pojazd"],
.finder[data-kind="inne"] [data-for="przyczepa"] { display: none; }

.finder:not(.is-open) .finder-more { display: none; }

.range {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px;
}

.finder-actions {
display: flex;
justify-content: space-between;
gap: 8px;
padding: 0 14px 14px;
}

.spec-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 8px;
}

.spec-tags span {
background: var(--soft);
color: var(--navy);
border-radius: 999px;
padding: 4px 8px;
font-size: 12px;
font-weight: 700;
}

.chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 18px 0 12px;
}

.chips button {
border: 1px solid var(--line);
background: #fff;
border-radius: 999px;
padding: 8px 14px;
font: inherit;
font-weight: 800;
font-size: 14px;
color: var(--navy);
cursor: pointer;
}

.chips button span {
color: var(--muted);
font-weight: 700;
}

.chips button.is-on {
background: var(--navy);
border-color: var(--navy);
color: #fff;
}

.chips button.is-on span { color: #d5e0ea; }

.filters {
display: grid;
grid-template-columns: 1.4fr repeat(3, 1fr) auto;
gap: 10px;
align-items: end;
background: #fff;
border: 1px solid var(--line);
border-radius: 16px;
padding: 12px;
}

.field {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 13px;
font-weight: 800;
color: var(--navy);
}

input:not([type]),
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
select,
textarea {
width: 100%;
border: 1px solid #d5dee7;
background: #fff;
color: var(--ink);
border-radius: 10px;
padding: 10px 12px;
font: inherit;
font-size: 15px;
font-weight: 600;
}

input:not([type]),
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"] {
appearance: none;
}

input,
select { height: 44px; }

textarea {
height: auto;
min-height: 120px;
resize: vertical;
line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
outline: none;
border-color: var(--navy);
box-shadow: 0 0 0 3px rgba(15, 34, 51, 0.12);
}

.btn {
height: 44px;
padding: 0 16px;
border-radius: 10px;
border: 1px solid transparent;
font: inherit;
font-weight: 800;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
}

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: #d5dee7; }
.btn-ghost:hover { background: #f4f7fa; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #7f221c; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.filters .btn { height: 44px; }

.results-bar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin: 14px 0 10px;
}

.results-bar p {
color: var(--muted);
font-weight: 700;
font-size: 14px;
}

.sort-label {
display: flex;
align-items: center;
gap: 8px;
color: var(--muted);
font-size: 13px;
font-weight: 800;
white-space: nowrap;
}

.sort-label select { width: auto; min-width: 190px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.card {
display: grid;
grid-template-columns: 232px minmax(0, 1fr) auto;
gap: 16px 18px;
align-items: center;
padding: 12px;
background: #fff;
border: 1px solid var(--line);
border-radius: 16px;
text-decoration: none;
color: inherit;
}

.card:hover {
border-color: #c5d2de;
box-shadow: var(--shadow);
}

.card-media {
position: relative;
height: 148px;
border-radius: 12px;
overflow: hidden;
background: var(--soft);
}

.card-media img,
.ph {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}

.ph {
display: grid;
place-items: center;
color: #5c738c;
font-weight: 800;
letter-spacing: 0.04em;
text-transform: uppercase;
font-size: 12px;
background: linear-gradient(180deg, #eef3f7, #e4ebf2);
}

.ph-lg { min-height: 280px; aspect-ratio: 16 / 10; border-radius: 16px; }

.pill {
position: absolute;
z-index: 1;
top: 8px;
left: 8px;
border-radius: 999px;
padding: 3px 8px;
font-size: 12px;
font-weight: 800;
}

.pill-warn { background: #f8efd8; color: #7a5208; }

.kicker {
color: var(--muted);
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
margin-bottom: 4px;
}

.card h2,
.detail-buy h2 {
font-size: 22px;
letter-spacing: -0.03em;
font-weight: 800;
color: var(--navy);
}

.meta { color: var(--muted); margin-top: 4px; font-size: 14.5px; font-weight: 600; }
.sub { margin-top: 2px; font-size: 14.5px; font-weight: 700; }

.card-price { text-align: right; padding-right: 8px; }

.card-price strong,
.detail-price {
display: block;
font-size: 22px;
letter-spacing: -0.03em;
color: var(--navy);
font-weight: 800;
white-space: nowrap;
}

.detail-price { font-size: 34px; margin: 10px 0 12px; }

.card-price span { color: var(--muted); font-size: 14px; font-weight: 700; }

.pager {
display: flex;
gap: 6px;
justify-content: center;
flex-wrap: wrap;
margin: 16px 0 4px;
}

.pager button[aria-current="page"] {
background: var(--navy);
color: #fff;
border-color: var(--navy);
}

.empty {
background: #fff;
border: 1px dashed #cfd8e2;
border-radius: 16px;
padding: 36px 20px;
text-align: center;
}

.empty h2 { font-size: 22px; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.02em; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 14px; }

.loading { color: var(--muted); font-weight: 700; padding: 18px 0; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: #d5e0ea;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.back:hover {
  color: #ffffff;
}

body.site .back {
  color: #d5e0ea;
}

body.site .back:hover {
  color: #ffffff;
}

/* Widok szczegółów - dwukolumnowy layout wyrównany do pełnej wysokości */
.detail {
display: grid;
grid-template-columns: 1.45fr 0.8fr;
gap: 22px 24px;
align-items: stretch;
}

.detail-content {
display: flex;
flex-direction: column;
gap: 16px;
min-width: 0;
height: 100%;
}

.gallery { width: 100%; }

.gallery-stage { position: relative; }

.gallery-stage img {
width: 100%;
aspect-ratio: 16 / 10;
object-fit: cover;
border-radius: 16px;
background: var(--soft);
display: block;
cursor: zoom-in;
}

.lightbox {
position: fixed;
inset: 0;
z-index: 80;
display: flex;
align-items: center;
justify-content: center;
padding: 28px 20px;
background: #081018;
}

.lightbox img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
}

.lightbox-close {
position: absolute;
top: 14px;
right: 14px;
width: 42px;
height: 42px;
border: 0;
border-radius: 999px;
background: #fff;
color: var(--navy);
font-size: 26px;
line-height: 1;
cursor: pointer;
}

body.lightbox-open { overflow: hidden; }

.nav-photo {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 40px;
height: 40px;
border: 0;
border-radius: 999px;
background: rgba(255, 255, 255, 0.94);
color: var(--navy);
font-size: 22px;
cursor: pointer;
}

.nav-photo.prev { left: 10px; }
.nav-photo.next { right: 10px; }

.thumbs {
display: flex;
gap: 8px;
margin-top: 8px;
overflow-x: auto;
}

.thumbs button {
border: 2px solid transparent;
padding: 0;
border-radius: 10px;
overflow: hidden;
background: none;
cursor: pointer;
flex: 0 0 auto;
}

.thumbs button.is-on { border-color: var(--navy); }

.thumbs img {
width: 92px;
height: 68px;
object-fit: cover;
display: block;
}

.detail-buy {
position: sticky;
top: 128px;
background: #fff;
border: 1px solid var(--line);
border-radius: 16px;
padding: 18px;
}

.note {
border-radius: 10px;
padding: 10px 12px;
font-weight: 700;
font-size: 14px;
margin-bottom: 12px;
}

.note-sold { background: #eee; color: #333; }
.note-reserved { background: #f8efd8; color: #7a5208; }

.added { margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }

.spec-list {
display: grid;
grid-template-columns: 1fr 1fr;
margin-top: 8px;
}

.spec-list > div {
border-top: 1px solid var(--line);
padding: 10px 12px 10px 0;
}

.spec-list dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.spec-list dd { margin: 2px 0 0; font-weight: 800; }

.prose { margin-top: 2px; }
.prose h3 { font-size: 16px; margin-bottom: 6px; color: var(--navy); }
.prose p { max-width: 68ch; line-height: 1.6; }

.contact-section { margin: 8px auto 18px; }

.location-section { margin: 0 auto 28px; }

.location-grid {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 16px;
align-items: stretch;
}

.map-frame {
min-height: 460px;
border-radius: 20px;
overflow: hidden;
border: 1px solid var(--line);
background: #e7eef3;
}

.map-frame iframe {
display: block;
width: 100%;
height: 100%;
min-height: 460px;
border: 0;
}

.company-card {
background: #fff;
border: 1px solid var(--line);
border-radius: 20px;
padding: 28px;
}

.company-card h2 {
margin: 6px 0 8px;
font-size: 30px;
line-height: 1.1;
letter-spacing: -0.03em;
color: var(--navy);
}

.company-card h3 {
margin: 22px 0 8px;
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
}

.company-card p {
margin: 0 0 10px;
font-weight: 800;
}

.company-card .fine {
display: block;
margin-bottom: 2px;
color: var(--muted);
font-size: 13px;
font-weight: 700;
}

.map-link {
color: var(--navy);
font-weight: 800;
}

.contact-card {
display: grid;
grid-template-columns: 0.85fr 1.15fr;
gap: 28px;
background: #fff;
border: 1px solid var(--line);
border-radius: 20px;
padding: 28px;
}

.contact-card h2 {
font-size: 32px;
letter-spacing: -0.03em;
color: var(--navy);
}

.contact-facts { margin: 16px 0 0; padding: 0; list-style: none; }
.contact-facts li + li { margin-top: 6px; }
.contact-facts a { color: var(--navy); font-weight: 800; }

.contact-card form { display: flex; flex-direction: column; gap: 12px; }

.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px 14px;
}

.inquiry {
background: var(--soft);
border-radius: 10px;
padding: 10px 12px;
font-weight: 800;
color: var(--navy);
}

.form-error { color: var(--danger); font-weight: 800; font-size: 14px; }

.hp {
position: absolute;
left: -9999px;
height: 0;
overflow: hidden;
}

.site-footer {
border-top: 1px solid var(--line);
padding: 18px 0 28px;
color: var(--muted);
font-size: 14px;
font-weight: 700;
}

.footer-inner {
display: flex;
justify-content: space-between;
gap: 12px;
}

.toast {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%) translateY(12px);
background: var(--navy);
color: #fff;
padding: 12px 16px;
border-radius: 12px;
opacity: 0;
pointer-events: none;
transition: 0.2s ease;
z-index: 60;
max-width: min(440px, calc(100% - 32px));
font-weight: 700;
}

.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-err { background: #8d2a22; }

.noscript {
margin: 16px;
padding: 12px;
background: #fff;
border-radius: 12px;
}

.login-screen {
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
}

.login-card {
width: min(440px, 100%);
background: #fff;
border: 1px solid var(--line);
border-radius: 20px;
padding: 28px 28px 24px;
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
gap: 12px;
}

.login-logo { width: min(240px, 100%); height: auto; margin: 0 auto 4px; display: block; }
.login-card h1 { font-size: 28px; letter-spacing: -0.03em; color: var(--navy); }
.login-card .quiet-link { align-self: center; margin-top: 4px; }

.admin-shell {
display: grid;
grid-template-columns: 260px 1fr;
min-height: 100vh;
}

.side {
background: #fff;
border-right: 1px solid var(--line);
padding: 18px 14px 16px;
display: flex;
flex-direction: column;
position: sticky;
top: 0;
height: 100vh;
}

.side-logo img { width: 190px; height: auto; display: block; }

.side-nav {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 18px;
}

.side-nav button {
text-align: left;
border: 0;
background: transparent;
border-radius: 10px;
padding: 10px 12px;
font: inherit;
font-weight: 800;
color: var(--ink);
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
}

.side-nav button.is-on { background: var(--soft); color: var(--navy); }

.badge {
background: var(--navy);
color: #fff;
border-radius: 999px;
min-width: 20px;
height: 20px;
padding: 0 6px;
font-size: 12px;
display: inline-grid;
place-items: center;
}

.side-foot {
margin-top: auto;
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
font-weight: 800;
}

.quiet-btn,
.quiet-link {
background: none;
border: 0;
padding: 0;
color: var(--muted);
font: inherit;
font-weight: 800;
cursor: pointer;
text-decoration: none;
}

.quiet-btn:hover,
.quiet-link:hover { color: var(--navy); }
.quiet-btn.danger:hover { color: var(--danger); }

.admin-main { padding: 28px 28px 56px; }

.page-head {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 12px;
margin-bottom: 16px;
}

.page-head h1 {
font-size: 32px;
letter-spacing: -0.035em;
color: var(--navy);
}

.stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin-bottom: 16px;
}

.stat {
background: #fff;
border: 1px solid var(--line);
border-radius: 14px;
padding: 14px 16px;
}

.stat b { display: block; font-size: 28px; letter-spacing: -0.03em; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }

.toolbar {
display: flex;
gap: 12px;
align-items: center;
margin-bottom: 12px;
flex-wrap: wrap;
}

.toolbar .chips { margin: 0; flex: 1; }
.toolbar input { width: min(320px, 100%); }

.table-wrap {
overflow-x: auto;
background: #fff;
border: 1px solid var(--line);
border-radius: 16px;
}

table.data {
width: 100%;
border-collapse: collapse;
min-width: 760px;
}

table.data th {
text-align: left;
font-size: 12px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
padding: 12px;
border-bottom: 1px solid var(--line);
}

table.data td {
padding: 12px;
border-bottom: 1px solid var(--line);
vertical-align: middle;
}

table.data tr:last-child td { border-bottom: 0; }

.thumb {
width: 84px;
height: 60px;
object-fit: cover;
border-radius: 8px;
background: var(--soft);
}

select.status {
width: auto;
height: 36px;
padding: 0 8px;
font-size: 13px;
}

.row-actions { display: flex; gap: 12px; white-space: nowrap; }

.panel {
background: #fff;
border: 1px solid var(--line);
border-radius: 16px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 14px;
margin-bottom: 16px;
}

.panel h2 { font-size: 18px; color: var(--navy); }

.type-picker {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}

.type-picker button {
border: 1px solid var(--line);
background: #fff;
border-radius: 12px;
padding: 14px 12px;
text-align: left;
cursor: pointer;
font: inherit;
color: var(--ink);
}

.type-picker button strong { display: block; color: var(--navy); }
.type-picker button small { display: block; color: var(--muted); font-weight: 600; margin-top: 3px; }

.type-picker button.is-on {
border-color: var(--navy);
background: #f4f8fb;
box-shadow: inset 0 0 0 1px var(--navy);
}

.group {
border: 1px solid var(--line);
border-radius: 14px;
padding: 14px;
background: #fbfcfd;
display: flex;
flex-direction: column;
gap: 12px;
}

.group h2 { font-size: 15px; }

.check {
display: flex;
align-items: center;
gap: 8px;
font-weight: 800;
color: var(--navy);
}

.check input { width: 18px; height: 18px; }

.field-label { font-size: 13px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }

.dropzone {
border: 1.5px dashed #b7c5d3;
border-radius: 14px;
padding: 18px;
text-align: center;
background: #fbfcfd;
}

.dropzone.is-over { border-color: var(--navy); background: #f3f7fb; }
.dropzone .btn { margin-top: 8px; }

.photo-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 10px;
margin-top: 10px;
}

.photo-item {
border: 1px solid var(--line);
border-radius: 12px;
overflow: hidden;
background: #fff;
}

.photo-item.is-cover { outline: 2px solid var(--navy); }

.photo-item img { height: 104px; width: 100%; object-fit: cover; display: block; }

.photo-actions { display: flex; gap: 6px; padding: 6px; }

.photo-actions button {
flex: 1;
height: 32px;
border: 1px solid var(--line);
background: #fff;
border-radius: 8px;
font: inherit;
font-size: 12px;
font-weight: 800;
cursor: pointer;
color: var(--navy);
}

.form-actions { display: flex; gap: 10px; justify-content: flex-end; }

.stack { display: flex; flex-direction: column; gap: 10px; }

.brand-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
align-items: start;
}

.brand-add { display: flex; gap: 8px; }
.brand-add input { flex: 1; }

.brand-row {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto auto auto;
gap: 8px;
align-items: center;
padding: 8px 0;
border-top: 1px solid var(--line);
}

.brand-flag {
position: relative;
width: 36px;
height: 22px;
flex: none;
}

.brand-flag input {
position: absolute;
inset: 0;
margin: 0;
opacity: 0;
cursor: pointer;
width: 100%;
height: 100%;
}

.brand-flag span {
display: block;
width: 36px;
height: 22px;
border-radius: 999px;
background: #31445c;
position: relative;
}

.brand-flag span::after {
content: "";
position: absolute;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
top: 3px;
left: 3px;
}

.brand-flag input:checked + span { background: #2563eb; }
.brand-flag input:checked + span::after { transform: translateX(14px); }
.brand-flag input:focus-visible + span { outline: 2px solid #7eb0ff; outline-offset: 2px; }
.brand-row.is-off input[data-brand-name] { color: #8ea0b3; }

.brand-row .count {
color: var(--muted);
font-size: 13px;
font-weight: 700;
white-space: nowrap;
}

.brand-row .btn { height: 40px; padding: 0 12px; }

.msg {
background: #fff;
border: 1px solid var(--line);
border-radius: 14px;
padding: 14px 16px;
display: flex;
flex-direction: column;
gap: 6px;
}

.msg.is-unread { border-color: #c5d4e2; background: #f7fafc; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; }
.msg-body { white-space: pre-wrap; }
.msg a { color: var(--navy); font-weight: 800; }

dialog {
border: none;
border-radius: 16px;
padding: 22px;
width: min(420px, calc(100% - 32px));
box-shadow: 0 20px 60px rgba(15, 34, 51, 0.2);
}

dialog::backdrop { background: rgba(9, 20, 34, 0.45); }
dialog p { font-weight: 700; margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

#oferta,
#kontakt,
#lokalizacja { scroll-margin-top: 130px; }

@media (max-width: 980px) {
.finder-grid { grid-template-columns: 1fr 1fr; }
.detail,
.contact-card,
.location-grid { grid-template-columns: 1fr; }
.map-frame,
.map-frame iframe { min-height: 320px; }
.detail-buy { position: static; }
.stats { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
.brand-grid { grid-template-columns: 1fr; }
.admin-shell { grid-template-columns: 1fr; }
.side {
position: sticky;
top: 0;
height: auto;
z-index: 6;
border-right: 0;
border-bottom: 1px solid var(--line);
}
.side-nav { flex-direction: row; overflow-x: auto; margin-top: 10px; }
.side-nav button { white-space: nowrap; }
.side-foot { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 10px; }
.side-logo img { width: 140px; }
.admin-main { padding: 18px 14px 40px; }
.type-picker { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
.brand img { height: 78px; }
.nav-toggle { display: flex; }
.site-nav {
display: none;
position: absolute;
top: 100%;
right: 0;
left: 0;
background: #fff;
border-bottom: 1px solid var(--line);
padding: 8px 16px 14px;
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.site-nav.is-open { display: flex; }
.brand-row { grid-template-columns: auto minmax(0, 1fr); }
.brand-row input[data-brand-name] { grid-column: 2; min-width: 0; }
.card { grid-template-columns: 1fr; }
.card-media { height: 200px; }
.card-price {
display: flex;
justify-content: space-between;
align-items: baseline;
text-align: left;
padding-right: 0;
}
.finder-grid,
.form-grid,
.spec-list { grid-template-columns: 1fr; }
.finder-search { flex-direction: column; }
.finder-search .btn { width: 100%; }
.contact-card,
.login-card { padding: 18px; }
.page-head { align-items: stretch; flex-direction: column; }
.footer-inner { flex-direction: column; }
input, select, textarea { font-size: 16px; }
.sort-label { width: 100%; }
.sort-label select { flex: 1; }
.results-bar { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after {
transition: none !important;
animation: none !important;
}
}

body.site {
background: #0b1220;
color: #e7eef6;
}

body.site .site-header {
background: rgba(11, 18, 32, 0.94);
border-top: 0;
border-bottom: 1px solid #243246;
backdrop-filter: blur(12px);
}

body.site .brand img {
height: 72px;
background: #fff;
border-radius: 12px;
padding: 6px;
}

body.site .site-nav a {
color: #d5e0ea;
font-weight: 700;
font-size: 14px;
}

body.site .nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  border: 1px solid #3b82f6;
  border-radius: 10px;
  padding: 8px 16px;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

body.site .nav-phone:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

body.site .nav-phone svg {
  flex-shrink: 0;
  display: block;
}

body.site .nav-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  border: 1px solid #3b82f6;
  border-radius: 10px;
  padding: 8px 18px;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  margin-left: -10px; /* przesunięcie w lewo w stronę numeru */
  transition: background 0.15s ease, transform 0.15s ease;
}

body.site .nav-admin:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

body.site .nav-toggle {
background: #121b2b;
border-color: #31445c;
}

body.site .nav-toggle span { background: #fff; }

body.site .hero {
  position: relative;
  padding: 110px 0 100px;
  background-image: 
    /* Winieta radialna skupiająca wzrok na środku i przyciemniająca krawędzie */
    radial-gradient(ellipse at center, rgba(11, 18, 32, 0.45) 0%, rgba(11, 18, 32, 0.9) 80%, #0b1220 100%),
    /* Płynne przejście z paska nawigacji na górze i wtapianie w ofertę na dole */
    linear-gradient(180deg, #0b1220 0%, rgba(11, 18, 32, 0.6) 20%, rgba(11, 18, 32, 0.7) 70%, #0b1220 100%),
    /* Właściwe zdjęcie w tle */
    url('../hero-bg.jpg');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  border-bottom: 1px solid #1e293b;
  overflow: hidden;
}

/* Dodatkowy delikatny cień pod napisem, żeby tekst był idealnie czytelny */
body.site .hero h1,
body.site .hero .lead,
body.site .hero .eyebrow {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

body.site .hero-actions {
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  body.site .hero {
    padding: 70px 0 60px;
    background-position: 65% center;
  }
}

body.site .eyebrow { color: #7eb0ff; }

body.site .hero h1 {
color: #fff;
font-size: clamp(34px, 5vw, 58px);
max-width: 14ch;
}

body.site .hero h1 span { color: #60a5fa; }

body.site .lead { color: #b7c6d4; max-width: 52ch; }

body.site .hero-actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 22px;
}

body.site .btn-primary { background: #2563eb; }
body.site .btn-primary:hover { background: #1d4ed8; }

body.site .btn-ghost {
background: transparent;
color: #e7eef6;
border-color: #31445c;
}

body.site .btn-ghost:hover { background: #172033; }

body.site .finder {
background: #121b2b;
border-color: #243246;
box-shadow: none;
}

body.site .finder-tabs { border-bottom-color: #243246; }

body.site .finder-tabs button { color: #8ea3b8; }

body.site .finder-tabs button.is-on,
body.site .finder-tabs button.is-on span {
color: #fff;
border-bottom-color: #3b82f6;
}

body.site .field,
body.site .finder-label,
body.site .sort-label,
body.site .results-bar p { color: #9aafc2; }

body.site input,
body.site select,
body.site textarea {
background: #0b1220;
color: #e7eef6;
border-color: #31445c;
}

body.site .card,
body.site .empty,
body.site .contact-card,
body.site .company-card,
body.site .detail-buy {
background: #121b2b;
border-color: #243246;
color: #e7eef6;
}

body.site .card h2,
body.site .detail-buy h2,
body.site .empty h2,
body.site .contact-card h2,
body.site .company-card h2,
body.site .prose h3,
body.site .company-card h3 { color: #fff; }

body.site .spec-tags span {
background: #1a2740;
color: #d5e4f2;
}

body.site .card-price strong,
body.site .detail-price { color: #fff; }

body.site .map-link,
body.site .company-card a { color: #7eb0ff; }

body.site .site-footer { border-top-color: #243246; }

body.site .site-nav.is-open {
background: #121b2b;
border-bottom-color: #243246;
}

body.admin-body {
background: #0b1220;
color: #e7eef6;
}

body.admin-body .login-screen { background: #0b1220; }

body.admin-body .login-card,
body.admin-body .panel,
body.admin-body .stat,
body.admin-body .table-wrap,
body.admin-body .msg,
body.admin-body .group,
body.admin-body .photo-item,
body.admin-body dialog {
background: #121b2b;
border: 1px solid #243246;
color: #e7eef6;
box-shadow: none;
}

body.admin-body .login-logo,
body.admin-body .side-logo img {
background: #fff;
border-radius: 12px;
padding: 8px;
}

body.admin-body .login-card h1,
body.admin-body .page-head h1,
body.admin-body .panel h2,
body.admin-body .stat b,
body.admin-body .empty h2,
body.admin-body .type-picker button strong,
body.admin-body .field,
body.admin-body .field-label,
body.admin-body .check { color: #fff; }

body.admin-body .muted,
body.admin-body .stat span,
body.admin-body .brand-row .count,
body.admin-body table.data th { color: #9aafc2; }

body.admin-body .side {
background: #0e1624;
border-right-color: #243246;
}

body.admin-body .side-nav button { color: #d5e0ea; }

body.admin-body .side-nav button.is-on {
background: #1a2740;
color: #fff;
}

body.admin-body .badge { background: #2563eb; }

body.admin-body .quiet-btn,
body.admin-body .quiet-link { color: #9aafc2; }

body.admin-body .quiet-btn:hover,
body.admin-body .quiet-link:hover { color: #fff; }

body.admin-body .btn-primary { background: #2563eb; }
body.admin-body .btn-primary:hover { background: #1d4ed8; }

body.admin-body .btn-ghost {
background: transparent;
color: #e7eef6;
border-color: #31445c;
}

body.admin-body .btn-ghost:hover { background: #172033; }

body.admin-body input,
body.admin-body select,
body.admin-body textarea {
background: #0b1220;
color: #e7eef6;
border-color: #31445c;
}

body.admin-body .chips button {
background: transparent;
border-color: #31445c;
color: #d5e0ea;
}

body.admin-body .chips button.is-on {
background: #2563eb;
border-color: #2563eb;
color: #fff;
}

body.admin-body table.data td,
body.admin-body table.data th,
body.admin-body .brand-row { border-color: #243246; }

body.admin-body .type-picker button {
background: #0b1220;
border-color: #31445c;
color: #d5e0ea;
}

body.admin-body .type-picker button.is-on {
border-color: #3b82f6;
background: #152238;
box-shadow: inset 0 0 0 1px #3b82f6;
}

body.admin-body .group,
body.admin-body .dropzone {
background: #0e1624;
border-color: #31445c;
}

body.admin-body .dropzone.is-over {
border-color: #3b82f6;
background: #152238;
}

body.admin-body .photo-item.is-cover { outline-color: #3b82f6; }

body.admin-body .photo-actions button {
background: #0b1220;
border-color: #31445c;
color: #e7eef6;
}

body.admin-body .msg.is-unread {
border-color: #3b82f6;
background: #152238;
}

body.admin-body .msg a { color: #7eb0ff; }

body.admin-body dialog::backdrop { background: rgba(4, 8, 16, 0.72); }

.catalog-head {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 18px;
margin: 28px 0 14px;
}

.catalog-head h2 {
margin-top: 6px;
color: #fff;
font-size: clamp(32px, 4vw, 46px);
letter-spacing: -0.04em;
}

.catalog-head .finder-tabs {
border: 1px solid #243246;
border-radius: 14px;
padding: 4px;
background: #121b2b;
margin: 0;
}

.catalog-head .finder-tabs button {
border-bottom: 0;
border-radius: 10px;
padding: 8px 12px;
}

body.site .catalog-head .finder-tabs button.is-on {
background: #2563eb;
color: #fff;
}

.list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
}

.card {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 0;
overflow: hidden;
gap: 0;
}

.card-media { height: 190px; border-radius: 0; }

.card .pill {
top: 10px;
left: 10px;
background: #0b1220;
color: #fff;
}

.card .pill-status {
left: auto;
right: 10px;
background: #14532d;
color: #d1fae5;
}

.pill-status.is-reserved { background: #78350f; color: #fde68a; }

.price-badge {
position: absolute;
z-index: 1;
right: 10px;
bottom: 10px;
background: #0b1220;
color: #fff;
border-radius: 10px;
padding: 6px 10px;
font-weight: 800;
}

.card-body {
display: flex;
flex-direction: column;
gap: 8px;
padding: 14px 14px 16px;
flex: 1;
}

.card-open { margin-top: auto; width: 100%; }

/* Badge Nowość! na kafelku */
.card-new-badge {
color: #38bdf8;
font-weight: 800;
font-size: 14px;
letter-spacing: -0.01em;
margin: 0;
}

/* Wyposażenie i baner kontaktowy w szczegółach */
.features-block {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 4px;
}

.features-title {
font-size: 13px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #9aafc2;
}

.features-tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.feature-tag {
display: inline-flex;
align-items: center;
gap: 8px;
background: #121f33;
color: #e7eef6;
border: 1px solid #1e324d;
border-radius: 999px;
padding: 8px 18px;
font-size: 14px;
font-weight: 600;
}

.feature-tag svg {
color: #3b82f6;
flex-shrink: 0;
}

/* Duży baner z telefonem do właściciela - wyrównany do spodu */
.detail-call-banner {
background: #111e31;
border: 1px solid #1e3553;
border-radius: 18px;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
margin-top: auto;
}

.call-banner-left {
display: flex;
align-items: center;
gap: 14px;
}

.call-banner-icon {
width: 48px;
height: 48px;
background: #1e3557;
border-radius: 12px;
display: grid;
place-items: center;
color: #60a5fa;
flex-shrink: 0;
}

.call-banner-sub {
color: #8ea3b8;
font-size: 13px;
font-weight: 600;
margin-bottom: 2px;
}

.call-banner-name {
color: #ffffff;
font-size: 16px;
font-weight: 800;
letter-spacing: -0.01em;
}

.call-banner-btn {
background: #2563eb;
color: #ffffff !important;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 11px 20px;
border-radius: 12px;
font-weight: 800;
font-size: 15px;
white-space: nowrap;
box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
transition: background 0.15s ease, transform 0.15s ease;
}

.call-banner-btn:hover {
background: #1d4ed8;
transform: translateY(-1px);
}

@media (max-width: 720px) {
.detail-call-banner {
flex-direction: column;
align-items: stretch;
text-align: left;
}
.call-banner-btn {
justify-content: center;
width: 100%;
}
}

.why { margin: 48px auto 10px; text-align: center; }
.why h2 {
margin: 8px 0 10px;
color: #fff;
font-size: clamp(28px, 4vw, 40px);
letter-spacing: -0.03em;
}
.why-lead { margin: 0 auto 18px; max-width: 62ch; }
.why-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
text-align: left;
}
.why-grid article {
background: #121b2b;
border: 1px solid #243246;
border-radius: 16px;
padding: 16px;
}
.why-grid h3 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.why-grid p { color: #b7c6d4; font-size: 14px; font-weight: 600; }

.contact-layout {
display: grid;
grid-template-columns: 0.85fr 1.15fr;
gap: 22px;
align-items: start;
}
.contact-section h2 { color: #fff; margin: 6px 0 8px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; }
.info-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.info-list article {
background: #121b2b;
border: 1px solid #243246;
border-radius: 14px;
padding: 12px 14px;
}
.info-list p {
color: #9aafc2;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
margin-bottom: 4px;
}
.info-list strong,
.info-list a { color: #fff; font-weight: 800; text-decoration: none; }
.contact-card {
display: flex;
flex-direction: column;
gap: 12px;
}
.contact-card h3 { color: #fff; font-size: 22px; margin-bottom: 4px; }

@media (max-width: 980px) {
.list,
.why-grid { grid-template-columns: 1fr 1fr; }
.contact-layout,
.catalog-head { grid-template-columns: 1fr; }
.catalog-head { flex-direction: column; align-items: stretch; }
}

@media (max-width: 720px) {
.list,
.why-grid { grid-template-columns: 1fr; }
}
/* Czerwony przycisk Wyloguj w menu bocznym panelu */
#logoutBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  background: #dc2626;
  color: #ffffff !important;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #ef4444;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#logoutBtn:hover {
  background: #b91c1c;
  border-color: #dc2626;
  transform: translateY(-1px);
  color: #ffffff !important;
}

#logoutBtn:active {
  transform: translateY(0);
}
/* Pełne przyciski Edytuj i Usuń w tabeli ogłoszeń */
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-actions button[data-edit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  background: #2563eb;
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* Powiększone przyciski Edytuj i Usuń w tabeli ogłoszeń */
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-actions button[data-edit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: #2563eb;
  color: #ffffff !important;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #3b82f6;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.row-actions button[data-edit]:hover {
  background: #1d4ed8;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.row-actions button[data-del],
.row-actions button[data-del-msg] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: #dc2626;
  color: #ffffff !important;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #ef4444;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.row-actions button[data-del]:hover,
.row-actions button[data-del-msg]:hover {
  background: #b91c1c;
  border-color: #dc2626;
  transform: translateY(-1px);
}

.row-actions button:active {
  transform: translateY(0);
}
/* Elegancki badge TOMCARS nad nagłówkiem Hero */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 27, 43, 0.7);
  border: 1px solid rgba(96, 165, 250, 0.35);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
}

.badge-brand {
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge-sep {
  color: #60a5fa;
  font-size: 11px;
}

.badge-city {
  color: #93c5fd;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}