/**
 * Style frontendowe – shortcody Deweloper Oferty
 *
 * v2.0: Dodano style dla elementów dodatkowych (badge statusu,
 *       wiersz ceny łącznej) i rozszerzonej historii cen.
 *       Istniejące style niezmienione.
 *
 * v2.6: Kolor przewodni (thead tabeli + nagłówek kafelków) konfigurowalny
 *       w ustawieniach wtyczki. Sterowany zmiennymi CSS poniżej —
 *       wartości domyślne nadpisywane inline (wp_add_inline_style).
 */

/* ============ Kolor przewodni + typografia (konfigurowalne) ============ */
:root {
    --dew-accent: #2c3e50;          /* tło thead tabeli + nagłówka kafelków */
    --dew-accent-contrast: #ffffff; /* kolor tekstu na tle przewodnim */
    --dew-table-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --dew-table-color: #333333;     /* kolor tekstu w tabeli */
    --dew-table-weight: 400;        /* grubość tekstu w komórkach */
    --dew-grid-width: 1px;          /* grubość linii siatki */
    --dew-grid-color: #eeeeee;      /* kolor linii siatki */
    --dew-btn-height: 34px;         /* wspólna wysokość przycisków */
}

/* ============ Karta lokalu ============ */
.dew-lokal-card {
    max-width: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #333;
    overflow: hidden;
}

.dew-lokal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.dew-lokal-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #1a1a1a;
}

.dew-lokal-investment {
    padding: 12px 20px;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #555;
}

/* Statusy */
.dew-lokal-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dew-status-wolny {
    background: #d4edda;
    color: #155724;
}
.dew-status-zarezerwowany {
    background: #fff3cd;
    color: #856404;
}
.dew-status-sprzedany {
    background: #f8d7da;
    color: #721c24;
}

/* Tabela szczegółów lokalu */
.dew-lokal-details {
    width: 100%;
    border-collapse: collapse;
}
.dew-lokal-details td {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.dew-lokal-details .dew-label {
    width: 45%;
    color: #666;
    font-weight: 500;
}
.dew-lokal-details .dew-price-row td {
    background: #fefce8;
}
.dew-lokal-details .dew-price {
    font-size: 1.15em;
    color: #1a7a1a;
}

/* Akcje pod kartą */
.dew-lokal-actions {
    padding: 16px 20px;
    text-align: center;
}

/* Dane dewelopera */
.dew-developer-info {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}
.dew-developer-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #444;
}

/* ============ Tabela inwestycji ============ */
.dew-inwestycja-wrap {
    margin: 20px 0;
    /* Krój i kolor sterowane zmiennymi CSS — ustawiane per inwestycja
       (Lokale → „Wygląd tabeli na stronie"). */
    font-family: var(--dew-table-font);
    font-size: 15px;
    color: var(--dew-table-color, #333);
}

.dew-inwestycja-header {
    margin-bottom: 16px;
}
.dew-inwestycja-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.4em;
    color: #1a1a1a;
}
.dew-inwestycja-address {
    color: #666;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
   OBSZAR PRZEWIJANIA TABELI (v2.12)
   Kontener na wskaźniki: gradienty na krawędziach + podpowiedź.
   Klasy dew-more-left / dew-more-right nadaje JS.
   ═══════════════════════════════════════════════════════ */
.dew-table-scrollarea {
    position: relative;
}

/* Gradienty sygnalizujące, że treść jest ucięta */
.dew-table-scrollarea::before,
.dew-table-scrollarea::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
    border-radius: 8px;
}
.dew-table-scrollarea::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.13), rgba(0,0,0,0));
}
.dew-table-scrollarea::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.13), rgba(0,0,0,0));
}
.dew-table-scrollarea.dew-more-left::before,
.dew-table-scrollarea.dew-more-right::after {
    opacity: 1;
}
/* Gradienty nie zasłaniają paska przewijania na dole */
.dew-table-scrollarea::before,
.dew-table-scrollarea::after {
    bottom: 12px;
}

/* Podpowiedź „Przesuń w bok…" — widoczna tylko gdy jest co przewijać
   i tylko do pierwszego przewinięcia przez użytkownika. */
.dew-scroll-hint {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
    user-select: none;
}
.dew-table-scrollarea.dew-scrollable .dew-scroll-hint {
    display: block;
    animation: dew-hint-nudge 2.2s ease-in-out 3;
}
.dew-table-scrollarea.dew-scrolled .dew-scroll-hint {
    display: none;
}
@keyframes dew-hint-nudge {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .dew-table-scrollarea.dew-scrollable .dew-scroll-hint { animation: none; }
}

.dew-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Zaokrąglenie i przycięcie przeniesione z <table> na wrapper —
       dzięki temu przyciski w ostatniej kolumnie nie wychodzą poza ramkę. */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    background: #fff;

    /* Pasek przewijania (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--dew-accent, #2c3e50) #eceff2;
    padding-bottom: 2px;
}

/* Gdy jest co przewijać — wymuś STAŁY pasek (overflow:scroll rezerwuje miejsce).
   Bez tego macOS i Windows 11 pokazują pasek „nakładkowy", który znika
   po chwili — użytkownik nie wie, że tabela ma ciąg dalszy. */
.dew-table-scrollarea.dew-scrollable .dew-table-responsive {
    overflow-x: scroll;
}

/* Pasek przewijania (WebKit / Chrome / Safari / Edge).
   Zdefiniowanie własnego paska wyłącza tryb „nakładkowy" — pasek jest
   widoczny cały czas, także na macOS z gładzikiem. */
.dew-table-responsive::-webkit-scrollbar {
    height: 10px;
    -webkit-appearance: none;
}
.dew-table-responsive::-webkit-scrollbar-track {
    background: #eceff2;
    border-radius: 100px;
    margin: 0 8px;
}
.dew-table-responsive::-webkit-scrollbar-thumb {
    background: var(--dew-accent, #2c3e50);
    border-radius: 100px;
    border: 2px solid #eceff2;
    transition: background 0.2s;
}
.dew-table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--dew-accent, #1a242f);
    filter: brightness(0.9);
}

.dew-inwestycja-table {
    border-collapse: collapse;
    background: #fff;
    font-family: var(--dew-table-font);
    color: var(--dew-table-color, #333);
    font-weight: var(--dew-table-weight, 400);
}

/* Tabela musi rozciągać się do treści, nie ściskać kolumn — inaczej treść
   ostatniej komórki (przyciski) wychodzi poza jej obrys.
   !important + wysoka specyficzność, bo motywy WordPress niemal zawsze
   wymuszają `table { width:100% }` / `table-layout: fixed`. */
.dew-inwestycja-wrap .dew-table-responsive > table.dew-inwestycja-table {
    width: auto !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: auto !important;
    box-sizing: border-box;
}
.dew-inwestycja-table thead th {
    background: var(--dew-accent, #2c3e50);
    color: var(--dew-accent-contrast, #fff);
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.dew-inwestycja-table tbody td {
    padding: 10px 14px;
    border-bottom: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #eee);
}
.dew-inwestycja-table tbody tr:hover {
    background: #f8f9fa;
}
.dew-inwestycja-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Zawijanie tekstu (przełącznik w ustawieniach inwestycji) ── */
.dew-nowrap .dew-inwestycja-table tbody td,
.dew-nowrap .dew-inwestycja-table tbody td .dew-addons-summary {
    white-space: nowrap;
}
/* Bez nowrap: komórki mogą się łamać, ale kolumny nie mogą być za wąskie */
.dew-inwestycja-wrap:not(.dew-nowrap) .dew-inwestycja-table tbody td {
    white-space: normal;
    min-width: 90px;
}
/* Przyciski akcji nigdy się nie łamią — niezależnie od trybu zawijania */
.dew-inwestycja-table .dew-btn {
    white-space: nowrap;
}
.dew-td-price {
    font-weight: 600;
    color: #1a7a1a;
}

/* Kolorowe wiersze na podstawie statusu */
.dew-status-row-zarezerwowany {
    background: #fffce8;
}
.dew-status-row-sprzedany {
    background: #fff5f5;
}
.dew-status-row-sprzedany td {
    color: #999;
}

/* ============ Przyciski ============ */
.dew-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}
.dew-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}
.dew-btn-history {
    background: #0d9488;
    color: #fff;
}
.dew-btn-history:hover {
    background: #0f766e;
    color: #fff;
}

/* ============ Modal – popup historii cen ============ */
.dew-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dew-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: dewModalIn 0.25s ease;
}

@keyframes dewModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dew-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
}
.dew-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.dew-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
}
.dew-modal-close:hover {
    color: #333;
}

.dew-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.dew-modal-loading {
    text-align: center;
    color: #888;
    padding: 20px 0;
    font-style: italic;
}

