.pi-bp-login-wrap { max-width: 380px; margin: 2em auto; padding: 2em; border: 1px solid #e0e0e0; border-radius: 8px; }
.pi-bp-login-form label { font-weight: 600; }
.pi-bp-login-form input[type="email"],
.pi-bp-login-form input[type="password"] { width: 100%; padding: 8px; margin-top: 4px; box-sizing: border-box; }
.pi-bp-btn { background: #1d4ed8; color: #fff; border: none; padding: 10px 18px; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
.pi-bp-btn-secondary { background: #6b7280; }
.pi-bp-error { background: #fee2e2; color: #991b1b; padding: 10px; border-radius: 4px; margin-bottom: 1em; }
.pi-bp-info { background: #dbeafe; color: #1e3a8a; padding: 10px; border-radius: 4px; }

.pi-bp-dashboard { max-width: 100%; margin: 1.5em 0; }
.pi-bp-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5em; }
.pi-bp-investment-card { border-top: 1px solid #e0e0e0; background: #fff; }

/* Pasek nagłówka: status + tytuł */
.pi-bp-header-bar { padding: 22px 5vw 18px; border-bottom: 1px solid #f0f1f3; background: linear-gradient(180deg, #fafbfc 0%, #fff 100%); }
.pi-bp-badge {
    display: inline-block; background: #22c55e; color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px;
}
.pi-bp-header-bar h3 { margin: 0; font-size: 24px; font-weight: 700; color: #1d2327; }

/* Układ dwukolumnowy: treść po lewej, panel informacji po prawej */
.pi-bp-layout { display: flex; gap: 36px; align-items: flex-start; padding: 26px 5vw 40px; }
.pi-bp-main-col { flex: 1 1 auto; min-width: 0; }
.pi-bp-side-col { flex: 0 0 320px; width: 320px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.pi-bp-empty-content { color: #888; font-style: italic; }

/* Karty w panelu bocznym */
.pi-bp-side-card { border: 1px solid #eceef1; border-radius: 10px; padding: 16px 18px; background: #fafbfc; }
.pi-bp-side-card h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #666; }
.pi-bp-facts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #333; }

.pi-bp-side-commission { background: #fef9c3; border-color: #fde68a; display: flex; flex-direction: column; gap: 4px; }
.pi-bp-commission-label { font-weight: 600; color: #713f12; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.pi-bp-commission-value { font-weight: 700; color: #713f12; font-size: 18px; }

.pi-bp-private-note { font-weight: normal; text-transform: none; letter-spacing: normal; color: #999; }

/* Mapka w panelu bocznym */
.pi-bp-map-wrap { border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; margin-bottom: 8px; }
.pi-bp-map { width: 100%; height: 160px; border: 0; display: block; }
.pi-bp-map-link { font-size: 13px; color: #1d4ed8; text-decoration: none; }
.pi-bp-map-link:hover { text-decoration: underline; }

/* Lista dokumentów w panelu bocznym */
.pi-bp-files-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pi-bp-files-list a {
    display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px;
    text-decoration: none; color: #1d2327; transition: background 0.15s;
}
.pi-bp-files-list a:hover { background: #eef1f5; }
.pi-bp-file-list-icon { font-size: 18px; flex-shrink: 0; }
.pi-bp-file-list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pi-bp-file-list-size { color: #888; font-size: 11px; flex-shrink: 0; }

/* Odznaka "Nowość" na liście inwestycji */
.pi-bp-new-badge {
    display: inline-block; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em;
    vertical-align: middle; margin-left: 6px;
}

/* Lista inwestycji pośrednika (wyszukiwarka + wybór) */
.pi-bp-search-bar { margin-bottom: 1em; }
.pi-bp-search-bar input[type="search"] {
    width: 100%; max-width: 420px; padding: 10px 12px; box-sizing: border-box;
    border: 1px solid #ccc; border-radius: 6px; font-size: 1em;
}
.pi-bp-investments-list { display: flex; flex-direction: column; gap: 8px; }
.pi-bp-inv-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 16px; border: 1px solid #e0e0e0; border-radius: 8px;
    text-decoration: none; color: inherit; transition: background 0.15s, border-color 0.15s;
}
.pi-bp-inv-row:hover { background: #f5f7fa; border-color: #c9d3e0; }
.pi-bp-inv-row-title { font-weight: 600; }
.pi-bp-inv-row-meta { color: #666; font-size: 0.9em; white-space: nowrap; }
#pi-bp-empty-search { color: #666; font-style: italic; }

.pi-bp-back { display: inline-block; margin-bottom: 1em; text-decoration: none; color: #1d4ed8; }

/* Przeplecione bloki tekstu i zdjęć w treści ogłoszenia */
.pi-bp-inv-content { display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-start; }
.pi-bp-block-text { box-sizing: border-box; }
.pi-bp-block-text p { margin: 0 0 0.6em; line-height: 1.6; }
.pi-bp-block-text p:last-child { margin-bottom: 0; }
.pi-bp-block-text ul, .pi-bp-block-text ol { margin: 0 0 0.6em 22px; padding: 0; }
.pi-bp-block-text a { color: #1d4ed8; text-decoration: underline; }
.pi-bp-block-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }

/* Blok galerii: wiele zdjęć w jednym bloku, w równej siatce */
.pi-bp-gallery-block { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; box-sizing: border-box; width: 100%; }
.pi-bp-gallery-block-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; cursor: zoom-in; display: block; }
@media (max-width: 480px) {
    .pi-bp-gallery-block { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .pi-bp-layout { flex-direction: column; padding: 18px; gap: 20px; }
    .pi-bp-side-col { position: static; width: 100%; flex-basis: auto; }
    .pi-bp-inv-content > * { flex-basis: 100% !important; max-width: 100% !important; }
}
