    /* --- Modern Blueprint Style Filter --- */

    /* Shift the whole section 3 as a block to the right, but keep internal left alignment
       so header starts above the first tile (e.g. "Sprzedaż"). */
    .transaction-block {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .transaction-block .transaction-inner {
        margin-left: auto; /* push the whole block to the right */
        max-width: 100%;
    }
    .transaction-block #transaction-pill-container {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(7.5rem, max-content));
        gap: 8px;
        justify-content: start;
        flex-wrap: nowrap !important;
    }
    #transaction-pill-container .tile-filter {
        flex: none !important;
        width: 100%;
        min-width: 0;
        justify-content: center;
        box-sizing: border-box;
    }
    #transaction-filter-group .group-status[data-group="transaction"] {
        min-width: 11.5rem;
        text-align: center;
        display: inline-block;
    }
    .transaction-discount-chip .tile-filter.tile-discount-active {
        background-color: #ea580c !important;
        color: #fff !important;
        border-color: #c2410c !important;
        box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3) !important;
    }
    .transaction-discount-chip .tile-filter.tile-discount-active svg {
        color: #fff !important;
    }
    .transaction-discount-chip #tile-live-auction.tile-auction-active,
    #tile-live-auction.tile-filter.tile-auction-active {
        background-color: #387B22 !important;
        color: #fff !important;
        border-color: #2d6319 !important;
        box-shadow: 0 4px 12px rgba(56, 123, 34, 0.35) !important;
    }
    .transaction-discount-chip #tile-live-auction.tile-auction-active svg,
    #tile-live-auction.tile-auction-active svg {
        color: #fff !important;
    }
    @media (max-width: 768px) {
        .transaction-block #transaction-pill-container {
            display: flex !important;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .transaction-block #transaction-pill-container::-webkit-scrollbar {
            display: none;
        }
        #transaction-pill-container .tile-filter {
            width: auto;
            min-width: 7.5rem;
            flex: 0 0 auto;
        }
    }
    .transaction-badge-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 1rem;
    }
    .transaction-discount-chip .tile-filter {
        padding: 5px 12px;
        font-size: 12px;
        font-weight: 900;
        border-radius: 9px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        min-height: 0;
        box-shadow: 0 2px 8px rgba(234, 88, 12, 0.15);
    }
    .transaction-discount-chip .tile-filter svg {
        width: 14px;
        height: 14px;
        margin-right: 0.15rem;
    }

    /* Subfilter Container - ENSURE NATURAL FLOW */
    #advanced-filters-panel {
        transition: all 0.3s ease-in-out;
        width: 100%;
        display: none; /* HTMX sets this to block */
    }
    #advanced-filters-panel:not(.hidden) {
        display: block !important;
    }
    
    /* ABSOLUTNÍ FIX PRO ČERVENÝ KOŠ */
    .trash-btn-force:hover svg {
        stroke: #ef4444 !important;
        color: #ef4444 !important;
    }

    /* Search-to-Tag Státy */
    #country-tag-container .country-tag {
        display: inline-flex;
        align-items: center;
        background-color: #7a12d1;
        color: white;
        padding: 4px 12px;
        border-radius: 9999px;
        font-size: 0.8125rem;
        margin-right: 6px;
        margin-bottom: 6px;
        font-weight: 600;
    }
    #country-tag-container .country-tag button {
        margin-left: 8px;
        font-size: 1.2rem;
        line-height: 1;
    }

    /* Tag státu (Česko…): víc od pole „Vlastní výběr“, méně k čárkované / Top 7 */
    .country-tags-wrap {
        margin-top: 0;
        margin-bottom: 0;
        min-height: 0;
    }
    .country-tags-wrap:has(.country-tag) {
        margin-top: 1rem;
        margin-bottom: 0.25rem;
    }
    .country-tags-wrap:has(.country-tag) .country-tag {
        margin-bottom: 0;
    }
    #country-tag-container:empty {
        display: none;
    }

    .quick-choice-link {
        transition: all 0.2s;
    }

    /* Expressive Dashed Lines (Restored) */
    .border-dashed-custom {
        background-image: linear-gradient(to right, #9ca3af 40%, rgba(255, 255, 255, 0) 0%);
        background-position: top;
        background-size: 10px 1px;
        background-repeat: repeat-x;
        height: 1px;
        width: 100%;
        margin-top: 2rem;
        margin-bottom: 1.5rem;
    }

    /* DOUBLE BADGE SYSTEM */
    .badge-container {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .badge-header {
        background-color: #f3f4f6; /* gray-100 */
        color: #4b5563; /* gray-600 */
        font-size: 13px;
        font-weight: 900;
        padding: 5px 14px;
        border-radius: 9px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    .badge-status {
        font-size: 13px;
        font-weight: 900;
        padding: 5px 14px;
        border-radius: 9px;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    .badge-status-all {
        background-color: #7a12d1;
        color: white;
    }
    .badge-status-custom {
        background-color: #f3f4f6;
        color: #4b5563;
    }

    /* Popisek nad polem / dlaždicí — vždy nad, nikdy přes fialový pruh */
    .filter-field-col {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
        min-width: 0;
    }
    .filter-field-col > .badge-container {
        margin-bottom: 0 !important;
        height: auto !important;
        min-height: 24px;
    }
    .filter-field-col > .filter-field-control {
        min-height: 44px;
    }

    /* Záloha: žádný záporný margin u řádků popisků (popisky nesmí do dlaždic) */
    #filter-form .grid[class*="mb-1"],
    #filter-form .grid[class*="-mb-"] {
        margin-bottom: 0.5rem !important;
    }

    /* THE PURPLE SEARCHING MACHINE: Dynamic Input State */
    .purple-machine-input {
        background-color: #7a12d1 !important;
        color: white !important;
        border-color: #7a12d1 !important;
        box-shadow: 0 4px 15px rgba(122, 18, 209, 0.4) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .purple-machine-input::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
    }
    .purple-machine-input:focus {
        background-color: white !important;
        color: #4b5563 !important;
        box-shadow: 0 0 0 2px #7a12d1 !important;
    }
    .purple-machine-input:focus::placeholder {
        color: #9ca3af !important;
    }

    /* MONOLITH UNITY v16: The Absolute Baseline */
    .monolith-item {
        height: 44px !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border: 1px solid #d1d5db !important;
        background-color: #fcfaff !important; /* Soft Lavender Base */
        color: #4b5563 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .monolith-item:hover:not(.monolith-active) {
        border-color: #7a12d1 !important;
        box-shadow: 0 0 0 4px rgba(122, 18, 209, 0.05) !important;
        background-color: white !important;
    }
    .monolith-active {
        background-color: #7a12d1 !important;
        color: white !important;
        border-color: #7a12d1 !important;
        box-shadow: 0 4px 12px rgba(122, 18, 209, 0.2) !important;
    }
    .monolith-item::placeholder {
        color: #9ca3af !important;
    }
    .monolith-active::placeholder {
        color: #ffffff !important;
        opacity: 1 !important;
    }

    /* Po „Zrušit výběr“ musí Zahraničí vypadat jako při prvním načtení: fialová dlaždice + bílý text (monolith-item jinak přebije šedou). */
    #tile-abroad.tile-filter.tile-active {
        background-color: #7a12d1 !important;
        color: #ffffff !important;
        border-color: #7a12d1 !important;
        box-shadow: 0 4px 12px rgba(122, 18, 209, 0.2) !important;
    }
    #tile-abroad.tile-filter.tile-active .tile-text {
        color: #ffffff !important;
    }
    #tile-abroad.tile-filter.tile-active svg {
        color: #ffffff !important;
    }

    /* Disabled selects were washed out by Tailwind `disabled:opacity-60`.
       Keep the same saturated purple as State/Abroad when monolith-active. */
    select.monolith-active:disabled,
    select.monolith-active[disabled] {
        opacity: 1 !important;
        background-color: #7a12d1 !important;
        color: #ffffff !important;
        border-color: #7a12d1 !important;
        -webkit-text-fill-color: #ffffff !important; /* Safari */
    }

    /*
     * Select2 skrývá <select> — fialová „vybraná hodnota“ na skutečném widgetu.
     * Třídu `geo-select2-monolith-active` nastavuje JS na kontejneru (data('select2').$container),
     * protože sousední selektor + DOM pořadí u okresu nemusí vždy sedět.
     */
    .select2-container.geo-select2-monolith-active .select2-selection--single,
    .select2-container.geo-select2-monolith-active .select2-selection.select2-selection--single {
        background-color: #7a12d1 !important;
        border-color: #7a12d1 !important;
        min-height: 44px !important;
        align-items: center;
    }
    .select2-container.geo-select2-monolith-active .select2-selection__rendered {
        color: #ffffff !important;
        line-height: 1.35 !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    .select2-container.geo-select2-monolith-active .select2-selection__arrow b {
        border-color: #ffffff transparent transparent transparent !important;
    }
    /* Fallback: přímý soused za <select> */
    select#geo-region-select.monolith-active + .select2-container .select2-selection--single,
    select#geo-district-select.monolith-active + .select2-container .select2-selection--single {
        background-color: #7a12d1 !important;
        border-color: #7a12d1 !important;
        min-height: 44px !important;
    }
    select#geo-region-select.monolith-active + .select2-container .select2-selection__rendered,
    select#geo-district-select.monolith-active + .select2-container .select2-selection__rendered {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    /*
     * Okres: stejný vzhled jako kraj (bílý text, #7a12d1).
     * 1) třída z JS, 2) :has() podle skutečně vybrané <option> (nespoléhá na synchronní třídu),
     * 3) obecný sourozenec ~ když mezi <select> a Select2 kontejnerem něco vloží.
     */
    #geo-district-control-wrap.has-geo-district-value .select2-container--default .select2-selection--single,
    #geo-district-control-wrap.has-geo-district-value .select2-container .select2-selection--single,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container--default .select2-selection--single,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container .select2-selection--single,
    #geo-district-control-wrap select#geo-district-select.monolith-active ~ .select2-container .select2-selection--single {
        background-color: #7a12d1 !important;
        border-color: #7a12d1 !important;
        min-height: 44px !important;
    }
    #geo-district-control-wrap.has-geo-district-value .select2-container--default .select2-selection--single .select2-selection__rendered,
    #geo-district-control-wrap.has-geo-district-value .select2-container .select2-selection__rendered,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container--default .select2-selection--single .select2-selection__rendered,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container .select2-selection__rendered,
    #geo-district-control-wrap select#geo-district-select.monolith-active ~ .select2-container .select2-selection__rendered {
        color: #ffffff !important;
        line-height: 42px !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    #geo-district-control-wrap.has-geo-district-value .select2-container--default .select2-selection--single .select2-selection__arrow b,
    #geo-district-control-wrap.has-geo-district-value .select2-container .select2-selection--single .select2-selection__arrow b,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container--default .select2-selection--single .select2-selection__arrow b,
    #geo-district-control-wrap:has(#geo-district-select option:checked:not([value=""])) .select2-container .select2-selection--single .select2-selection__arrow b,
    #geo-district-control-wrap select#geo-district-select.monolith-active ~ .select2-container .select2-selection__arrow b {
        border-color: #ffffff transparent transparent transparent !important;
    }

    .slate-placeholder::placeholder {
        color: #4b5563 !important;
    }

    .border-dashed-custom {
        background-image: linear-gradient(to right, #9ca3af 40%, rgba(255, 255, 255, 0) 0%);
        background-position: top;
        background-size: 12px 1px;
        background-repeat: repeat-x;
        border-top: none !important;
    }
    /* Čárkované oddělovače sekcí — stejné odsazení (těsně pod dlaždicemi / řádkem, pak odstup k další sekci) */
    .border-dashed-custom.filter-section-dash {
        margin-top: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Top 7 státy: stejná mezera nad dlaždicí (od čárkované) i pod počtem (k Lokalitě). */
    .filter-top-countries-block {
        margin-bottom: 1rem;
    }
    .filter-top-country-item .filter-top-country-count {
        margin-top: 4px;
    }

    /* GUARANTEED TOP REGION SPACING & COLOR (Tailwind Bypass) */
    .top-region-item {
        margin-left: 1.25rem !important; /* Balanced gap between countries */
        color: #4b5563 !important;
    }
    .top-region-flag {
        margin-right: 0.5rem !important; /* mr-2 gap near flag */
    }
    .top-region-count {
        color: #4b5563 !important; /* Darkened for readability */
        margin-left: 4px !important;
        font-weight: 500 !important;
    }
    .top-region-label {
        margin-right: 1rem !important;
    }

    /* THE GRAY-SCALE LIMITER: Only for specific labels and blocks */
    .quick-choice-link {
        color: #4b5563 !important;
        transition: all 0.2s ease;
    }

    /* TOP REGION HOVER EFFECTS */
    .top-region-item:hover .quick-choice-link {
        color: #7a12d1 !important;
        text-decoration: underline !important;
    }
    .top-region-item:hover .top-region-flag {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(122, 18, 209, 0.2);
    }