/* Tabela historii w modalu */
/* ============ Historia cen – lista chronologiczna ============ */
.dew-history-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dew-history-entry {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.dew-history-entry:last-child {
    border-bottom: none;
}

.dew-history-entry.dew-history-current {
    background: #f0fdf4;
    border-bottom: 2px solid #86efac;
    border-radius: 8px 8px 0 0;
}

.dew-history-entry.dew-history-current .dew-history-date {
    color: #166534;
    font-weight: 700;
}

.dew-history-entry.dew-history-current .dew-history-price-main {
    color: #166534;
}

.dew-history-date {
    flex: 0 0 auto;
    min-width: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.dew-history-prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.dew-history-price-main {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.dew-history-price-detail {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.dew-no-history {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

.dew-lowest-price {
    margin-top: 14px;
    padding: 10px 14px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    font-size: 14px;
}

@media (max-width: 640px) {
    .dew-history-entry {
        flex-direction: column;
        gap: 4px;
        padding: 10px 12px;
    }
    .dew-history-date {
        min-width: auto;
    }
}

/* Komunikaty błędów */
.dew-error {
    color: #721c24;
    background: #f8d7da;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* ============ v2.0: Elementy dodatkowe ============ */

/* Badge statusu elementu dodatkowego */
.dew-addon-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
}
.dew-addon-obowiazkowy {
    background: #fff3cd;
    color: #856404;
}
.dew-addon-opcjonalny {
    background: #d1ecf1;
    color: #0c5460;
}
.dew-addon-wliczony {
    background: #d4edda;
    color: #155724;
}

/* Cena elementu dodatkowego */
.dew-addon-price {
    font-weight: 600;
    color: #555;
}

/* Wiersz elementu dodatkowego */
.dew-addon-row td {
    background: #f9fafb;
}

/* Wiersz ceny łącznej */
.dew-total-row td {
    background: #edf5e1;
    border-top: 2px solid #c3dea0;
}
.dew-total-price {
    font-size: 1.2em;
    color: #1a7a1a;
}
.dew-total-note {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* Kolumna dodatków w tabeli inwestycji */
.dew-td-addons {
    font-size: 12px;
    color: #666;
}
.dew-addons-summary {
    word-break: break-word;
}
/* W trybie „nie zawijaj" dodatki też zostają w jednej linii */
.dew-nowrap .dew-addons-summary {
    white-space: nowrap;
    word-break: normal;
}

/* ============ Karta lokalu (v2.1) ============ */
.dew-btn-karta {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    text-decoration: none;
    display: inline-block;
}
.dew-btn-karta:hover {
    background: #c8e6c9;
    color: #1b5e20;
    text-decoration: none;
}

/* ============ Przycisk "Zobacz więcej" (v2.1.1) ============ */
.dew-btn-more {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
    text-decoration: none;
    display: inline-block;
}
.dew-btn-more:hover {
    background: #e1bee7;
    color: #4a148c;
    text-decoration: none;
}

/* ============ Informacja VAT (v2.1) ============ */
.dew-vat-info {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin: 12px 0 4px 0;
    padding: 0 20px;
}
.dew-inwestycja-wrap .dew-vat-info {
    padding: 0;
    margin-top: 8px;
}

/* ============ Mapa budynku – podświetlenie (v2.1) ============ */
tr.dew-unit-highlighted {
    background-color: #fff3cd !important;
    outline: 2px solid #ffc107;
    outline-offset: -2px;
    animation: dew-highlight-pulse 0.6s ease-in-out;
}
@keyframes dew-highlight-pulse {
    0%   { background-color: #ffc107; }
    50%  { background-color: #fff3cd; }
    100% { background-color: #fff3cd; }
}
[data-dew-unit] {
    cursor: pointer;
}

/* ── Kolumna akcji w tabeli ──
 *
 * UWAGA — nie zmniejszaj tu paddingu bez pomiaru!
 * Chrome zaniża intrinsic width komórki zawierającej kilka elementów
 * inline-block (przycisków) o kilka pikseli względem tego, co faktycznie
 * renderuje — przez co ostatni przycisk wystawał poza obrys tabeli.
 * Zmierzone na produkcji: scrollWidth komórki 294px przy clientWidth 290px.
 * Ani width:1%/auto/max-content, ani min-width:max-content, ani zmiana
 * display przycisków tego nie naprawiają — natomiast padding komórki JEST
 * liczony poprawnie i działa jako bufor. Stąd zwiększony padding poziomy
 * (symetryczny, żeby nie psuć wyśrodkowania w wariancie minimalistycznym).
 */
.dew-inwestycja-table th.dew-th-actions,
.dew-inwestycja-table td.dew-td-actions {
    width: 1%;
    white-space: nowrap;
    padding-left: 22px;
    padding-right: 22px;
}
.dew-td-actions {
    text-align: right;
}
.dew-td-actions .dew-btn {
    margin-right: 6px;
    margin-bottom: 0;
}
.dew-td-actions .dew-btn:last-child {
    margin-right: 0;
}

/* ── Przyciski w tabeli: równa wysokość niezależnie od emoji i długości ── */
.dew-inwestycja-table .dew-btn,
.dew-cards-list .dew-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--dew-btn-height, 34px);
    line-height: 1.2;
    vertical-align: middle;
    box-sizing: border-box;
    white-space: nowrap;
}

/* ── Własne kolory przycisków (opcja w ustawieniach tabeli) ──
   Wysoka specyficzność (.dew-inwestycja-wrap.dew-btn-custom = 0-4-0),
   bo musi wygrać z regułami przycisków wariantu minimalistycznego. */
.dew-inwestycja-wrap.dew-btn-custom .dew-inwestycja-table .dew-btn,
.dew-inwestycja-wrap.dew-btn-custom .dew-cards-list .dew-btn,
.dew-inwestycja-wrap.dew-btn-custom .dew-lokal-actions .dew-btn {
    background: var(--dew-btn-bg, #f1f3f5);
    color: var(--dew-btn-color, #1f2937);
    border: 1px solid var(--dew-btn-border, transparent);
}
.dew-inwestycja-wrap.dew-btn-custom .dew-inwestycja-table .dew-btn:hover,
.dew-inwestycja-wrap.dew-btn-custom .dew-cards-list .dew-btn:hover,
.dew-inwestycja-wrap.dew-btn-custom .dew-lokal-actions .dew-btn:hover {
    background: var(--dew-btn-bg, #f1f3f5);
    color: var(--dew-btn-color, #1f2937);
    border-color: var(--dew-btn-border, transparent);
    filter: brightness(0.92);
}

/* ═══════════════════════════════════════════════════════
   WARIANT MINIMALISTYCZNY (v2.9) — dla stron premium
   Stonowana siatka, bez kolorowego nagłówka i cieni.
   ═══════════════════════════════════════════════════════ */

.dew-variant-minimal .dew-table-responsive {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.dew-variant-minimal .dew-inwestycja-table {
    border: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
    background: transparent;
}

/* Nagłówek: bez tła przewodniego, ciemny tekst, bez wersalików */
.dew-variant-minimal .dew-inwestycja-table thead th {
    background: transparent;
    color: var(--dew-table-color, #1f2937);
    font-size: 15px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    text-align: center;
    padding: 18px 22px;
    border: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
}

.dew-variant-minimal .dew-inwestycja-table tbody td {
    padding: 16px 22px;
    text-align: center;
    border: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
    font-size: 15px;
    color: var(--dew-table-color, #374151);
}
.dew-variant-minimal .dew-inwestycja-table tbody tr:last-child td {
    border-bottom: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
}

/* Kolumna akcji w wariancie minimalistycznym — większy bufor (patrz komentarz
   przy .dew-td-actions). Zmierzone: przy 32px overflow = 0, zapas 7px od ramki. */
.dew-variant-minimal .dew-inwestycja-table th.dew-th-actions,
.dew-variant-minimal .dew-inwestycja-table td.dew-td-actions {
    padding-left: 32px;
    padding-right: 32px;
}

/* Delikatne podświetlenie wiersza zamiast szarego bloku */
.dew-variant-minimal .dew-inwestycja-table tbody tr:hover {
    background: #fafbfc;
}

/* Ceny: bez zieleni — spójna, stonowana typografia */
.dew-variant-minimal .dew-td-price {
    color: var(--dew-table-color, #1f2937);
    font-weight: 600;
}

/* Statusy: płaskie etykiety zamiast kolorowych pigułek */
.dew-variant-minimal .dew-lokal-status {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
}
.dew-variant-minimal .dew-status-wolny        { color: #15803d; }
.dew-variant-minimal .dew-status-zarezerwowany { color: #b45309; }
.dew-variant-minimal .dew-status-sprzedany     { color: #9ca3af; }

/* Bez kolorowego tła wierszy wg statusu */
.dew-variant-minimal .dew-status-row-zarezerwowany,
.dew-variant-minimal .dew-status-row-sprzedany {
    background: transparent;
}

/* Przyciski: obrysowe, bez wypełnienia */
.dew-variant-minimal .dew-inwestycja-table .dew-btn {
    background: transparent;
    border: 1px solid #d5d9de;
    color: var(--dew-table-color, #374151);
    font-weight: 500;
    box-shadow: none;
}
.dew-variant-minimal .dew-inwestycja-table .dew-btn:hover {
    background: #f6f7f8;
    border-color: var(--dew-accent, #2c3e50);
    color: var(--dew-accent, #2c3e50);
}

/* Nagłówek inwestycji — bardziej stonowany */
.dew-variant-minimal .dew-inwestycja-header h3 {
    font-family: var(--dew-table-font);
    font-weight: 600;
}
.dew-variant-minimal .dew-inwestycja-wrap,
.dew-variant-minimal .dew-cards-list {
    font-family: var(--dew-table-font);
}

/* Kafelki w wariancie minimalistycznym */
.dew-variant-minimal .dew-unit-card {
    box-shadow: none;
    border: 1px solid #e2e5e9;
}

/* Pasek przewijania w wariancie minimalistycznym — dyskretny, szary */
.dew-variant-minimal .dew-table-responsive {
    scrollbar-color: #c9ced4 transparent;
}
.dew-variant-minimal .dew-table-responsive::-webkit-scrollbar-track {
    background: transparent;
}
.dew-variant-minimal .dew-table-responsive::-webkit-scrollbar-thumb {
    background: #c9ced4;
}
.dew-variant-minimal .dew-table-responsive::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ═══════════════════════════════════════════════════════
   STYL SIATKI (v2.10) — nadpisuje ustawienia wariantu.
   Reguły muszą być PO blokach wariantów (równa specyficzność).
   ═══════════════════════════════════════════════════════ */

/* Pełna siatka — linie poziome i pionowe */
.dew-inwestycja-wrap.dew-grid-full .dew-inwestycja-table thead th,
.dew-inwestycja-wrap.dew-grid-full .dew-inwestycja-table tbody td,
.dew-inwestycja-wrap.dew-grid-full .dew-inwestycja-table tbody tr:last-child td {
    border: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
}
.dew-inwestycja-wrap.dew-grid-full .dew-inwestycja-table {
    border: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #e2e5e9);
}

/* Tylko linie poziome */
.dew-inwestycja-wrap.dew-grid-horizontal .dew-inwestycja-table thead th,
.dew-inwestycja-wrap.dew-grid-horizontal .dew-inwestycja-table tbody td {
    border: none;
    border-bottom: var(--dew-grid-width, 1px) solid var(--dew-grid-color, #eee);
}
.dew-inwestycja-wrap.dew-grid-horizontal .dew-inwestycja-table tbody tr:last-child td {
    border-bottom: none;
}
.dew-inwestycja-wrap.dew-grid-horizontal .dew-inwestycja-table {
    border: none;
}

/* Bez siatki */
.dew-inwestycja-wrap.dew-grid-none .dew-inwestycja-table,
.dew-inwestycja-wrap.dew-grid-none .dew-inwestycja-table thead th,
.dew-inwestycja-wrap.dew-grid-none .dew-inwestycja-table tbody td,
.dew-inwestycja-wrap.dew-grid-none .dew-inwestycja-table tbody tr:last-child td {
    border: none;
}

/* ═══════════════════════════════════════════════════════
   PRZEWIJANIE „ŁAPKĄ" (v2.10) — chwyć i przeciągnij tabelę
   ═══════════════════════════════════════════════════════ */
.dew-drag-scroll .dew-table-responsive {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.dew-drag-scroll .dew-table-responsive.dew-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
/* Podczas przeciągania nie zaznaczamy tekstu ani nie łapiemy linków */
.dew-drag-scroll .dew-table-responsive.dew-dragging a,
.dew-drag-scroll .dew-table-responsive.dew-dragging button {
    pointer-events: none;
}
/* Przyciski i linki zachowują normalny kursor */
.dew-drag-scroll .dew-table-responsive .dew-btn {
    cursor: pointer;
}

/* ============ Panel filtrów (v2.1.1) ============ */
.dew-filtry-wrap {
    margin: 0 0 28px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #333;
    box-sizing: border-box;
}
.dew-filtry-wrap *,
.dew-filtry-wrap *::before,
.dew-filtry-wrap *::after {
    box-sizing: border-box;
}

/* Główny pasek – horyzontalny na desktopie */
.dew-filtry-wrap .dew-filtry-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    width: 100%;
}

/* Każda grupa filtrów – sekcja w pasku */
.dew-filtry-wrap .dew-filtr-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    min-width: 0;
    flex-shrink: 1;
    border-right: 1px solid #eef0f2;
    white-space: nowrap;
}
.dew-filtry-wrap .dew-filtr-group:last-child {
    border-right: none;
}
.dew-filtry-wrap .dew-filtr-group-price {
    flex: 1 1 auto;
}

.dew-filtry-wrap .dew-filtr-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dew-filtry-wrap .dew-filtr-options {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

/* Przyciski pięter */
.dew-filtry-wrap .dew-filtr-btn {
    padding: 5px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
    font-weight: 500;
}
.dew-filtry-wrap .dew-filtr-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}
.dew-filtry-wrap .dew-filtr-btn.active {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

/* Counter pokoi +/- */
.dew-filtry-wrap .dew-filtr-rooms-options {
    gap: 0;
}
.dew-filtry-wrap .dew-filtr-counter-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
    padding: 0;
}
.dew-filtry-wrap .dew-filtr-counter-btn:first-child {
    border-radius: 8px 0 0 8px;
}
.dew-filtry-wrap .dew-filtr-counter-btn:last-child {
    border-radius: 0 8px 8px 0;
}
.dew-filtry-wrap .dew-filtr-counter-btn:hover {
    background: #e5e7eb;
}

.dew-filtry-wrap .dew-filtr-rooms-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 32px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    padding: 0 6px;
}

/* Status select */
.dew-filtry-wrap .dew-filtr-select {
    padding: 6px 28px 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b7280' d='M2 3.5l3 3.5 3-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s ease;
    height: 32px;
}
.dew-filtry-wrap .dew-filtr-select:hover {
    border-color: #9ca3af;
}
.dew-filtry-wrap .dew-filtr-select:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
}

/* Przedział cenowy – inline */
.dew-filtry-wrap .dew-filtr-price-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.dew-filtry-wrap .dew-filtr-price-field {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dew-filtry-wrap .dew-filtr-price-prefix,
.dew-filtry-wrap .dew-filtr-price-suffix {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}
.dew-filtry-wrap .dew-filtr-price-sep {
    color: #d1d5db;
    font-size: 13px;
    padding: 0 2px;
}
.dew-filtry-wrap .dew-filtr-price-field input[type="number"] {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-align: right;
    background: #f9fafb;
    transition: border-color 0.15s ease;
    height: 32px;
    -moz-appearance: textfield;
}
.dew-filtry-wrap .dew-filtr-price-field input[type="number"]::-webkit-inner-spin-button,
.dew-filtry-wrap .dew-filtr-price-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.dew-filtry-wrap .dew-filtr-price-field input:hover {
    border-color: #9ca3af;
}
.dew-filtry-wrap .dew-filtr-price-field input:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    background: #fff;
}

/* Szukaj / Wyczyść – wbudowane w pasek */
.dew-filtry-wrap .dew-filtry-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}
.dew-filtry-wrap .dew-filtr-btn-search {
    padding: 7px 22px;
    border: none;
    border-radius: 10px;
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dew-filtry-wrap .dew-filtr-btn-search:hover {
    background: #111827;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.dew-filtry-wrap .dew-filtr-btn-clear {
    padding: 7px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    height: 32px;
    display: inline-flex;
    align-items: center;
}
.dew-filtry-wrap .dew-filtr-btn-clear:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Info o wynikach */
.dew-filtr-results-info {
    margin-top: 10px;
    padding: 10px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
}

/* ============ Responsywność filtrów ============ */

/* Laptop / mniejszy desktop – grid 2×2 + cena na dole */
@media (max-width: 1200px) {
    .dew-filtry-wrap .dew-filtry-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        border-radius: 14px;
    }
    .dew-filtry-wrap .dew-filtr-group {
        border-right: none;
        border-bottom: 1px solid #eef0f2;
        padding: 12px 16px;
    }
    .dew-filtry-wrap .dew-filtr-group:nth-child(odd) {
        border-right: 1px solid #eef0f2;
    }
    .dew-filtry-wrap .dew-filtr-group-price {
        grid-column: 1 / -1;
    }
    .dew-filtry-wrap .dew-filtry-actions {
        grid-column: 1 / -1;
        border-top: none;
        justify-content: center;
    }
}

/* Tablet – stos, 2 kolumny piętro/pokoje */
@media (max-width: 768px) {
    .dew-lokal-card {
        max-width: 100%;
    }
    .dew-inwestycja-table thead th,
    .dew-inwestycja-table tbody td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .dew-modal {
        max-width: 95vw;
    }
    /* Na mobile przyciski akcji mogą się układać w kilka rzędów,
       nawet gdy reszta tabeli działa w trybie „nie zawijaj". */
    .dew-inwestycja-wrap .dew-inwestycja-table tbody td.dew-td-actions,
    .dew-nowrap .dew-inwestycja-table tbody td.dew-td-actions {
        white-space: normal;
    }
    .dew-variant-minimal .dew-inwestycja-table thead th,
    .dew-variant-minimal .dew-inwestycja-table tbody td {
        padding: 12px 14px;
        font-size: 14px;
    }
    .dew-filtry-wrap .dew-filtry-row {
        display: flex !important;
        flex-direction: column !important;
        border-radius: 14px;
    }
    .dew-filtry-wrap .dew-filtr-group {
        border-right: none;
        border-bottom: 1px solid #eef0f2;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .dew-filtry-wrap .dew-filtr-group:nth-child(odd) {
        border-right: none;
    }
    .dew-filtry-wrap .dew-filtr-group:last-child {
        border-bottom: none;
    }
    .dew-filtry-wrap .dew-filtr-options {
        flex-wrap: wrap;
    }
    .dew-filtry-wrap .dew-filtr-price-inputs {
        flex-wrap: wrap;
    }
    .dew-filtry-wrap .dew-filtr-price-field {
        flex: 1 1 auto;
    }
    .dew-filtry-wrap .dew-filtr-price-field input[type="number"] {
        width: 100%;
        flex: 1;
    }
    .dew-filtry-wrap .dew-filtr-price-sep {
        display: none;
    }
    .dew-filtry-wrap .dew-filtry-actions {
        padding: 12px 16px;
        border-top: 1px solid #eef0f2;
        justify-content: center;
    }
    .dew-filtry-wrap .dew-filtr-btn-search {
        flex: 1;
        justify-content: center;
    }
}

/* ============ Badges typów pomieszczeń ============ */
.dew-premise-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.dew-premise-type-miejsce_parkingowe {
    background: #dbeafe;
    color: #1d4ed8;
}

.dew-premise-type-garaz {
    background: #e0e7ff;
    color: #4338ca;
}

.dew-premise-type-komorka_lokatorska {
    background: #fef3c7;
    color: #92400e;
}

.dew-premise-type-pomieszczenie_przynalezne {
    background: #f3e8ff;
    color: #7c3aed;
}

/* ============ Widok kafelkowy (cards) ============ */

/* --- Legenda / nagłówek --- */
.dew-cards-legend {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 24px;
    padding: 10px 24px;
    background: var(--dew-accent, #2c3e50);
    border: 1px solid var(--dew-accent, #2c3e50);
    border-bottom: 2px solid rgba(0,0,0,0.12);
    border-radius: 8px 8px 0 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dew-accent-contrast, #fff);
}

@media (max-width: 768px) {
    .dew-cards-legend {
        display: none;
    }
}

.dew-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* === Karta lokalu / pomieszczenia === */
.dew-unit-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px 24px;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    transition: background 0.3s;
}

.dew-unit-card:first-child {
    border-top: 1px solid #e5e7eb;
}

/* Gdy jest legenda powyżej — nie podwajaj górnej krawędzi */
.dew-cards-legend + .dew-cards-list .dew-unit-card:first-child {
    border-top: none;
}

.dew-unit-card:hover {
    background: #f9fafb;
}

/* Highlight dla map */
.dew-unit-card.dew-unit-highlighted {
    background: #fef9c3;
    box-shadow: inset 4px 0 0 #eab308;
}

/* Status tło karty */
.dew-unit-card.dew-status-row-sprzedany {
    background: #fef2f2;
}
.dew-unit-card.dew-status-row-zarezerwowany {
    background: #fffbeb;
}

/* -- Top: numer + status + meta -- */
.dew-card-top {
    min-width: 0;
}

.dew-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.dew-card-number {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}

.dew-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.dew-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* -- Info: cena, metraż, m2 -- */
.dew-card-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dew-card-area {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.dew-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.dew-card-ppm {
    font-size: 13px;
    color: #6b7280;
}

.dew-card-addons {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

/* -- Przyciski -- */
.dew-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* === RESPONSIVE: Mobile cards === */
@media (max-width: 768px) {
    .dew-cards-list {
        gap: 12px;
        padding: 0 4px;
    }

    .dew-unit-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px 18px;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }

    .dew-unit-card:first-child {
        border-top: 1px solid #e5e7eb;
    }

    .dew-card-title {
        margin-bottom: 2px;
    }

    .dew-card-number {
        font-size: 22px;
    }

    .dew-card-info {
        gap: 10px;
    }

    .dew-card-price {
        font-size: 15px;
    }

    .dew-card-actions {
        justify-content: center;
        flex-wrap: wrap;
        padding-top: 6px;
        border-top: 1px solid #f3f4f6;
    }

    .dew-card-actions .dew-btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ============ Lightbox – karta lokalu ============ */
.dew-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.dew-lightbox-overlay.dew-lightbox-visible {
    opacity: 1;
}

.dew-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dew-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.dew-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
    color: #374151;
    transition: background 0.2s;
}

.dew-lightbox-close:hover {
    background: #f3f4f6;
}

.dew-lightbox-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.dew-lightbox-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dew-lightbox-download {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: #2563eb;
    padding: 6px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.dew-lightbox-download:hover {
    background: #1d4ed8;
    color: #fff;
}

.dew-lightbox-newtab {
    color: #d1d5db;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.dew-lightbox-newtab:hover {
    color: #fff;
}

/* ── Galeria kart lokalu (v2.8): strzałki + licznik ── */
.dew-lightbox-prev,
.dew-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    color: #111827;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    transition: background 0.2s;
}

.dew-lightbox-prev { left: -18px; }
.dew-lightbox-next { right: -18px; }

.dew-lightbox-prev:hover,
.dew-lightbox-next:hover {
    background: #fff;
}

.dew-lightbox-counter {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX — WERSJA MOBILNA (v2.11)
   Pełny ekran, „X" przypięty do rogu ekranu (nie do obrazu),
   stopka w jednej kolumnie z przyciskami na pełną szerokość.
   ═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .dew-lightbox-overlay {
        padding: 0;
    }

    .dew-lightbox-content {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        box-sizing: border-box;
        /* górny odstęp robi miejsce na przycisk zamykania */
        padding: 60px 12px 18px;
        justify-content: center;
        overflow-y: auto;
    }

    /* „X" w rogu EKRANU — nie nachodzi już na tytuł */
    .dew-lightbox-close {
        position: fixed;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 22px;
        line-height: 40px;
    }

    .dew-lightbox-title {
        font-size: 14px;
        line-height: 1.35;
        margin-bottom: 12px;
        padding: 0 4px;
    }

    .dew-lightbox-content img {
        max-height: 56vh;
    }

    /* Strzałki mniejsze i półprzezroczyste, na obrazie */
    .dew-lightbox-prev,
    .dew-lightbox-next {
        width: 38px;
        height: 38px;
        font-size: 17px;
        background: rgba(255,255,255,0.85);
    }
    .dew-lightbox-prev { left: 6px; }
    .dew-lightbox-next { right: 6px; }

    /* Stopka: licznik na górze, potem przyciski na pełną szerokość.
       Bez zawijania tekstu w przyciskach. */
    .dew-lightbox-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        margin-top: 16px;
    }
    .dew-lightbox-counter {
        order: -1;
        text-align: center;
    }
    .dew-lightbox-download,
    .dew-lightbox-newtab {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        white-space: nowrap;
    }
    .dew-lightbox-download {
        padding: 11px 16px;
        font-size: 15px;
    }
    .dew-lightbox-newtab {
        padding: 9px 16px;
        font-size: 14px;
    }
}

/* Telefon w poziomie / bardzo niski ekran — obraz nie może zjeść stopki */
@media (max-width: 900px) and (max-height: 520px) {
    .dew-lightbox-content {
        padding-top: 52px;
    }
    .dew-lightbox-content img {
        max-height: 45vh;
    }
    .dew-lightbox-title {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════
 *  WARIANT „NOWOCZESNY" — ciemny nagłówek, naprzemienne wiersze
 *
 *  Odwzorowanie wyglądu wdrożonego ręcznie w motywie jednego klienta
 *  (dobrenowiny.com). Wartości nie są dobrane „na oko" — zmierzone
 *  na działającej stronie: nagłówek #0d354e, wiersz nieparzysty #f7ede1,
 *  parzysty #f5f4f0, pionowe linie #acb1c6, podświetlenie #e9e9e9,
 *  komórki 15px/20px, przyciski-pastylki o promieniu 50px.
 *
 *  Kolory da się nadpisać zmiennymi, bo kremowy odcień pasuje do
 *  jednej palety, nie do każdej:
 *    --dew-nw-naglowek, --dew-nw-wiersz-1, --dew-nw-wiersz-2,
 *    --dew-nw-linia, --dew-nw-hover, --dew-nw-tekst, --dew-nw-wolne
 * ═══════════════════════════════════════════════════════════════════ */

.dew-variant-nowoczesny {
    --dew-nw-naglowek: #0d354e;
    --dew-nw-wiersz-1: #f7ede1;
    --dew-nw-wiersz-2: #f5f4f0;
    --dew-nw-linia:    #acb1c6;
    --dew-nw-hover:    #e9e9e9;
    --dew-nw-tekst:    #232323;
    --dew-nw-wolne:    #063b27;
}

/* Kontener bez własnej ramki i cieni — tabela ma nieść cały wygląd */
.dew-variant-nowoczesny .dew-table-responsive {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.dew-variant-nowoczesny .dew-inwestycja-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-family: var(--dew-table-font, inherit);
    font-size: 16px;
    color: var(--dew-nw-tekst);
}

/* ── Nagłówek: jednolity ciemny pasek, bez separatorów ── */
.dew-variant-nowoczesny .dew-inwestycja-table thead th {
    background: var(--dew-nw-naglowek);
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    padding: 15px 20px;
    text-align: left;
    border: 0;
    white-space: nowrap;
}

/* ── Wiersze: naprzemienne tła, pionowe linie między kolumnami ── */
.dew-variant-nowoczesny .dew-inwestycja-table tbody tr:nth-child(odd)  { background: var(--dew-nw-wiersz-1); }
.dew-variant-nowoczesny .dew-inwestycja-table tbody tr:nth-child(even) { background: var(--dew-nw-wiersz-2); }

.dew-variant-nowoczesny .dew-inwestycja-table tbody td {
    padding: 15px 20px;
    border: 0;
    border-left: 1px solid var(--dew-nw-linia);
    font-weight: 400;
    color: var(--dew-nw-tekst);
    vertical-align: middle;
}
.dew-variant-nowoczesny .dew-inwestycja-table tbody td:last-child {
    border-right: 1px solid var(--dew-nw-linia);
}

.dew-variant-nowoczesny .dew-inwestycja-table tbody tr:hover {
    background: var(--dew-nw-hover);
}

/* Numer lokalu bez pogrubienia — w oryginale cała tabela ma jedną wagę */
.dew-variant-nowoczesny .dew-inwestycja-table tbody td strong {
    font-weight: 400;
}

/* ── Status: sam tekst, bez plakietki ── */
.dew-variant-nowoczesny .dew-lokal-status {
    background: none;
    border: 0;
    padding: 0;
    border-radius: 0;
    font-size: 16px;
    font-weight: 400;
    text-transform: lowercase;
}
.dew-variant-nowoczesny .dew-status-wolny         { color: var(--dew-nw-wolne); }
.dew-variant-nowoczesny .dew-status-zarezerwowany { color: #8a5a00; }
.dew-variant-nowoczesny .dew-status-sprzedany     { color: #8b8b8b; }

/* Sprzedane i zarezerwowane nie są przygaszane — czytelność cennika
   jest tu ważniejsza niż efekt wizualny */
.dew-variant-nowoczesny .dew-status-row-zarezerwowany,
.dew-variant-nowoczesny .dew-status-row-sprzedany {
    opacity: 1;
}

/* ── Przyciski: pastylki ── */
.dew-variant-nowoczesny .dew-inwestycja-table .dew-btn {
    /* Kolumna zamiast rzędu: przyciski mają rożną długość tekstu
       („Historia cen" vs „Zobacz więcej"), więc obok siebie tworzyły
       poszarpaną krawędź. Pełna szerokość komórki wyrównuje je do
       najszerszego, a komórka i tak kurczy się do zawartości (width:1%). */
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--dew-nw-naglowek);
    color: #fff;
    border: 1px solid var(--dew-nw-naglowek);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.35;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
}
.dew-variant-nowoczesny .dew-inwestycja-table .dew-btn:hover {
    background: #fff;
    color: var(--dew-nw-naglowek);
}

/* Strzałka dziedziczy kolor tekstu, więc odwraca się razem z przyciskiem */
.dew-variant-nowoczesny .dew-inwestycja-table .dew-btn svg {
    stroke: currentColor;
    flex: 0 0 auto;
}

/* Odstęp pionowy zamiast poziomego — reguła ogólna daje przyciskom
   margin-right, co przy układzie kolumnowym byłoby bez sensu. */
.dew-variant-nowoczesny .dew-inwestycja-table .dew-td-actions .dew-btn {
    margin: 0 0 8px 0;
}
.dew-variant-nowoczesny .dew-inwestycja-table .dew-td-actions .dew-btn:last-child {
    margin-bottom: 0;
}

.dew-variant-nowoczesny .dew-inwestycja-table td.dew-td-actions {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

/* ── Telefony ── */
@media (max-width: 768px) {
    /* Celujemy wprost w th i td — reguła ogólna wyżej ustawia im 13px
       bezpośrednio, więc rozmiar podany na samej tabeli by nie zadziałał. */
    .dew-variant-nowoczesny .dew-inwestycja-table thead th,
    .dew-variant-nowoczesny .dew-inwestycja-table tbody td {
        font-size: 14px;
        padding: 12px 14px;
    }
    .dew-variant-nowoczesny .dew-lokal-status { font-size: 14px; }
    .dew-variant-nowoczesny .dew-inwestycja-table .dew-btn {
        font-size: 11px;
        padding: 7px 14px;
    }
    .dew-variant-nowoczesny .dew-inwestycja-table .dew-td-actions .dew-btn {
        margin-bottom: 6px;
    }
}

/* ── Cena ukryta (lokal sprzedany) ──
   Myślnik ma czytać się jako świadomy brak wartości, a nie pusta komórka
   czy błąd danych — stąd wyszarzenie i pomoc kontekstowa pod kursorem. */
.dew-cena-ukryta {
    color: #9ca3af;
    font-weight: 400;
    cursor: help;
    user-select: none;
}

/* ── Kolumny tekstowe (Opis, Inne powierzchnie) ──
   Opis bywa zdaniem, nie liczbą — bez ograniczenia rozpycha tabelę
   na całą szerokość ekranu i chowa ceny poza krawędź. */
.dew-inwestycja-table td.dew-td-opis {
    max-width: 260px;
    white-space: normal;
    line-height: 1.45;
}
.dew-nowrap .dew-inwestycja-table td.dew-td-opis {
    white-space: normal;   /* tryb „nie zawijaj" tej kolumny nie dotyczy */
}
@media (max-width: 768px) {
    .dew-inwestycja-table td.dew-td-opis { max-width: 180px; }
}

/* ═══════════════════════════════════════════════════════
   v2.20: DODATKI JAKO PLAKIETKI Z CENĄ
   Parking / komórka / pomieszczenia w tabeli (kolumny „Dodatki",
   „Miejsce postojowe", „Komórka lokatorska") i w kafelkach.
   ═══════════════════════════════════════════════════════ */
.dew-addons { display: inline-flex; flex-wrap: wrap; gap: 5px 6px; vertical-align: middle; max-width: 100%; }
.dew-nowrap .dew-addons { flex-wrap: nowrap; }
.dew-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 4px 9px 4px 7px; border-radius: 999px;
    font-size: 12px; line-height: 1.25; font-weight: 500; white-space: nowrap;
    background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.dew-chip i, .dew-chip__kwota { flex: 0 0 auto; }
.dew-chip__nazwa { min-width: 0; }
.dew-chip__kwota { white-space: nowrap; }
.dew-chip__detal { min-width: 0; font-size: 11px; color: #6b7280; }
.dew-chip i { font-style: normal; font-size: 13px; line-height: 1; }
.dew-chip__kwota { padding-left: 6px; border-left: 1px solid rgba(0, 0, 0, .12); }
.dew-chip__kwota b { font-weight: 700; color: #111827; }
.dew-chip__kwota em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.dew-chip-wliczony    { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.dew-chip-wliczony .dew-chip__kwota em { color: #047857; }
.dew-chip-obowiazkowy { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.dew-chip-obowiazkowy .dew-chip__kwota b { color: #92400e; }
.dew-chip-opcjonalny  { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.dew-chip-opcjonalny .dew-chip__kwota b { color: #1e3a8a; }
.dew-td-addons { font-size: 12px; color: #666; }
.dew-card-addons .dew-addons { margin-top: 2px; }

/* minimal: plakietki obrysowane, bez wypełnienia */
.dew-variant-minimal .dew-chip { background: transparent; border-color: #d1d5db; color: #374151; }
.dew-variant-minimal .dew-chip-wliczony { border-color: #6ee7b7; }
.dew-variant-minimal .dew-chip-obowiazkowy { border-color: #fcd34d; }
.dew-variant-minimal .dew-chip-opcjonalny { border-color: #93c5fd; }
/* nowoczesny: plakietki płaskie, prostokątne, w tonacji tabeli */
.dew-variant-nowoczesny .dew-chip { border-radius: 6px; background: rgba(255, 255, 255, .55); border-color: var(--dew-nw-linia); color: var(--dew-nw-tekst); font-size: 13px; }
.dew-variant-nowoczesny .dew-chip-wliczony .dew-chip__kwota em { color: var(--dew-nw-wolne); }

/* ═══════════════════════════════════════════════════════
   v2.20: TABELA NA WĄSKIM EKRANIE (ustawienie inwestycji)
   .dew-mobile-fit   — ściśnij do szerokości ekranu
   .dew-mobile-cards — każdy wiersz jako karta z etykietami kolumn
   Na komputerze oba tryby wyglądają jak zwykła tabela.
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* wspólne: nic się nie przewija w bok, wskaźniki przewijania znikają */
    .dew-mobile-cards .dew-table-responsive { overflow-x: visible !important; }
    .dew-mobile-fit .dew-table-scrollarea::before, .dew-mobile-fit .dew-table-scrollarea::after,
    .dew-mobile-cards .dew-table-scrollarea::before, .dew-mobile-cards .dew-table-scrollarea::after,
    .dew-mobile-fit .dew-scroll-hint, .dew-mobile-cards .dew-scroll-hint { display: none !important; }

    /* ── FIT ── */
    .dew-mobile-fit .dew-table-responsive > table.dew-inwestycja-table {
        width: 100% !important; min-width: 0 !important; table-layout: auto !important;
    }
    .dew-mobile-fit .dew-inwestycja-table thead th,
    .dew-mobile-fit .dew-inwestycja-table tbody td,
    .dew-mobile-fit.dew-nowrap .dew-inwestycja-table tbody td,
    .dew-mobile-fit.dew-nowrap .dew-inwestycja-table tbody td .dew-addons-summary {
        padding: 6px 5px !important; font-size: 11.5px !important; white-space: normal !important;
        word-break: break-word; min-width: 0 !important; line-height: 1.3;
    }
    .dew-mobile-fit .dew-inwestycja-table thead th { font-size: 10px !important; letter-spacing: .2px; }
    .dew-mobile-fit .dew-inwestycja-table .dew-col-opis,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-inne_powierzchnie,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-strona_swiata,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-cena_m2,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-balkon,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-parking,
    .dew-mobile-fit .dew-inwestycja-table .dew-col-komorka { display: none; }
    .dew-mobile-fit .dew-inwestycja-table thead th { word-break: normal; overflow-wrap: normal; hyphens: auto; vertical-align: bottom; }
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-td-price,
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-col-cena,
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-col-powierzchnia,
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-col-nr { white-space: nowrap !important; word-break: normal; }
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-td-actions { width: auto !important; }
    .dew-mobile-fit .dew-inwestycja-table tbody td.dew-td-actions .dew-btn { display: block; width: 100%; box-sizing: border-box; margin: 0 0 4px; }
    .dew-mobile-fit .dew-inwestycja-table .dew-btn { font-size: 10.5px; padding: 4px 6px; margin: 2px 0; }
    .dew-mobile-fit .dew-addons { flex-direction: column; align-items: flex-start; flex-wrap: wrap; gap: 3px; max-width: 100%; }
    /* w trybie fit plakietka to sama ikona i kwota (nazwa w title) — inaczej kolumna dodatków rozpycha tabelę */
    .dew-mobile-fit .dew-chip { font-size: 10.5px; padding: 2px 6px 2px 5px; gap: 4px; white-space: nowrap; max-width: 100%; }
    .dew-mobile-fit .dew-chip__nazwa { display: none; }
    .dew-mobile-fit .dew-chip__kwota { padding-left: 0; border-left: 0; }
    .dew-mobile-fit .dew-addons { gap: 2px; }
    .dew-mobile-fit .dew-lokal-status { font-size: 10px; padding: 2px 6px; }

    /* ── CARDS ── */
    .dew-mobile-cards .dew-table-responsive { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
    .dew-mobile-cards .dew-table-responsive > table.dew-inwestycja-table {
        display: block; width: 100% !important; min-width: 0 !important; border-collapse: separate; border-spacing: 0; background: transparent;
    }
    .dew-mobile-cards .dew-inwestycja-table thead { display: none; }
    .dew-mobile-cards .dew-inwestycja-table tbody { display: grid; gap: 12px; }
    .dew-mobile-cards .dew-inwestycja-table tbody tr {
        display: block; background: #fff; border-radius: 14px; overflow: hidden;
        border: 1px solid var(--dew-grid-color, #e5e7eb); box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    }
    .dew-mobile-cards .dew-inwestycja-table tbody tr:hover { background: #fff; }
    .dew-mobile-cards .dew-inwestycja-table tbody td,
    .dew-mobile-cards.dew-nowrap .dew-inwestycja-table tbody td,
    .dew-mobile-cards.dew-nowrap .dew-inwestycja-table tbody td .dew-addons-summary {
        display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); align-items: start; gap: 4px 10px;
        padding: 10px 14px !important; border: 0 !important; border-bottom: 1px solid var(--dew-grid-color, #f0f2f4) !important;
        font-size: 14px !important; white-space: normal !important; text-align: left;
        /* żadne ograniczenie z widoku tabeli (np. max-width kolumny opisu) nie może uciąć tła i linii karty */
        width: auto !important; max-width: none !important; min-width: 0 !important; box-sizing: border-box;
    }
    .dew-mobile-cards .dew-inwestycja-table tbody td::before {
        content: attr(data-label); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
        color: #6b7280; line-height: 1.35; padding-top: 2px; overflow-wrap: anywhere;
    }
    /* wartość: własna kolumna siatki, wielolinijkowa treść (opis, inne powierzchnie) łamie się w niej normalnie */
    .dew-mobile-cards .dew-inwestycja-table tbody td > * { min-width: 0; max-width: 100%; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-opis { line-height: 1.45; }
    .dew-mobile-cards .dew-inwestycja-table tbody tr td:last-child { border-bottom: 0 !important; }
    /* pierwsza komórka (numer) jako nagłówek karty w kolorze przewodnim */
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr,
    .dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child {
        display: flex; justify-content: space-between; align-items: center;
        background: var(--dew-accent, #2c3e50); color: var(--dew-accent-contrast, #fff); padding: 11px 14px !important; font-size: 16px !important;
    }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr::before,
    .dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child::before { color: inherit; opacity: .75; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr strong,
    .dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child strong { font-size: 17px; }
    /* wiersze zarezerwowane / sprzedane: kolor karty zamiast koloru wiersza */
    .dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-zarezerwowany { background: #fffdf3; }
    .dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-sprzedany { background: #fff7f7; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-price { font-size: 16px !important; }
    .dew-mobile-cards .dew-addons { display: flex; flex-direction: column; align-items: stretch; gap: 6px; max-width: 100%; }
    /* Komórki z dodatkami: etykieta nad wartością, plakietki na pełną szerokość karty.
       W układzie dwukolumnowym zostawało na nie ~180 px i nazwa zderzała się z kwotą. */
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-addons { grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-addons::before { padding-top: 0; }
    /* pusta komórka (sam myślnik) wraca do układu etykieta | wartość — pionowy zajmowałby pół karty na nic */
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-addons:not(:has(.dew-addons)) { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); row-gap: 4px; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-addons:not(:has(.dew-addons))::before { padding-top: 2px; }

    /* Plakietka w karcie: ikona + nazwa i kwota w jednej linii, szczegół (metraż,
       oznaczenie) w drugiej — inaczej długie oznaczenie łamało i nazwę, i kwotę. */
    .dew-mobile-cards .dew-chip {
        display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center; column-gap: 8px; row-gap: 1px;
        white-space: normal; max-width: 100%; padding: 7px 11px 7px 9px; border-radius: 12px;
    }
    .dew-mobile-cards .dew-chip i     { grid-area: 1 / 1; }
    .dew-mobile-cards .dew-chip__nazwa { grid-area: 1 / 2; white-space: nowrap; }
    .dew-mobile-cards .dew-chip__kwota { grid-area: 1 / 3; }
    .dew-mobile-cards .dew-chip__detal { grid-area: 2 / 2 / 2 / 4; line-height: 1.3; }
    /* zapas bezpieczeństwa: gdyby nazwa i kwota nie mieściły się w jednej linii,
       kwota schodzi pod nazwę zamiast na nią nachodzić */
    .dew-mobile-cards .dew-chip__nazwa { overflow: hidden; text-overflow: ellipsis; }
    /* plakietki statusu i typu pomieszczenia trzymają swoją szerokość, nie rozlewają się na całą kolumnę */
    .dew-mobile-cards .dew-inwestycja-table tbody td > .dew-lokal-status,
    .dew-mobile-cards .dew-inwestycja-table tbody td > .dew-premise-type { justify-self: start; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions { width: auto !important; white-space: normal !important; }
    /* akcje: przyciski w rzędzie na całą szerokość */
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px !important; background: rgba(0, 0, 0, .025); }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions::before { display: none; }
    .dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-btn { flex: 1 1 auto; text-align: center; justify-content: center; margin: 0; }

    /* minimal: karta obrysowana, bez cienia, nagłówek jasny */
    .dew-variant-minimal.dew-mobile-cards .dew-inwestycja-table tbody tr { box-shadow: none; border-color: #e5e7eb; border-radius: 10px; }
    .dew-variant-minimal.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr,
    .dew-variant-minimal.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child { background: #f9fafb; color: #111827; border-bottom: 1px solid #e5e7eb !important; }
    .dew-variant-minimal.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr::before,
    .dew-variant-minimal.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child::before { color: #6b7280; opacity: 1; }
    /* nowoczesny: tonacja tabeli — naprzemienne tła kart, ciemny nagłówek, prostokątne rogi */
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody tr { border-radius: 4px; box-shadow: none; border: 1px solid var(--dew-nw-linia); }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody tr:nth-child(odd)  { background: var(--dew-nw-wiersz-1); }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody tr:nth-child(even) { background: var(--dew-nw-wiersz-2); }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody td { border-bottom: 1px solid var(--dew-nw-linia) !important; }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody td::before { color: var(--dew-nw-tekst); opacity: .65; text-transform: none; font-size: 13px; letter-spacing: 0; font-weight: 400; }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr,
    .dew-variant-nowoczesny.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child { background: var(--dew-nw-naglowek); color: #fff; }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr::before,
    .dew-variant-nowoczesny.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child::before { color: #fff; opacity: .8; }
    .dew-variant-nowoczesny.dew-mobile-cards .dew-inwestycja-table .dew-td-actions .dew-btn { width: auto; flex: 1 1 auto; margin: 0; }
}

/* ═══════════════════════════════════════════════════════
   v2.22: KRÓJ „DZIEDZICZ Z MOTYWU STRONY" (klasa dew-font-strony)
   Do 2.21 opcja ustawiała --dew-table-font: inherit, a słowo inherit
   w zmiennej CSS dotyczy samej zmiennej (dziedziczy wartość z :root),
   więc tabela i tak dostawała krój systemowy. Teraz krój strony
   przechodzi na tabelę, kafelki i nagłówek wariantu minimalistycznego.
   ═══════════════════════════════════════════════════════ */
.dew-font-strony,
.dew-font-strony .dew-inwestycja-table,
.dew-font-strony .dew-cards-list,
.dew-variant-minimal.dew-font-strony .dew-inwestycja-header h3 {
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════════
 *  v2.22: WARIANT „ELEGANCKI" — wiersze jako osobne karty
 *
 *  Jasne tło pod tabelą, każdy lokal to biała karta z zaokrąglonymi
 *  rogami, numer na plakietce w kolorze marki, nagłówki kolumn drobnym
 *  pismem o stałej szerokości, statusy jako pigułki z kropką, dodatki
 *  jako obrysowane plakietki, historia ceny i karta lokalu jako ikony,
 *  „Szczegóły" w kolorze marki. W tym wariancie przyciski mają ikony SVG
 *  zamiast emoji (Dew_Oferty_Shortcodes::ikona()), a przyciski-ikony
 *  podpis dla czytników ekranu (.dew-btn__tekst) i podpowiedź w title.
 *
 *  Kolor marki: „Kolor przewodni" inwestycji, gdy różni się od domyślnego
 *  granatu — PHP ustawia wtedy inline --dew-el-marka (accent_style_attr()),
 *  a odcienie tła i linii liczą się z niego. Bez tego zieleń wariantu.
 *  Wszystkie kolory do nadpisania zmiennymi --dew-el-*, np.
 *  --dew-el-tlo: transparent (bez jasnego tła pod tabelą).
 * ═══════════════════════════════════════════════════════════════════ */
.dew-variant-elegancki {
    --dew-el-tlo: #f2f6f3;              /* tło pod tabelą */
    --dew-el-karta: #ffffff;            /* tło wiersza-karty */
    --dew-el-tekst: #10251d;
    --dew-el-tekst-2: #4f635a;
    --dew-el-tekst-3: #5f7068;          /* nagłówki kolumn, podpisy (kontrast 4,8:1 na tle) */
    --dew-el-linia: #dfe8e3;
    --dew-el-linia-hover: #a6beb4;
    --dew-el-marka: #14513c;            /* numer lokalu, cena łączna, „Szczegóły" */
    --dew-el-marka-tekst: #ffffff;
    --dew-el-marka-tlo: #e3f1ea;
    --dew-el-akcent: #17774f;           /* „w cenie" w plakietkach dodatków */
    --dew-el-hover: #f7fbf9;
    --dew-el-cien: rgba(16, 37, 29, .12);
    --dew-el-wolny: #157049;
    --dew-el-wolny-tlo: rgba(29, 138, 93, .1);
    --dew-el-rezerwacja: #93580b;
    --dew-el-rezerwacja-tlo: rgba(196, 128, 28, .12);
    --dew-el-sprzedany: #5d6c65;
    --dew-el-sprzedany-tlo: rgba(111, 128, 120, .12);
    --dew-el-mono: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
    padding: clamp(14px, 2.2vw, 30px);
    border-radius: 20px;
    background: var(--dew-el-tlo);
    color: var(--dew-el-tekst);
}
/* Własny kolor przewodni: neutralne szarości zamiast zielonkawych, odcienie z koloru marki */
.dew-variant-elegancki[style*="--dew-el-marka:"] {
    --dew-el-tekst: #1c2024;
    --dew-el-tekst-2: #4f565e;
    --dew-el-tekst-3: #626a73;
    --dew-el-linia: #e3e6ea;
    --dew-el-linia-hover: #c4cad0;
    --dew-el-marka-tlo: #eef1f3;
    --dew-el-akcent: var(--dew-el-marka);
    --dew-el-hover: #fafafa;
    --dew-el-tlo: #f4f5f6;
    --dew-el-cien: rgba(20, 24, 28, .12);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
    .dew-variant-elegancki[style*="--dew-el-marka:"] {
        --dew-el-marka-tlo: color-mix(in srgb, var(--dew-el-marka) 11%, #ffffff);
        --dew-el-tlo: color-mix(in srgb, var(--dew-el-marka) 4%, #f6f7f8);
        --dew-el-hover: color-mix(in srgb, var(--dew-el-marka) 3%, #ffffff);
        --dew-el-linia-hover: color-mix(in srgb, var(--dew-el-marka) 30%, var(--dew-el-linia));
    }
}

/* ── Przyciski-ikony: podpis tylko dla czytników ekranu (poza wariantem się nie pojawia) ── */
.dew-btn-ikona { position: relative; }
.dew-btn-ikona .dew-btn__tekst {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.dew-ikona { display: inline-block; flex: none; vertical-align: middle; }

/* ── Nagłówek inwestycji i prospekt ── */
.dew-variant-elegancki .dew-inwestycja-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 0 0 18px; }
.dew-variant-elegancki .dew-inwestycja-header h3 { margin: 0; font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--dew-el-tekst); }
.dew-variant-elegancki .dew-inwestycja-address { margin: 0; font-size: 14.5px; color: var(--dew-el-tekst-2); }
.dew-variant-elegancki .dew-inwestycja-prospekt { margin: 0 0 0 auto; }
.dew-variant-elegancki .dew-inwestycja-prospekt.dew-prospekt-below { margin: 14px 0 0; }
.dew-variant-elegancki .dew-inwestycja-prospekt a {
    display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 15px 0 13px; box-sizing: border-box;
    border: 1px solid var(--dew-el-linia); border-radius: 999px; background: var(--dew-el-karta);
    color: var(--dew-el-marka); font-size: 13.5px; font-weight: 600; line-height: 1.2; text-decoration: none;
    transition: border-color 160ms ease;
}
.dew-variant-elegancki .dew-inwestycja-prospekt .dew-ikona { width: 16px; height: 16px; }
.dew-variant-elegancki .dew-vat-info { margin: 12px 2px 0; font-size: 12.5px; font-style: normal; color: var(--dew-el-tekst-3); }

/* ── Tabela: wiersze jako karty ── */
.dew-variant-elegancki .dew-table-responsive {
    border: 0; border-radius: 0; box-shadow: none; background: transparent; padding-bottom: 6px;
    scrollbar-color: var(--dew-el-tekst-3) var(--dew-el-linia);
}
.dew-variant-elegancki .dew-table-responsive::-webkit-scrollbar-track { background: var(--dew-el-linia); }
.dew-variant-elegancki .dew-table-responsive::-webkit-scrollbar-thumb { background: var(--dew-el-tekst-3); border-color: var(--dew-el-linia); }
.dew-variant-elegancki .dew-table-scrollarea::before { background: linear-gradient(to right, var(--dew-el-tlo), rgba(255, 255, 255, 0)); }
.dew-variant-elegancki .dew-table-scrollarea::after { background: linear-gradient(to left, var(--dew-el-tlo), rgba(255, 255, 255, 0)); }

.dew-variant-elegancki .dew-inwestycja-table {
    border: 0; border-collapse: separate; border-spacing: 0 8px; margin-top: -8px;
    background: transparent; color: var(--dew-el-tekst); font-variant-numeric: tabular-nums;
}
.dew-variant-elegancki .dew-inwestycja-table thead th {
    padding: 6px 14px 2px; border: 0; background: transparent; color: var(--dew-el-tekst-3);
    font-family: var(--dew-el-mono); font-size: 11px; font-weight: 500; line-height: 1.35;
    letter-spacing: .07em; text-transform: uppercase; text-align: left; vertical-align: bottom; white-space: normal;
}
.dew-variant-elegancki .dew-inwestycja-table tbody tr,
.dew-variant-elegancki .dew-inwestycja-table tbody tr:hover,
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-zarezerwowany,
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-sprzedany { background: transparent; }
.dew-variant-elegancki .dew-inwestycja-table tbody td {
    padding: 14px; border: 0;
    border-top: var(--dew-grid-width, 1px) solid var(--dew-el-linia);
    border-bottom: var(--dew-grid-width, 1px) solid var(--dew-el-linia);
    background: var(--dew-el-karta); color: var(--dew-el-tekst); font-size: 15px; text-align: left; vertical-align: middle;
    transition: background-color 200ms ease, border-color 200ms ease;
}
.dew-variant-elegancki .dew-inwestycja-table tbody td:first-child { border-left: var(--dew-grid-width, 1px) solid var(--dew-el-linia); border-radius: 14px 0 0 14px; }
.dew-variant-elegancki .dew-inwestycja-table tbody td:last-child { border-right: var(--dew-grid-width, 1px) solid var(--dew-el-linia); border-radius: 0 14px 14px 0; }
.dew-variant-elegancki .dew-inwestycja-table tbody tr:last-child td { border-bottom: var(--dew-grid-width, 1px) solid var(--dew-el-linia); }
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td { color: var(--dew-el-tekst-3); }
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-unit-highlighted td { background: #fff3cd; }
/* Piętro „3–4 (dwupoziomowe)" łamie się w dwóch wierszach zamiast poszerzać tabelę */
.dew-variant-elegancki .dew-inwestycja-table th.dew-col-pietro { width: 1%; }
.dew-variant-elegancki.dew-nowrap .dew-inwestycja-table tbody td.dew-col-pietro { white-space: normal; min-width: 7ch; }
@media (hover: hover) {
    .dew-variant-elegancki .dew-inwestycja-table tbody tr:hover td { background: var(--dew-el-hover); border-color: var(--dew-el-linia-hover); }
}

/* Numer lokalu (i numer pomieszczenia) na plakietce */
.dew-variant-elegancki .dew-inwestycja-table td.dew-col-nr strong,
.dew-variant-elegancki .dew-pomieszczenia-table tbody td:first-child strong {
    display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 34px; padding: 0 10px; box-sizing: border-box;
    border-radius: 10px; background: var(--dew-el-marka-tlo); color: var(--dew-el-marka);
    font-size: 15px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td.dew-col-nr strong,
.dew-variant-elegancki .dew-pomieszczenia-table tbody tr.dew-status-row-sprzedany td:first-child strong { background: var(--dew-el-sprzedany-tlo); color: var(--dew-el-sprzedany); }

/* Ceny: cena lokalu wyraźna, cena łączna w kolorze marki */
.dew-variant-elegancki .dew-td-price { color: var(--dew-el-tekst); font-weight: 600; }
.dew-variant-elegancki .dew-inwestycja-table td.dew-col-cena { font-size: 16px; }
.dew-variant-elegancki .dew-inwestycja-table td.dew-col-cena_m2 { font-size: 14px; color: var(--dew-el-tekst-2); }
.dew-variant-elegancki .dew-inwestycja-table td.dew-col-cena_laczna,
.dew-variant-elegancki .dew-inwestycja-table td.dew-col-cena_laczna strong { font-size: 16px; font-weight: 700; color: var(--dew-el-marka); }
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td.dew-td-price,
.dew-variant-elegancki .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td.dew-col-cena_laczna strong { color: var(--dew-el-tekst-3); }

/* Statusy: pigułka z kropką */
.dew-variant-elegancki .dew-lokal-status {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.dew-variant-elegancki .dew-lokal-status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dew-variant-elegancki .dew-status-wolny         { background: var(--dew-el-wolny-tlo); color: var(--dew-el-wolny); }
.dew-variant-elegancki .dew-status-zarezerwowany { background: var(--dew-el-rezerwacja-tlo); color: var(--dew-el-rezerwacja); }
.dew-variant-elegancki .dew-status-sprzedany     { background: var(--dew-el-sprzedany-tlo); color: var(--dew-el-sprzedany); }

/* Typ pomieszczenia i dodatki: stonowane, obrysowane plakietki bez emoji */
.dew-variant-elegancki .dew-premise-type { padding: 4px 10px; border-radius: 8px; background: transparent; border: 1px solid var(--dew-el-linia); color: var(--dew-el-tekst-2); font-size: 12.5px; font-weight: 600; }
.dew-variant-elegancki .dew-addons { flex-direction: column; align-items: flex-start; gap: 4px; }
/* Plakietka: nazwa i kwota w pierwszym wierszu, szczegół (metraż, oznaczenie) pod spodem —
   kolumna dodatków jest dzięki temu węższa */
.dew-variant-elegancki .dew-chip {
    display: inline-grid; grid-template-columns: max-content max-content; align-items: center; column-gap: 6px; row-gap: 1px;
    padding: 3px 9px; border-radius: 8px; background: transparent; border: 1px solid var(--dew-el-linia);
    color: var(--dew-el-tekst-2); font-size: 12px; font-weight: 500;
}
.dew-variant-elegancki .dew-chip i { display: none; }
.dew-variant-elegancki .dew-chip__nazwa { grid-area: 1 / 1; min-width: auto; }
.dew-variant-elegancki .dew-chip__kwota { grid-area: 1 / 2; }
.dew-variant-elegancki .dew-chip__detal { grid-area: 2 / 1 / 3 / 3; font-size: 11px; line-height: 1.3; }
.dew-variant-elegancki .dew-chip__kwota { border-left-color: var(--dew-el-linia); }
.dew-variant-elegancki .dew-chip__kwota b { color: var(--dew-el-tekst); font-weight: 600; }
.dew-variant-elegancki .dew-chip__kwota em { color: var(--dew-el-akcent); }
.dew-variant-elegancki .dew-chip__detal { color: var(--dew-el-tekst-3); }
.dew-variant-elegancki .dew-td-addons { color: var(--dew-el-tekst-2); }

/* ── Przyciski: pigułki; historia i karta jako ikony; „Szczegóły" w kolorze marki ── */
.dew-variant-elegancki .dew-inwestycja-table th.dew-th-actions,
.dew-variant-elegancki .dew-inwestycja-table td.dew-td-actions { width: 1%; padding-left: 14px; padding-right: 14px; white-space: nowrap; text-align: right; }
.dew-variant-elegancki .dew-akcje { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; vertical-align: middle; }
.dew-variant-elegancki .dew-inwestycja-table .dew-btn,
.dew-variant-elegancki .dew-cards-list .dew-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 36px; margin: 0; padding: 0 14px; box-sizing: border-box;
    border: 1px solid var(--dew-el-linia); border-radius: 999px; background: var(--dew-el-karta); box-shadow: none;
    font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none;
    color: var(--dew-el-tekst); text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.dew-variant-elegancki .dew-inwestycja-table .dew-btn.dew-btn-ikona,
.dew-variant-elegancki .dew-cards-list .dew-btn.dew-btn-ikona { width: 36px; padding: 0; }
/* Kilka plików jednego rodzaju: ikona z numerem */
.dew-variant-elegancki .dew-inwestycja-table .dew-btn.dew-btn-ikona--nr,
.dew-variant-elegancki .dew-cards-list .dew-btn.dew-btn-ikona--nr { width: auto; min-width: 36px; padding: 0 10px 0 9px; gap: 3px; }
.dew-variant-elegancki .dew-btn__nr { font-size: 11.5px; font-weight: 700; line-height: 1; }
.dew-variant-elegancki .dew-btn .dew-ikona { width: 16px; height: 16px; }
.dew-variant-elegancki .dew-btn.dew-btn-ikona .dew-ikona { width: 18px; height: 18px; }
.dew-variant-elegancki .dew-inwestycja-table .dew-btn-more,
.dew-variant-elegancki .dew-cards-list .dew-btn-more { padding: 0 13px 0 16px; background: var(--dew-el-marka); border-color: var(--dew-el-marka); color: var(--dew-el-marka-tekst); }
.dew-variant-elegancki .dew-btn-more .dew-ikona { transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.dew-variant-elegancki .dew-inwestycja-table .dew-btn:focus-visible,
.dew-variant-elegancki .dew-cards-list .dew-btn:focus-visible,
.dew-variant-elegancki .dew-inwestycja-prospekt a:focus-visible { outline: 2px solid var(--dew-el-marka); outline-offset: 2px; }
.dew-variant-elegancki .dew-inwestycja-table .dew-btn:active,
.dew-variant-elegancki .dew-cards-list .dew-btn:active { transform: scale(.97); }
@media (hover: hover) {
    .dew-variant-elegancki .dew-inwestycja-table .dew-btn:hover,
    .dew-variant-elegancki .dew-cards-list .dew-btn:hover { background: var(--dew-el-karta); border-color: var(--dew-el-marka); color: var(--dew-el-marka); }
    .dew-variant-elegancki .dew-inwestycja-table .dew-btn-more:hover,
    .dew-variant-elegancki .dew-cards-list .dew-btn-more:hover { background: var(--dew-el-marka); border-color: var(--dew-el-marka); color: var(--dew-el-marka-tekst); filter: brightness(1.12); }
    .dew-variant-elegancki .dew-btn-more:hover .dew-ikona { transform: translateX(2px); }
    .dew-variant-elegancki .dew-inwestycja-prospekt a:hover { border-color: var(--dew-el-marka); }
}

/* ── Kafelki (widok „Kafelki" w panelu) ── */
.dew-variant-elegancki .dew-cards-legend {
    padding: 0 20px 8px; border: 0; border-radius: 0; background: transparent; color: var(--dew-el-tekst-3);
    font-family: var(--dew-el-mono); font-size: 11px; font-weight: 500; letter-spacing: .07em;
}
.dew-variant-elegancki .dew-cards-list { gap: 8px; }
.dew-variant-elegancki .dew-unit-card,
.dew-variant-elegancki .dew-unit-card:first-child,
.dew-variant-elegancki .dew-cards-legend + .dew-cards-list .dew-unit-card:first-child {
    padding: 16px 20px; border: var(--dew-grid-width, 1px) solid var(--dew-el-linia); border-radius: 14px;
    background: var(--dew-el-karta); color: var(--dew-el-tekst); transition: background-color 200ms ease, border-color 200ms ease;
}
.dew-variant-elegancki .dew-unit-card.dew-status-row-zarezerwowany,
.dew-variant-elegancki .dew-unit-card.dew-status-row-sprzedany { background: var(--dew-el-karta); }
.dew-variant-elegancki .dew-unit-card.dew-unit-highlighted { background: #fff3cd; box-shadow: inset 4px 0 0 #eab308; }
@media (hover: hover) {
    .dew-variant-elegancki .dew-unit-card:hover { background: var(--dew-el-hover); border-color: var(--dew-el-linia-hover); }
}
.dew-variant-elegancki .dew-card-title { gap: 12px; margin-bottom: 8px; }
.dew-variant-elegancki .dew-card-number {
    display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 34px; padding: 0 10px; box-sizing: border-box;
    border-radius: 10px; background: var(--dew-el-marka-tlo); color: var(--dew-el-marka); font-size: 15px; font-weight: 700; letter-spacing: .01em;
}
.dew-variant-elegancki .dew-status-row-sprzedany .dew-card-number { background: var(--dew-el-sprzedany-tlo); color: var(--dew-el-sprzedany); }
.dew-variant-elegancki .dew-card-meta { gap: 6px; }
.dew-variant-elegancki .dew-card-meta span { padding: 3px 9px; border-radius: 8px; background: transparent; border: 1px solid var(--dew-el-linia); color: var(--dew-el-tekst-2); font-size: 12.5px; }
.dew-variant-elegancki .dew-card-meta span:empty { display: none; }
.dew-variant-elegancki .dew-card-info { gap: 14px; font-variant-numeric: tabular-nums; }
.dew-variant-elegancki .dew-card-area { font-size: 15px; font-weight: 600; color: var(--dew-el-tekst); }
.dew-variant-elegancki .dew-card-price { font-size: 17px; font-weight: 700; color: var(--dew-el-marka); }
.dew-variant-elegancki .dew-card-ppm { font-size: 13px; color: var(--dew-el-tekst-2); }
.dew-variant-elegancki .dew-card-addons { flex-basis: 100%; padding: 0; background: transparent; color: var(--dew-el-tekst-2); font-size: 13px; }
.dew-variant-elegancki .dew-card-actions { gap: 6px; }
/* Komputer: stałe proporcje kolumn — metraż i cena zaczynają się w każdej karcie w tym samym miejscu,
   niezależnie od liczby przycisków (w układzie wtyczki kolumny „auto" przesuwały się między kartami) */
@media (min-width: 769px) {
    .dew-variant-elegancki .dew-cards-legend,
    .dew-variant-elegancki .dew-unit-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); }
    .dew-variant-elegancki .dew-cards-legend { padding: 0 21px 8px; }
    .dew-variant-elegancki .dew-card-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* ── Telefon (≤ 768 px): kafelki z etykietami, tryb „dopasuj", widok „Kafelki" ── */
@media (max-width: 768px) {
    .dew-variant-elegancki { padding: 14px 12px; border-radius: 16px; }
    .dew-variant-elegancki .dew-inwestycja-header { margin-bottom: 14px; }
    .dew-variant-elegancki .dew-inwestycja-prospekt { margin-left: 0; }

    /* tryb „kafelki": karta z etykietami w barwach wariantu */
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table { margin-top: 0; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr,
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr:hover,
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-zarezerwowany,
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-sprzedany {
        background: var(--dew-el-karta); border: var(--dew-grid-width, 1px) solid var(--dew-el-linia); border-radius: 16px;
        box-shadow: 0 10px 28px -18px var(--dew-el-cien);
    }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td,
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr:hover td {
        border-radius: 0; border-bottom-color: var(--dew-el-linia) !important; background: transparent; color: var(--dew-el-tekst);
    }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td::before {
        color: var(--dew-el-tekst-3); font-family: var(--dew-el-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em;
    }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr,
    .dew-variant-elegancki.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child { background: var(--dew-el-marka-tlo); color: var(--dew-el-marka); }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td.dew-col-nr,
    .dew-variant-elegancki.dew-mobile-cards .dew-pomieszczenia-table tbody tr.dew-status-row-sprzedany td:first-child { background: var(--dew-el-sprzedany-tlo); color: var(--dew-el-sprzedany); }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr::before,
    .dew-variant-elegancki.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child::before { color: inherit; opacity: .8; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-col-nr strong,
    .dew-variant-elegancki.dew-mobile-cards .dew-pomieszczenia-table tbody td:first-child strong,
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody tr.dew-status-row-sprzedany td.dew-col-nr strong,
    .dew-variant-elegancki.dew-mobile-cards .dew-pomieszczenia-table tbody tr.dew-status-row-sprzedany td:first-child strong {
        min-width: 0; height: auto; padding: 0; background: transparent; color: inherit; font-size: 18px;
    }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions { background: transparent; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-akcje { display: flex; width: 100%; gap: 8px; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-btn { min-height: 44px; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-btn-ikona { flex: 0 0 44px; width: 44px; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-btn-ikona--nr { flex: 0 0 auto; width: auto; padding: 0 12px 0 11px; }
    .dew-variant-elegancki.dew-mobile-cards .dew-inwestycja-table tbody td.dew-td-actions .dew-btn-more { flex: 1 1 auto; }
    /* plakietka dodatku w karcie: na całą szerokość, kwota przy prawej krawędzi */
    .dew-variant-elegancki.dew-mobile-cards .dew-chip { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 7px 11px; border-radius: 10px; }
    .dew-variant-elegancki.dew-mobile-cards .dew-chip__nazwa { min-width: 0; }

    /* tryb „dopasuj do szerokości": mniejsze plakietki i przyciski jeden pod drugim */
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table { border-spacing: 0 6px; margin-top: -6px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table tbody td:first-child { border-radius: 10px 0 0 10px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table tbody td:last-child { border-radius: 0 10px 10px 0; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table td.dew-col-nr strong,
    .dew-variant-elegancki.dew-mobile-fit .dew-pomieszczenia-table tbody td:first-child strong { min-width: 0; height: auto; padding: 3px 6px; border-radius: 7px; font-size: 12px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table thead th { font-family: inherit; letter-spacing: .03em; }
    .dew-variant-elegancki.dew-mobile-fit .dew-lokal-status { gap: 4px; padding: 2px 7px 2px 6px; font-size: 10px; white-space: normal; }
    .dew-variant-elegancki.dew-mobile-fit .dew-lokal-status::before { width: 5px; height: 5px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table td.dew-col-cena_laczna strong { font-size: inherit; }
    .dew-variant-elegancki.dew-mobile-fit .dew-chip { display: inline-flex; padding: 2px 6px; border-radius: 6px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-akcje { flex-direction: column; align-items: stretch; gap: 4px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table tbody td.dew-td-actions .dew-btn { display: flex; width: auto; min-height: 30px; margin: 0; padding: 0 8px; font-size: 11px; }
    .dew-variant-elegancki.dew-mobile-fit .dew-inwestycja-table tbody td.dew-td-actions .dew-btn-ikona { width: 100%; padding: 0; }

    /* widok „Kafelki": przyciski-ikony nie rozciągają się, „Szczegóły" bierze resztę */
    .dew-variant-elegancki .dew-unit-card { padding: 16px; }
    .dew-variant-elegancki .dew-card-actions { justify-content: flex-start; border-top-color: var(--dew-el-linia); }
    .dew-variant-elegancki .dew-card-actions .dew-btn { min-height: 44px; font-size: 13.5px; }
    .dew-variant-elegancki .dew-card-actions .dew-btn.dew-btn-ikona { flex: 0 0 44px; width: 44px; }
    .dew-variant-elegancki .dew-card-actions .dew-btn.dew-btn-ikona--nr { flex: 0 0 auto; width: auto; padding: 0 12px 0 11px; }
    .dew-variant-elegancki .dew-card-actions .dew-btn-more { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .dew-variant-elegancki .dew-inwestycja-table tbody td,
    .dew-variant-elegancki .dew-unit-card,
    .dew-variant-elegancki .dew-btn,
    .dew-variant-elegancki .dew-btn-more .dew-ikona { transition: none; }
    .dew-variant-elegancki .dew-btn:active,
    .dew-variant-elegancki .dew-btn-more:hover .dew-ikona { transform: none; }
}
