.listing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 28px 0 8px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--border-color, var(--gray-200));
    border-radius: 999px;
    background: var(--card-bg, var(--white));
    color: var(--text-primary, var(--text));
    font-weight: 600;
    text-decoration: none;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-status {
    color: var(--text-secondary, var(--gray-500));
    font-weight: 600;
}

.mobile-listing-sentinel {
    display: none;
}

html[dir="rtl"] .listing-pagination .fa-chevron-left,
html[dir="rtl"] .listing-pagination .fa-chevron-right {
    transform: scaleX(-1);
}

@media (max-width: 520px) {
    .listing-pagination {
        gap: 8px;
    }

    .pagination-btn {
        padding: 9px 12px;
    }
}

@media (max-width: 768px) {
    .listing-pagination {
        display: none;
    }

    .mobile-listing-sentinel {
        min-height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 8px auto 24px;
        color: var(--text-secondary, var(--gray-500));
    }

    .mobile-listing-sentinel.is-finished {
        min-height: 12px;
        margin-bottom: 12px;
    }

    .mobile-listing-sentinel .mobile-listing-loading {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .mobile-listing-sentinel.is-loading .mobile-listing-loading {
        opacity: 1;
    }
}

:root {
    --primary: #25b579;
    --primary-dark: #1d9461;
    --primary-light: #4fd19a;
    --accent: #2b3d4f;
    --secondary: #f5f5f5;
    --white: #ffffff;
    --black: #2b3d4f;
    --text: #374151;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e8e8e8;
    --gray-300: #d4d4d4;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --success: #10b981;
    --whatsapp: #25d366;
    --rent-badge: #2563eb;
    --rent-badge-dark: #1d4ed8;
    --sell-badge: #dc2626;
    --sell-badge-dark: #b91c1c;
    --surface: #ffffff;
    --gold: #c9a227;
    --gold-light: #e4c55a;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-md: 10px;
    --radius-sm: 8px;
    /* ── Breakpoint reference tokens (use in JS; not valid inside @media) ── */
    --bp-xs:   320px;
    --bp-sm:   480px;
    --bp-md:   768px;
    --bp-lg:  1024px;
    --bp-xl:  1280px;
    --bp-2xl: 1440px;
    /* ── Fluid spacing scale — scales with viewport width ── */
    --space-xs:  clamp(0.25rem,  0.5vw,  0.375rem);   /* 4 – 6px   */
    --space-sm:  clamp(0.375rem, 1vw,    0.625rem);    /* 6 – 10px  */
    --space-md:  clamp(0.75rem,  2vw,    1rem);        /* 12 – 16px */
    --space-lg:  clamp(1rem,     3vw,    1.5rem);      /* 16 – 24px */
    --space-xl:  clamp(1.5rem,   5vw,    2.5rem);      /* 24 – 40px */
    --space-2xl: clamp(2.5rem,   7vw,    4rem);        /* 40 – 64px */
    /* ── Fluid type scale — use clamp() so sizes scale smoothly ── */
    --text-xs:   clamp(0.7rem,   1.5vw,  0.8rem);     /* ~11–13px  */
    --text-sm:   clamp(0.8rem,   1.8vw,  0.875rem);   /* ~13–14px  */
    --text-base: clamp(0.875rem, 2vw,    1rem);        /* ~14–16px  */
    --text-md:   clamp(1rem,     2.5vw,  1.125rem);   /* ~16–18px  */
    --text-lg:   clamp(1.1rem,   3vw,    1.375rem);   /* ~18–22px  */
    --text-xl:   clamp(1.25rem,  3.5vw,  1.75rem);    /* ~20–28px  */
    --text-2xl:  clamp(1.5rem,   4.5vw,  2.25rem);    /* ~24–36px  */
    --text-3xl:  clamp(1.75rem,  5.5vw,  3rem);       /* ~28–48px  */
    --text-4xl:  clamp(2rem,     7vw,    4rem);        /* ~32–64px  */
    /* ── Container fluid padding ── */
    --container-px: clamp(1rem, 4vw, 2rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--black);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

main {
    flex: 1;
}

/* ── iOS Safari fix: flex body breaks position:fixed on mobile ── */
@media (max-width: 768px) {
    body {
        display: block;
    }
    main {
        min-height: calc(100svh - 300px);
    }
}

body.rtl {
    font-family: 'Cairo', 'Inter', sans-serif;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--container-px, clamp(1rem, 4vw, 2rem));
    box-sizing: border-box;
}

:root {
    --navbar-h: 64px;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
}


.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
}

.logo img {
    height: 50px;
    width: auto;
    max-width: min(260px, 42vw);
    object-fit: contain;
}

.logo i {
    font-size: 1.75rem;
    color: var(--gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--gray-600);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-link.btn-primary:hover {
    background: var(--primary-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 25px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: none;
    letter-spacing: 0.3px;
    flex-shrink: 1;
    min-width: 0;
}

.user-info.agency-info {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--gray-100);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}

.user-info i {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.user-info.agency-info i {
    font-size: 1.4rem;
    align-self: center;
}

.user-info .user-name {
    line-height: 1.3;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-info-text .company-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info-text .manager-name {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── English desktop header: tighter spacing (lang-en only, ≥769px) ─────── */
@media (min-width: 769px) {
    .lang-en .nav-container {
        justify-content: space-between;
    }
    .lang-en .nav-links {
        flex: 1;
        justify-content: space-evenly;
    }

    .lang-en .nav-link {
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .lang-en .nav-link.btn-primary {
        padding: 9px 18px;
        font-size: 0.95rem;
    }

    .lang-en .user-info {
        padding: 7px 12px;
        max-width: none;
        white-space: nowrap;
    }

    /* Icon-only items: hide text label, enlarge icon */
    .lang-en .nav-label {
        display: none;
    }

    .lang-en .notification-link i,
    .lang-en a[href*="account_settings"] i,
    .lang-en a[href*="logout"] i {
        font-size: 1.25rem;
    }
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    margin: 16px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    box-shadow: none;
}

.mobile-user-info.agency-info {
    border-width: 1.5px;
    border-color: var(--primary);
    box-shadow: none;
}

.mobile-user-info i {
    font-size: 2rem;
    color: var(--primary);
    text-shadow: none;
}

.mobile-user-info.agency-info i {
    font-size: 2.2rem;
}

.mobile-user-info span {
    flex: 1;
}

.mobile-user-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.mobile-user-text .company-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.mobile-user-text .manager-name {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--gray-500);
    line-height: 1.2;
}

.lang-toggle {
    display: flex;
    align-items: center;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--secondary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-inline-start: 6px;
    flex-shrink: 0;
}
.theme-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 16px;
    background: var(--surface);
    border-top: 1px solid var(--gray-200);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-weight: 500;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.mobile-lang {
    padding-top: 12px;
}

.mobile-lang a {
    color: var(--primary);
    font-weight: 600;
}

.hero {
    position: relative;
    min-height: 560px;
    padding-top: 80px;
    padding-bottom: 80px;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
}

/* Full-viewport landing mode — fills the viewport on desktop */
.hero--landing {
    height: 100svh;         /* svh = small viewport height (avoids mobile toolbar gap) */
    min-height: 460px;      /* Floor so short desktop windows still look good */
    max-height: 900px;      /* Cap on very tall monitors */
    padding-top: 32px;
    padding-bottom: 32px;
}

/* Compact results search bar (shown instead of hero in search mode) */
.results-search-row {
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--gray-100);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 10px 0;
    position: sticky;
    top: var(--navbar-h);
    z-index: 119;
}
.results-search-form {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.results-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1.5px solid var(--gray-200);
    border-radius: 24px;
    padding: 8px 16px;
    transition: border-color 0.2s;
}
.results-search-input-wrap:focus-within {
    border-color: var(--primary);
}
.results-search-input-wrap i {
    color: var(--gray-400);
    flex-shrink: 0;
}
.results-search-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.95rem;
    outline: none;
    color: var(--black);
    min-width: 0;
}
.results-search-submit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.results-search-submit:hover { background: var(--primary-dark); }

.hero-video-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 61, 79, 0.72) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 20px;
    overflow: visible;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 14px 24px;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--gray-700);
    cursor: pointer;
    min-width: 180px;
    box-shadow: var(--shadow);
}

.listings-section {
    padding: 0 0 48px;
    position: relative;
    z-index: 1;
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.type-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}


.tab {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-600);
    background: var(--surface);
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}

.tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Rent tab - Blue color only when active */
.tab-rent.active {
    background: var(--rent-badge);
    color: var(--white);
    border-color: var(--rent-badge);
}

.tab-rent:hover:not(.active) {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--rent-badge);
    color: var(--rent-badge);
}

/* Sale tab - Gold color only when active */
.tab-sell.active {
    background: var(--sell-badge);
    color: var(--white);
    border-color: var(--sell-badge);
}

.tab-sell:hover:not(.active) {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--sell-badge);
    color: var(--sell-badge);
}

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

.property-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.property-card .card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-card {
    border: 3px solid var(--gold);
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

/* Advertisement Cards */
.ad-card {
    display: block;
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--gray-200);
}

.ad-card.property-card-size {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.ad-media-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--gray-200);
    overflow: hidden;
    flex: 1;
}

.ad-media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.ad-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-video-toggle {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 10;
    transition: background 0.2s;
}

.rtl .ad-video-toggle {
    left: auto;
    right: 12px;
}

.ad-video-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.third-party-ad-card {
    border: 2px dashed var(--gray-300);
}

.third-party-ad-container {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

/* Toggle switch for ad settings */
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.ad-mode-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 37, 99, 235), 0.04);
}

.ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gray-700);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rtl .ad-badge {
    right: auto;
    left: 12px;
}

.ad-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gray-200);
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-image-full {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: var(--gray-200);
    overflow: hidden;
}

.ad-image-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 60px 16px 16px 16px;
    transition: padding 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                background 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ad-card:hover .ad-overlay,
.ad-card.in-view .ad-overlay {
    padding-top: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.75) 60%, rgba(0,0,0,0.2) 100%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ad-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ad-card:hover .ad-overlay h4 {
    transform: translateY(-2px);
}

.ad-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.5;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.1s,
                max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.05s,
                transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.1s,
                margin 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.05s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.ad-card:hover .ad-description,
.ad-card.in-view .ad-description {
    opacity: 1;
    max-height: 80px;
    transform: translateY(0);
    margin-top: 8px;
}

.rtl .ad-overlay {
    text-align: right;
}

.rtl .ad-description {
    direction: rtl;
    text-align: right;
}

.ad-content {
    padding: 16px;
}

.ad-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.ad-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--gray-200);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    direction: ltr;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    flex-grow: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--white);
    z-index: 10;
    opacity: 0;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.property-card:hover .carousel-arrow,
.card-image:hover .carousel-arrow,
.image-carousel.touched .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.carousel-arrow:focus {
    outline: none;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.rtl .fa-arrow-left,
.rtl .fa-arrow-right,
.rtl .fa-chevron-left,
.rtl .fa-chevron-right {
    transform: scaleX(-1);
}

[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-chevron-right {
    transform: scaleX(-1);
}

.rtl .gallery-nav i,
.rtl .lightbox-nav i,
[dir="rtl"] .gallery-nav i,
[dir="rtl"] .lightbox-nav i {
    transform: scaleX(1);
}

.carousel-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    direction: ltr;
    gap: 3px;
    z-index: 10;
    opacity: 0;
    transition: all 0.2s ease;
}

.property-card:hover .carousel-dots,
.card-image:hover .carousel-dots,
.image-carousel.touched .carousel-dots {
    opacity: 1;
}

.carousel-dot {
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    min-height: 5px !important;
    max-width: 5px !important;
    max-height: 5px !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    box-sizing: border-box;
}

.carousel-dot.active {
    background: var(--surface);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-dot:focus {
    outline: none;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5f0 0%, #c8eadc 100%);
}

.placeholder-image i {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.4;
}

.badge {
    position: absolute;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge {
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--gray-700);
    backdrop-filter: blur(4px);
}

.rtl .category-badge {
    left: auto;
    right: 12px;
}

.card-badge-row {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.rtl .card-badge-row {
    right: auto;
    left: 18px;
}

.card-badge-row .type-badge,
.card-badge-row .featured-badge-premium {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
}

.type-badge {
    top: 12px;
    left: 12px;
    color: var(--white);
}

.rtl .type-badge {
    left: auto;
    right: 12px;
}

.type-badge.rent {
    background: var(--rent-badge);
}

.type-badge.sell {
    background: var(--sell-badge);
}

/* Shared space badge — card specs (inline pill) */
.card-specs span.shared-space-badge {
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.02em;
}

.card-specs .shared-space-badge i {
    color: #fff;
    font-size: 0.7rem;
}

/* Shared space badge — detail page (alongside other badges) */
.shared-space-detail-badge {
    background: var(--primary) !important;
    color: #fff !important;
}

.shared-space-detail-badge i {
    margin-right: 5px;
}

.rtl .shared-space-detail-badge i {
    margin-right: 0;
    margin-left: 5px;
}

.featured-badge {
    top: 44px;
    left: 12px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.4);
}

.featured-badge i {
    font-size: 0.7rem;
}

.rtl .featured-badge {
    left: auto;
    right: 12px;
}

.featured-badge-premium {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2b28 100%);
    color: #c9a227;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c9a227;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(201, 162, 39, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 10;
    overflow: hidden;
}

.featured-badge-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 162, 39, 0.3),
        transparent
    );
    transform: translateX(-100%);
    animation: shine 3s ease-in-out infinite;
}

.featured-badge-premium i {
    font-size: 0.8rem;
    color: #f4d03f;
    filter: drop-shadow(0 0 4px rgba(244, 208, 63, 0.8));
    animation: glow-pulse 2s ease-in-out infinite;
}

.featured-badge-premium span {
    background: linear-gradient(135deg, #f4d03f 0%, #c9a227 50%, #f4d03f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    50%, 100% {
        transform: translateX(100%);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(244, 208, 63, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(244, 208, 63, 1));
    }
}

.rtl .featured-badge-premium {
    left: auto;
    right: 10px;
}

.verified-agency-badge {
    top: 74px;
    left: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.verified-agency-badge i {
    font-size: 0.7rem;
}

.rtl .verified-agency-badge {
    left: auto;
    right: 12px;
}

.detail-badges .verified-agency-badge {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
}

.rtl .detail-badges .verified-agency-badge {
    left: auto;
    right: auto;
}

.card-content {
    padding: 32px 16px 16px;
    background: var(--surface);
    color: var(--gray-700);
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-avatar {
    position: absolute;
    top: -60px;
    left: 16px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rtl .card-avatar {
    left: auto;
    right: 16px;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: var(--surface);
}

.card-avatar img.fb-badge-img {
    transform: scale(1.35);
}

.card-avatar i {
    color: var(--white);
    font-size: 2rem;
}

.card-owner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
    margin-left: 0; /* Owner name starts from left edge */
    padding-left: 0;
}

.rtl .card-owner-row {
    margin-left: 0;
    margin-right: 0; /* Owner name starts from right edge in RTL */
    padding-right: 0;
}

.owner-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FB-sourced cards: title shown in the owner row slot — allow 2-line wrap */
.owner-name.fb-title-in-row {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    max-width: 72%;
}

.verified-icon {
    color: #3b82f6;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.listing-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card title inside listing grid cards — single line, prominent */
.property-card .card-content .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
}

.card-ad-number {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 3px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.card-ad-number i {
    color: var(--primary);
    font-size: 0.65rem;
}

.card-location {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-card .card-location {
    margin-top: auto;
}

.card-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.card-location i {
    color: var(--gray-500);
}

.card-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.card-specs span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-specs span:not(.spec-divider) {
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 4px;
}

.card-specs i {
    color: var(--primary);
}

.spec-divider {
    display: none;
}

.card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.card-price-row .card-price {
    margin-bottom: 0;
}

.property-card .card-commission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--primary-dark) !important;
    font-weight: 600;
    background-color: rgba(37, 181, 121, 0.1) !important;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(37, 181, 121, 0.3) !important;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.property-card .card-commission-badge i {
    font-size: 0.6rem;
    color: var(--primary-dark) !important;
}

.card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

/* Dual-price layout on listing cards */
.card-price--dual {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-price--dual .dual-price-monthly {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.card-price--dual .dual-price-daily-card {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark, #1d9461);
}

.price-period {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-400);
}

.card-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--gray-100);
}

.card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.card-btn-call {
    background: var(--primary);
    color: var(--white);
}

.card-btn-call:hover {
    background: var(--primary-dark);
}

.card-btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
}

.card-btn-whatsapp:hover {
    background: #1da851;
}

.agency-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.agency-logo-small {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
}

.agency-icon-small {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agency-icon-small i {
    font-size: 1.25rem;
    color: var(--white);
}

.agency-name-small {
    font-size: 0.8rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agency-logo-wrapper {
    position: relative;
    display: inline-block;
}

.verified-check {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.verified-check i {
    font-size: 9px;
    color: var(--white);
}

.verified-check-large {
    width: 20px;
    height: 20px;
    bottom: -4px;
    right: -4px;
    border: 2px solid var(--white);
}

.verified-check-large i {
    font-size: 10px;
}

.rtl .verified-check {
    right: auto;
    left: -4px;
}

.rtl .verified-check-large {
    right: auto;
    left: -4px;
}

.agency-link {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 8px;
    margin: -8px;
    border-radius: 8px;
}

.agency-link:hover {
    background-color: var(--gray-100);
}

.agency-arrow {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.agency-link:hover .agency-arrow {
    transform: translateX(2px);
    color: var(--primary);
}

.rtl .agency-arrow {
    margin-left: 0;
    margin-right: auto;
    transform: scaleX(-1);
}

.rtl .agency-link:hover .agency-arrow {
    transform: scaleX(-1) translateX(2px);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 181, 121, 0.3);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.detail-page {
    padding: 32px 0 64px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.detail-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}

.detail-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.detail-placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.detail-placeholder i {
    font-size: 8rem;
    color: rgba(255,255,255,0.5);
}

.detail-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.rtl .detail-badges {
    left: auto;
    right: 20px;
}

.detail-badges .badge {
    position: static;
    font-size: 0.875rem;
    padding: 8px 16px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

.detail-main {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.ad-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    color: var(--gray-600);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
}

.ad-number-badge i {
    color: var(--primary);
    font-size: 0.8rem;
}

.detail-location {
    font-size: 1.125rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
}

/* Dual-price layout on detail page */
.detail-price--dual {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
}

.detail-price--dual .dual-price-monthly {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.detail-price--dual .dual-price-sep {
    display: block;
    border-top: 1px solid var(--gray-200);
    margin: 8px 0;
    width: 120px;
}

.detail-price--dual .dual-price-daily {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark, #1d9461);
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.meta-item {
    text-align: center;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.meta-item .meta-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
}

.meta-item .meta-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.detail-description h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.detail-description p {
    color: var(--gray-600);
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-date {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-sidebar {
    position: sticky;
    top: 96px;
}

.contact-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 20px;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.owner-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.owner-avatar i {
    font-size: 1.5rem;
    color: var(--white);
}

.owner-avatar .owner-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.owner-details {
    display: flex;
    flex-direction: column;
}

.owner-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
}

.owner-phone {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-family: monospace;
}

.btn-whatsapp {
    width: 100%;
    background: var(--whatsapp);
    color: var(--white);
    margin-bottom: 12px;
    padding: 16px;
    font-size: 1.125rem;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
}

.btn-call {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 16px;
    font-size: 1.125rem;
}

.btn-call:hover {
    background: var(--primary-dark);
}

.btn-call-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm, 12px);
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-top: 10px;
}
.btn-call-secondary:hover {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
}
.call-secondary-number {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: 400;
    margin-inline-start: 4px;
}

.post-page {
    padding: 48px 0;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 32px;
    text-align: center;
}

.property-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.furnishing-group {
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.furnishing-group.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
}

.required {
    color: var(--sell-badge);
}

.recommended {
    color: var(--gray-500);
    font-size: 0.8em;
    font-weight: normal;
    font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 181, 121, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Translation Field Styles */
.translation-field {
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.translation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.translation-header i {
    color: var(--gold);
    font-size: 1.1rem;
}

.translation-header span:first-of-type {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.translation-badge {
    background: linear-gradient(135deg, var(--gold) 0%, #c9a227 100%);
    color: var(--black);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.translation-input {
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.translation-input input {
    background: var(--surface);
    border: 1px solid var(--gray-300);
    font-size: 0.95rem;
}

.translation-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.15);
}

.translation-input i {
    color: var(--gray-500);
}

.translation-help {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
}

/* RTL Support for Translation Fields */
.rtl .translation-field {
    border-left: none;
    border-right: 3px solid var(--gold);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    transition: all 0.2s;
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.file-upload-label span {
    color: var(--gray-500);
}

/* Inline Photo Upload with Preview */
.photos-section {
    margin: 16px 0;
}

.file-upload-inline {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-100);
    min-height: 140px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.file-upload-inline.drag-over {
    border-color: var(--primary);
    background: rgba(37, 181, 121, 0.07);
    transform: scale(1.02);
}

.file-upload-inline.drag-over .file-upload-content i {
    color: var(--primary);
    animation: pulse 0.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.file-upload-inline input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload-inline .file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    min-height: 140px;
}

.file-upload-inline .file-upload-content i {
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 10px;
}

.file-upload-inline .file-upload-content span {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.file-upload-inline:hover {
    border-color: var(--primary);
    background: rgba(201, 162, 39, 0.05);
}

.file-upload-inline:hover .file-upload-content i {
    color: var(--primary);
}

.file-upload-inline .file-upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.file-upload-inline.has-preview .file-upload-preview {
    display: block;
}

.file-upload-inline .file-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload-inline .file-upload-preview .remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.2s;
}

.rtl .file-upload-inline .file-upload-preview .remove-preview {
    right: auto;
    left: 8px;
}

.file-upload-inline .file-upload-preview .remove-preview:hover {
    background: var(--sell-badge);
    transform: scale(1.1);
}

/* Multi Photo Preview Grid */
.file-upload-multi {
    min-height: 100px;
}

.file-upload-preview-grid {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    align-items: center;
}

.file-upload-inline.has-preview .file-upload-preview-grid {
    display: flex;
}

.file-upload-preview-grid .preview-item-small {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.file-upload-preview-grid .preview-item-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload-preview-grid .preview-item-small .remove-extra-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-upload-preview-grid .preview-item-small:hover .remove-extra-photo {
    opacity: 1;
}

[dir="rtl"] .file-upload-preview-grid .preview-item-small .remove-extra-photo {
    right: auto;
    left: 2px;
}

.file-upload-preview-grid .add-more-photos {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    border: 2px dashed var(--gray-300);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 24px;
    transition: all 0.2s;
}

.file-upload-preview-grid .add-more-photos:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 181, 121, 0.07);
}

.photo-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 11px;
    margin-left: 8px;
    animation: popIn 0.3s ease;
}

[dir="rtl"] .photo-count-badge {
    margin-left: 0;
    margin-right: 8px;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.file-upload-preview-grid .clear-all-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sell-badge);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.file-upload-preview-grid .clear-all-btn:hover {
    transform: scale(1.1);
}

/* Photos Tip Box */
.photos-tip {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    margin: 16px 0;
}

.photos-tip .tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.photos-tip .tip-icon i {
    font-size: 1.2rem;
}

.photos-tip .tip-content strong {
    color: var(--success);
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.photos-tip .tip-content p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Optional Photos Section */
.optional-photos {
    margin-top: 16px;
}

.optional-photos .section-header {
    margin-bottom: 16px;
}

.optional-photos .section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.95rem;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 20px;
}

.optional-photos .section-title i {
    color: var(--primary);
}

.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.form-divider span {
    font-weight: 600;
    color: var(--gray-600);
}

.btn-submit {
    margin-top: 16px;
    padding: 16px 32px;
    font-size: 1.125rem;
}

.location-section {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.05) 0%, rgba(201, 162, 39, 0.1) 100%);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius);
    padding: 24px;
    margin: 8px 0;
}

.location-section .section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.location-section .section-label i {
    font-size: 1.25rem;
    color: var(--primary);
}

.location-section .form-row {
    margin-bottom: 0;
}

.location-section .form-group label {
    color: var(--gray-700);
}

.location-section select,
.location-section input {
    background: var(--surface);
    border: 1px solid var(--gray-300);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    line-height: 1.5;
    box-sizing: border-box;
    height: 54px;
}

.location-section select:focus,
.location-section input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.15);
}

.location-section .form-help {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ── Bayut-style compact footer ── */
.footer-v2 {
    background-color: #1a1a1a;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 4px,
            rgba(255,255,255,0.03) 4px,
            rgba(255,255,255,0.03) 5px
        );
    color: var(--white);
    padding: 0;
}

.footer-v2-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 16px;
}

/* Top row */
.fv2-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.fv2-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fv2-links a {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}

.fv2-links a:hover {
    color: var(--white);
}

.fv2-sep {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    user-select: none;
}

.fv2-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Social circles */
.fv2-socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fv2-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.fv2-social-icon:hover {
    border-color: var(--white);
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

/* App badge buttons */
.fv2-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fv2-badge-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: var(--white);
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.fv2-badge-btn:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.07);
    color: var(--white);
}

.fv2-badge-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.fv2-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.fv2-badge-text small {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fv2-badge-text strong {
    font-size: 0.82rem;
    font-weight: 600;
}

/* Bottom row */
.fv2-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    flex-wrap: wrap;
}

.fv2-country {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.fv2-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.fv2-country-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.02em;
}

.fv2-caret {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.fv2-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin: 0;
}

.fv2-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.25s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
}
.fv2-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.fv2-top-btn:hover {
    background: #333;
    border-color: rgba(255,255,255,0.6);
    color: var(--white);
    box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

/* Mobile stacking */

.flash-messages {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-success {
    background: var(--success);
    color: var(--white);
}

.flash-error {
    background: var(--sell-badge);
    color: var(--white);
}

.success-banner {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--white);
    padding: 16px 20px;
    text-align: center;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.success-content i.fa-check-circle {
    font-size: 1.5rem;
}

.success-content span {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-banner {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 4px 8px;
    margin-left: auto;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-banner:hover {
    opacity: 1;
}

[dir="rtl"] .close-banner {
    margin-left: 0;
    margin-right: auto;
}

.search-form {
    background: var(--surface);
    padding: 0;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    max-width: 920px;
    width: 94%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    position: relative;
}

.hero-search-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Row 1: pill toggle + search input + search button ── */
.search-row-1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.type-pill-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.type-pill {
    padding: 9px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.type-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.type-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(37, 181, 121, 0.3);
}

.btn-search-inline {
    flex-shrink: 0;
    padding: 11px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-pill-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 50px;
    background: var(--gray-50);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 110px;
    max-width: 160px;
}

.rtl .filter-pill-select {
    padding: 8px 12px 8px 32px;
    background-position: left 10px center;
}

.filter-pill-select:hover {
    border-color: var(--primary);
    background-color: rgba(37, 181, 121, 0.04);
    color: var(--primary);
}

.filter-pill-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(37, 181, 121, 0.04);
}

.filter-pill-select option {
    background: var(--surface);
    color: var(--gray-700);
}

.filter-pill-price-range {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--gray-200);
    border-radius: 50px;
    background: var(--gray-50);
    overflow: hidden;
    padding: 0 8px;
    gap: 4px;
    transition: border-color 0.2s;
}

.filter-pill-price-range:focus-within {
    border-color: var(--primary);
    background-color: rgba(37, 181, 121, 0.04);
}

.filter-pill-price-input {
    width: 90px;
    padding: 8px 6px;
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700);
    outline: none;
}

.filter-pill-price-input::placeholder {
    color: var(--gray-400);
    font-size: 0.78rem;
}

.price-range-sep {
    color: var(--gray-400);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.more-filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 50px;
    background: var(--surface);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.more-filters-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.more-filters-toggle.active {
    border-color: var(--primary);
    background: rgba(37, 181, 121, 0.07);
    color: var(--primary);
}

.more-filters-chevron {
    font-size: 0.7rem;
    transition: transform 0.25s;
}

.more-filters-toggle.active .more-filters-chevron {
    transform: rotate(180deg);
}

.btn-clear-filters-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-clear-filters-inline:hover {
    background: #ef4444;
    color: white;
}

/* ── More filters panel ── */
.more-filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, opacity 0.25s;
    opacity: 0;
}

.more-filters-panel.open {
    max-height: 600px;
    opacity: 1;
    overflow-x: hidden;
    overflow-y: visible;
}

.more-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 4px;
    border-top: 1px solid var(--gray-100);
}

.more-filters-grid .filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.more-filters-grid .filter-item label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.more-filters-grid .filter-item input,
.more-filters-grid .filter-item select {
    padding: 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--surface);
    transition: border-color 0.2s;
}

.more-filters-grid .filter-item input:focus,
.more-filters-grid .filter-item select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-checkbox-item {
    grid-column: span 2;
}

.more-filters-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--gray-100);
}

/* More Filters sheet — base/desktop: new wrappers are transparent to grid layout */
.sheet-handle { display: none; }
.mf-section { display: contents; }
.mf-section-title { display: none; }
.mf-pair { display: contents; }
.mf-sep { display: none; }
.mf-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: span 2;
    cursor: pointer;
}
.mf-toggle-track { display: none; }

/* ── Responsive: search widget ── */

.search-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--primary);
    font-size: 1rem;
}

.rtl .search-input-wrapper i {
    left: auto;
    right: 16px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.rtl .search-input-wrapper input {
    padding: 14px 44px 14px 16px;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-type-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.type-option {
    flex: 1;
    cursor: pointer;
}

.type-option input {
    display: none;
}

.type-option span {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: all 0.2s;
}

.type-option input:checked + span {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.filters-toggle:hover {
    background: var(--gray-200);
}

.filters-toggle.active {
    background: var(--primary-light);
    color: var(--white);
}

.filters-toggle .toggle-arrow {
    transition: transform 0.3s;
}

.filters-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-filters {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.advanced-filters.open {
    max-height: 1000px;
    overflow-x: hidden;
    overflow-y: visible;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 4px;
    padding-bottom: 8px;
    overflow-x: hidden;
    box-sizing: border-box;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item input,
.filter-item select {
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--surface);
    transition: border-color 0.2s;
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-search {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    margin-top: 4px;
}

.filter-checkbox {
    grid-column: span 2;
    flex-direction: row !important;
    align-items: center;
}

.filter-checkboxes-row {
    grid-column: span 2;
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-checkboxes-row .filter-checkbox {
    grid-column: unset;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.checkbox-label:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(37, 181, 121, 0.06) 0%, rgba(37, 181, 121, 0.02) 100%);
    box-shadow: 0 4px 12px rgba(37, 181, 121, 0.12);
    transform: translateY(-1px);
}

.checkbox-label:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(37, 181, 121, 0.1) 0%, rgba(37, 181, 121, 0.04) 100%);
    box-shadow: 0 4px 12px rgba(37, 181, 121, 0.15);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label:has(input:checked) .checkbox-text {
    color: var(--primary-dark);
}

.checkbox-text i {
    color: var(--primary);
    font-size: 1rem;
}

.checkbox-label:has(input:checked) .checkbox-text i {
    color: var(--primary-dark);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--gray-200);
}

/* ── Restore last search bar ── */
.restore-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    padding: 10px 16px;
    margin-top: 12px;
    animation: restoreSlideDown 0.3s ease;
    flex-wrap: wrap;
}

@keyframes restoreSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.restore-bar-icon {
    color: var(--gold, #d4af37);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.restore-bar-text {
    color: rgba(255,255,255,0.88);
    font-size: 0.88rem;
    flex: 1;
    min-width: 0;
}

.restore-bar-btn {
    background: var(--gold, #d4af37);
    color: #111;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.restore-bar-btn:hover {
    background: #c9a227;
    transform: translateY(-1px);
}

.restore-bar-dismiss {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.restore-bar-dismiss:hover {
    color: rgba(255,255,255,0.9);
}

.btn-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: #ef4444;
    background: transparent;
    border: 1px solid #ef4444;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-clear-filters:hover {
    background: #ef4444;
    color: white;
}


/* Genius Search Styles */
.genius-search-form {
    position: relative;
    z-index: 100;
}

.genius-search-main {
    position: relative;
    flex: 1;
    z-index: 1000;
}

.genius-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s;
}

.genius-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 181, 121, 0.18);
    transform: none;
}

.genius-input-wrapper input {
    width: 100%;
    padding: 13px 44px 13px 48px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 0.95rem;
    background: transparent;
    transition: all 0.3s;
}

.rtl .genius-input-wrapper input {
    padding: 13px 48px 13px 44px;
}

.genius-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.genius-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
}

.rtl .genius-search-icon {
    left: auto;
    right: 20px;
}

.genius-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.2s;
}

.rtl .genius-clear-btn {
    right: auto;
    left: 16px;
}

.genius-clear-btn:hover {
    background: var(--gray-300);
    color: var(--gray-700);
}

.genius-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.genius-dropdown.open {
    max-height: 500px;
    opacity: 1;
    overflow-y: auto;
}

.genius-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.genius-section:last-child {
    border-bottom: none;
}

.genius-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

.genius-section-header i {
    margin-right: 6px;
    color: var(--primary);
}

.rtl .genius-section-header i {
    margin-right: 0;
    margin-left: 6px;
}

.genius-clear-history {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
}

.genius-clear-history:hover {
    text-decoration: underline;
}

.genius-items {
    display: flex;
    flex-direction: column;
}

.genius-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.genius-item:hover {
    background: var(--gray-50);
}

.genius-item i {
    width: 20px;
    color: var(--gray-400);
    text-align: center;
}

.genius-item span {
    flex: 1;
    color: var(--gray-700);
}

.genius-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

.genius-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.genius-preview-items {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.genius-preview-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    padding-right: 32px;
    background: var(--gray-50);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: visible;
}

.rtl .genius-preview-card {
    padding-right: 10px;
    padding-left: 32px;
}

.genius-preview-card:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.rtl .genius-preview-card:hover {
    transform: translateX(-4px);
}

.genius-preview-card img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
}

.genius-preview-placeholder {
    width: 60px;
    height: 45px;
    background: var(--gray-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.genius-preview-info {
    flex: 1;
}

.genius-preview-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.genius-preview-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.genius-preview-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.genius-featured-badge {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.85rem;
    background: rgba(200, 162, 83, 0.15);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.rtl .genius-featured-badge {
    right: auto;
    left: 10px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sort-dropdown select {
    height: 44px;
    padding: 0 36px 0 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: 25px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark, #222);
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.2s;
}

.sort-dropdown select:hover,
.sort-dropdown select:focus {
    border-color: var(--primary);
    outline: none;
}

.rtl .sort-dropdown select {
    padding: 0 16px 0 36px;
    background-position: left 14px center;
}

.btn-favorites {
    height: 44px;
    background: var(--primary);
    border: 2px solid var(--primary);
    color: #fff;
    padding: 0 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.btn-favorites i {
    color: #fff;
}

.btn-favorites:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    left: 10px;
    right: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
    z-index: 10;
    transition: all 0.2s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.featured-badge-premium ~ .favorite-btn {
    top: 50px;
}

.rtl .favorite-btn {
    left: auto;
    right: 10px;
}

.favorite-btn:hover {
    transform: scale(1.15);
    color: #ef4444;
}

.favorite-btn.active {
    color: #ef4444;
}

.property-card {
    position: relative;
}

.clear-tab {
    color: var(--sell-badge) !important;
    border-color: var(--sell-badge) !important;
}

.image-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.image-gallery .main-image {
    width: 100%;
    height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.image-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-gallery .main-image:hover img {
    transform: scale(1.02);
}

.image-gallery .main-image::after {
    content: '\f065';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-gallery .main-image:hover::after {
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-700);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    z-index: 5;
}

.gallery-nav:hover {
    background: var(--surface);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 12px;
}

.gallery-nav.next {
    right: 12px;
}

.rtl .gallery-nav.prev {
    left: auto;
    right: 12px;
}

.rtl .gallery-nav.next {
    right: auto;
    left: 12px;
}

.image-counter {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.rtl .image-counter {
    left: auto;
    right: 16px;
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scroll-behavior: smooth;
}

.thumbnail {
    width: 90px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    border: 3px solid transparent;
    flex-shrink: 0;
    transition: all 0.2s;
}

.thumbnail:hover {
    opacity: 0.9;
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

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

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;
    border-radius: 20px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: var(--sell-badge);
    color: var(--white);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

.favorite-btn-large {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-600);
}

.favorite-btn-large:hover {
    background: var(--surface);
    border-color: var(--sell-badge);
    color: var(--sell-badge);
}

.favorite-btn-large.active {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--sell-badge);
    color: var(--sell-badge);
}

.favorite-btn-large.active i {
    color: var(--sell-badge);
}

.current-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.current-image {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.current-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--sell-badge);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.delete-image-btn:hover {
    background: #dc2626;
}

.categorized-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.image-category-section {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.image-category-section.extra-section {
    grid-column: 1 / -1;
}

.image-category-section h4 {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-category-section h4 i {
    color: var(--primary);
}

.image-category-section .current-image {
    margin-bottom: 12px;
}

.current-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.no-image-placeholder {
    aspect-ratio: 4/3;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.no-image-placeholder i {
    font-size: 2rem;
    color: var(--gray-400);
}

.file-upload-small {
    padding: 8px;
}

.file-upload-small .file-upload-label {
    font-size: 0.85rem;
    padding: 8px 12px;
}

.file-upload-small .file-upload-label i {
    font-size: 0.9rem;
}

.image-preview-single {
    margin-top: 8px;
}

.image-preview-single .preview-item {
    max-width: 200px;
}

.delete-container {
    max-width: 500px;
}

.delete-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.preview-image {
    width: 120px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.preview-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--gray-700);
}

.preview-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.preview-price {
    color: var(--primary) !important;
    font-weight: 600;
}

.delete-buttons {
    display: flex;
    gap: 12px;
}

.pin-group {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    color: var(--gray-700);
}

.page-header h1 i {
    color: var(--sell-badge);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorites-page {
    padding: 48px 0;
    min-height: 60vh;
}

/* Upload Loading Overlay */
.upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.upload-modal {
    background: var(--surface);
    padding: 40px 50px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.upload-spinner {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.upload-modal h3 {
    color: var(--black);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.upload-modal p {
    color: var(--gray-500);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.upload-progress {
    background: var(--gray-200);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.upload-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Location Dropdowns - Cascading Selects */
.filter-item select,
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6860' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.rtl .filter-item select,
.rtl .form-group select {
    background-position: left 12px center;
    padding-right: 16px;
    padding-left: 36px;
}

.filter-item select:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.15);
}

.filter-item select option,
.form-group select option {
    padding: 12px;
}

.filter-item select:disabled,
.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--gray-100);
}

/* Authentication Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.auth-icon.whatsapp-green {
    color: #25D366;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Account Type Selector */
.account-type-selector {
    display: flex;
    gap: 12px;
}

.account-type-option {
    flex: 1;
    cursor: pointer;
}

.account-type-option input[type="radio"] {
    display: none;
}

.account-type-option .option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.2s;
}

.account-type-option .option-content i {
    font-size: 1.75rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.account-type-option .option-content span {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.9rem;
    text-align: center;
}

.account-type-option:hover .option-content {
    border-color: var(--primary-light);
}

.account-type-option.selected .option-content {
    border-color: var(--primary);
    background: rgba(201, 162, 39, 0.05);
}

.account-type-option.selected .option-content i {
    color: var(--primary);
}

.account-type-option.selected .option-content span {
    color: var(--primary-dark);
}

/* Agency Fields */
.agency-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.agency-fields textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.agency-fields textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 181, 121, 0.15);
}

/* WhatsApp Choice Selector */
.whatsapp-section {
    margin-top: 8px;
}

.whatsapp-choice-selector {
    display: flex;
    gap: 12px;
}

.whatsapp-choice-option {
    flex: 1;
    cursor: pointer;
}

.whatsapp-choice-option input[type="radio"] {
    display: none;
}

.whatsapp-choice-option .choice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.2s;
}

.whatsapp-choice-option .choice-content i {
    font-size: 1.25rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.whatsapp-choice-option .choice-content span {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.whatsapp-choice-option:hover .choice-content {
    border-color: var(--primary-light);
}

.whatsapp-choice-option.selected .choice-content {
    border-color: #25d366;
    background: rgba(37, 211, 102, 0.05);
}

.whatsapp-choice-option.selected .choice-content i {
    color: #25d366;
}

.whatsapp-choice-option.selected .choice-content span {
    color: var(--gray-800);
}

.whatsapp-number-field {
    margin-top: 12px;
}

.whatsapp-number-field .phone-input-wrapper {
    position: relative;
}

.whatsapp-number-field .whatsapp-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #25d366;
    font-size: 1.1rem;
}

.whatsapp-number-field .phone-input-wrapper input {
    padding-left: 40px !important;
}

/* Contact Choice Section for Agencies */
.contact-choice-section {
    margin-bottom: 16px;
}

.contact-choice-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.contact-choice-option {
    flex: 1;
    cursor: pointer;
}

.contact-choice-option input[type="radio"] {
    display: none;
}

.contact-choice-option .choice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.2s;
}

.contact-choice-option .choice-content i {
    font-size: 1.25rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.contact-choice-option .choice-content span {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.contact-choice-option:hover .choice-content {
    border-color: var(--primary-light);
}

.contact-choice-option.selected .choice-content {
    border-color: var(--primary);
    background: rgba(201, 162, 39, 0.05);
}

.contact-choice-option.selected .choice-content i {
    color: var(--primary);
}

.contact-choice-option.selected .choice-content span {
    color: var(--primary-dark);
}

.account-contact-info {
    margin-top: 8px;
}

.account-info-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.account-info-display .info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.account-info-display .info-item i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.account-info-display .info-item span {
    font-weight: 500;
}

.custom-contact-fields {
    margin-top: 8px;
}

/* Poster Type Selector (similar to account type) */
.poster-type-selector {
    display: flex;
    gap: 12px;
}

.poster-type-option {
    flex: 1;
    cursor: pointer;
}

.poster-type-option input[type="radio"] {
    display: none;
}

.poster-type-option .option-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.2s;
}

.poster-type-option .option-content i {
    font-size: 1.25rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.poster-type-option .option-content span {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.poster-type-option:hover .option-content {
    border-color: var(--primary-light);
}

.poster-type-option.selected .option-content {
    border-color: var(--primary);
    background: rgba(201, 162, 39, 0.05);
}

.poster-type-option.selected .option-content i {
    color: var(--primary);
}

.poster-type-option.selected .option-content span {
    color: var(--primary-dark);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.input-icon-wrapper input {
    flex: 1;
    width: 100%;
    padding-left: 40px !important;
}

.rtl .input-icon-wrapper i {
    left: auto;
    right: 14px;
}

.rtl .input-icon-wrapper input {
    padding-left: 16px !important;
    padding-right: 40px !important;
}

.input-icon-wrapper input:focus + i,
.input-icon-wrapper:focus-within i {
    color: var(--primary);
}

/* Textarea with Icon */
.textarea-icon-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.textarea-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 14px;
    color: var(--gray-400);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.textarea-icon-wrapper textarea {
    flex: 1;
    width: 100%;
    padding-left: 40px !important;
}

.textarea-icon-wrapper:focus-within i {
    color: var(--primary);
}

.rtl .textarea-icon-wrapper i {
    left: auto;
    right: 14px;
}

.rtl .textarea-icon-wrapper textarea {
    padding-left: 16px !important;
    padding-right: 40px !important;
}

/* Phone Input with Country Code */
.phone-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-code-select {
    width: 120px;
    min-width: 120px;
    padding: 12px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.1);
}

.phone-input-wrapper {
    flex: 1;
    position: relative;
}

.phone-input-wrapper input {
    width: 100%;
    padding-left: 16px;
}

.phone-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.1rem;
    z-index: 1;
    pointer-events: none;
}

.rtl .phone-input-wrapper input {
    padding-left: 16px;
    padding-right: 16px;
}

.rtl .phone-input-wrapper i {
    left: auto;
    right: 14px;
}

.rtl .phone-input-group {
    flex-direction: row-reverse;
}

.btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.auth-footer p {
    color: var(--gray-500);
    margin-bottom: 8px;
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-replit {
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: #000;
    border: none;
    font-weight: 600;
}

.btn-replit:hover {
    background: linear-gradient(135deg, #d4af37 0%, #e6c547 100%);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    transform: translateY(-1px);
}

.btn-replit i {
    font-size: 1.2rem;
}

.btn-google {
    background: #fff;
    color: #333;
    border-color: var(--gray-300);
}

.btn-google:hover {
    background: #f8f8f8;
    border-color: var(--gray-400);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google i {
    color: #4285F4;
    font-size: 1.2rem;
}

.btn-facebook {
    background: #1877F2;
    color: #fff;
}

.btn-facebook:hover {
    background: #166FE5;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.4);
}

.btn-facebook i {
    font-size: 1.2rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-200);
}

.divider span {
    padding: 0 16px;
    color: var(--gray-400);
    font-size: 0.9rem;
    text-transform: lowercase;
}

/* OTP Verification */
.otp-sent-message {
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.phone-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    direction: ltr;
}

.otp-input-container {
    display: flex;
    justify-content: center;
}

.otp-input {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    padding: 16px;
    font-family: monospace;
    font-weight: 700;
}

.resend-section {
    text-align: center;
    margin-top: 20px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Property Actions in My Properties */
.property-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--sell-badge);
    color: var(--white);
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    color: var(--gray-800);
}

.page-header h1 i {
    color: var(--primary);
}

/* ========================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ======================================== */

/* Viewport meta tag support */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Mobile-first base adjustments */

/* Extra small devices (phones in portrait) */

/* Agency Profile Page */
.agency-profile-page {
    padding: 32px 0 64px;
}

.agency-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.agency-header-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.agency-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.agency-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agency-logo i {
    font-size: 2.5rem;
    color: var(--white);
}

.agency-info h1 {
    font-size: 1.75rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.agency-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.verified-badge,
.agency-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.agency-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.agency-stats {
    display: flex;
    gap: 24px;
}

.agency-stats .stat-item {
    display: flex;
    flex-direction: column;
}

.agency-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.agency-stats .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.agency-about {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.agency-about h2 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.agency-about p {
    color: var(--gray-600);
    line-height: 1.7;
}

.agency-listings h2 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 20px;
}

.card-meta .view-count {
    color: var(--gray-400);
    font-size: 0.8rem;
}

/* Admin Dashboard Stats - Redesigned */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.admin-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-stat-icon i {
    font-size: 1.25rem;
    color: var(--white);
}

.admin-stat-icon.primary {
    background: linear-gradient(135deg, #c9a227 0%, #e6b93a 100%);
}

.admin-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.admin-stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.admin-stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.admin-stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.admin-stat-icon.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
}

.admin-stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.admin-stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
    letter-spacing: -1px;
}

.admin-stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 20px;
    width: fit-content;
}

.admin-stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.admin-stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.admin-stat-trend.neutral {
    background: var(--gray-100);
    color: var(--gray-500);
}

.admin-stat-trend i {
    font-size: 0.75rem;
}

.admin-stat-percent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-stat-percent .percent-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.admin-stat-percent .percent-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.admin-stat-percent .percent-fill.green {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.admin-stat-percent .percent-fill.orange {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.admin-stat-percent span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    min-width: 45px;
}

/* Analytics Dashboard */
.analytics-page {
    padding: 32px 0 64px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.analytics-header h1 {
    font-size: 1.75rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-header h1 i {
    color: var(--primary);
}

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

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(201, 162, 39, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-card .stat-content {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-700);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.analytics-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.analytics-section h2 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-section h2 i {
    color: var(--primary);
}

.top-properties-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-property-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.top-property-item .rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.top-property-item .property-image {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
}

.top-property-item .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-property-item .property-image .placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.top-property-item .property-info {
    flex: 1;
}

.top-property-item .property-info h3 {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.top-property-item .property-location {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.top-property-item .property-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.top-property-item .views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.top-property-item .price {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.properties-table {
    overflow-x: auto;
}

.properties-table table {
    width: 100%;
    border-collapse: collapse;
}

.properties-table th,
.properties-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.properties-table th {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    background: var(--gray-100);
}

.properties-table td {
    font-size: 0.9rem;
    color: var(--gray-700);
}

.properties-table .image-cell img {
    width: 50px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
}

.properties-table .placeholder-small {
    width: 50px;
    height: 38px;
    background: var(--primary-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.8rem;
}

.view-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(201, 162, 39, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.85rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--gray-500);
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.empty-state-small {
    padding: 40px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Ensure touch targets are at least 44px */

/* Template selector and save-as-template sections */
.template-selector-section {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    border: 2px dashed var(--gray-300);
}

.template-selector-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.template-selector-section label i {
    color: var(--primary);
}

.template-selector {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--surface);
    cursor: pointer;
}

.template-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.2);
}

.save-template-section {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.save-template-toggle {
    margin-bottom: 0;
}

.save-template-toggle .checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--white);
    font-weight: 600;
}

.save-template-toggle .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--white);
}

.save-template-toggle .checkbox-custom {
    display: none;
}

.template-name-field {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.template-name-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--white);
}

.template-name-field input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--surface);
}

.template-name-field input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* ================================================
   MY PROPERTIES PAGE - PROFESSIONAL AGENCY STYLING
   ================================================ */

.my-properties-section {
    padding: 40px 0 80px;
    min-height: calc(100vh - 200px);
}

.my-properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.my-properties-header .header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.my-properties-header .header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.my-properties-header .header-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.my-properties-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0;
}

.my-properties-header .header-subtitle {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 4px 0 0 0;
}

/* Stats Bar */
.properties-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.properties-stats .stat-item {
    background: var(--surface);
    padding: 20px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-width: 140px;
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.properties-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.properties-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.properties-stats .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ================================================
   FEATURED DASHBOARD - PREMIUM AGENCY STYLING
   ================================================ */

.featured-dashboard {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2b28 100%);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.featured-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.featured-dashboard-header {
    margin-bottom: 24px;
}

.featured-dashboard .dashboard-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.featured-dashboard .dashboard-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
}

.featured-dashboard .dashboard-icon i {
    font-size: 1.25rem;
    color: var(--white);
}

.featured-dashboard h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.featured-dashboard .dashboard-title-section p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0 0 0;
}

/* Featured Metrics Grid */
.featured-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.2s, background 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.metric-card .metric-icon {
    width: 44px;
    height: 44px;
    background: rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-card .metric-icon i {
    font-size: 1.1rem;
    color: var(--primary);
}

.metric-card .metric-content {
    display: flex;
    flex-direction: column;
}

.metric-card .metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.metric-card .metric-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.metric-card .metric-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(201, 162, 39, 0.3);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
}

.metric-card .metric-badge.full {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.metric-card.slots-available.empty .metric-value {
    color: #f87171;
}

/* Expiring Alert Banner */
.expiring-alert-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.expiring-alert-banner .alert-icon {
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expiring-alert-banner .alert-icon i {
    color: #fbbf24;
    font-size: 1rem;
}

.expiring-alert-banner .alert-content {
    flex: 1;
    color: var(--white);
    font-size: 0.95rem;
}

.expiring-alert-banner .alert-content strong {
    color: #fbbf24;
}

.expiring-alert-banner .alert-action {
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.expiring-alert-banner .alert-action:hover {
    background: rgba(251, 191, 36, 0.3);
}

/* Featured List Section */
.featured-list-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
}

.list-section-header {
    margin-bottom: 16px;
}

.list-section-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.list-section-header h4 i {
    color: var(--primary);
}

.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.featured-item-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, background 0.2s;
}

.featured-item-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.featured-item-card .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.featured-item-card .item-ad-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(201, 162, 39, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
}

.featured-item-card .status-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.featured-item-card .status-indicator.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.featured-item-card .status-indicator.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.featured-item-card .status-indicator.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.featured-item-card .status-indicator.expired {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.featured-item-card .item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.4;
}

.featured-item-card .item-featured-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-item-card .item-featured-date i {
    color: var(--primary);
    font-size: 0.7rem;
}

.featured-item-card .item-time-display {
    margin-bottom: 16px;
}

.featured-item-card .time-label {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.featured-item-card .time-label.expired {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.featured-item-card .time-label.no-limit {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.featured-item-card .time-countdown {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.featured-item-card .time-countdown.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.featured-item-card .time-countdown.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.featured-item-card .time-countdown.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.featured-item-card .item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.featured-item-card .btn-renew-item {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.featured-item-card .btn-renew-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.featured-item-card .status-active-badge {
    flex: 1;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.featured-item-card .btn-remove-feature {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.featured-item-card .btn-remove-feature:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Empty Featured State */
.empty-featured-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-featured-state .empty-icon {
    width: 64px;
    height: 64px;
    background: rgba(201, 162, 39, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.empty-featured-state .empty-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.empty-featured-state h4 {
    font-size: 1.1rem;
    color: var(--white);
    margin: 0 0 8px 0;
}

.empty-featured-state p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ================================================
   PROPERTY STATUS TABS & SECTIONS
   ================================================ */

.status-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 8px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    overflow-x: auto;
}

.status-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.status-tab:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.status-tab.active {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-tab.pending {
    color: #f59e0b;
}

.status-tab.pending.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
}

.status-tab.approved {
    color: #10b981;
}

.status-tab.approved.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
}

.status-tab.rejected {
    color: #ef4444;
}

.status-tab.rejected.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.tab-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Section Header Banners */
.section-header-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.pending-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.approved-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.rejected-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.banner-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pending-banner .banner-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
}

.approved-banner .banner-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
}

.rejected-banner .banner-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.banner-icon i {
    font-size: 1.5rem;
}

.banner-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 4px 0;
}

.banner-content p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

/* Status Ribbons on Cards */
.status-ribbon {
    position: absolute;
    top: 50px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.rtl .status-ribbon {
    left: auto;
    right: 12px;
}

.status-ribbon.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
}

.status-ribbon.approved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
}

.status-ribbon.rejected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

/* Rejection Reason Box */
.rejection-reason-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
}

.rejection-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 6px;
}

.rejection-text {
    font-size: 0.85rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.5;
}

/* Empty State Mini */
.empty-state-mini {
    text-align: center;
    padding: 48px 24px;
    background: var(--gray-100);
    border-radius: 16px;
    border: 2px dashed var(--gray-300);
}

.empty-state-mini i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.empty-state-mini p {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
}

/* Property Card Status Borders */
.my-property-card.status-pending {
    border: 2px solid rgba(245, 158, 11, 0.4);
}

.my-property-card.status-rejected {
    border: 2px solid rgba(239, 68, 68, 0.4);
    opacity: 0.9;
}

.my-property-card.status-approved {
    border: 2px solid rgba(16, 185, 129, 0.4);
}

/* Mobile responsiveness for tabs */

/* Extra small screens - even more compact */

/* ================================================
   PROPERTY CARDS GRID - PROFESSIONAL DESIGN
   ================================================ */

.my-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.my-property-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.my-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.my-property-card .card-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.my-property-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.my-property-card:hover .card-image {
    transform: scale(1.05);
}

.my-property-card .card-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-property-card .card-no-image i {
    font-size: 3rem;
    color: var(--gray-400);
}

/* Property Badges */
.my-property-card .property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.rtl .my-property-card .property-badge {
    left: auto;
    right: 12px;
}

.my-property-card .property-badge.rent {
    background: var(--rent-badge);
    color: var(--white);
}

.my-property-card .property-badge.sell {
    background: var(--sell-badge);
    color: var(--white);
}

.my-property-card .property-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: var(--white);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

body.rtl .my-property-card .property-category-badge {
    right: auto;
    left: 12px;
}

.my-property-card .featured-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    color: var(--white);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.4);
}

body.rtl .my-property-card .featured-badge {
    left: auto;
    right: 12px;
}

/* Card Body */
.my-property-card .card-body {
    padding: 20px;
}

.my-property-card .card-title-link {
    display: block;
    margin-bottom: 8px;
}

.my-property-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.my-property-card .card-title-link:hover .card-title {
    color: var(--primary);
}

.my-property-card .card-ad-number {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.my-property-card .card-ad-number i {
    color: var(--primary);
    font-size: 0.7rem;
}

.my-property-card .card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}

.my-property-card .price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.my-property-card .price-currency {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
}

.my-property-card .price-period {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.my-property-card .card-location {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.4;
}

.my-property-card .card-location i {
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.my-property-card .card-features {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--gray-200);
    margin-bottom: 12px;
}

.my-property-card .card-features .feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.my-property-card .card-features .feature i {
    color: var(--primary);
    font-size: 0.9rem;
}

.my-property-card .card-meta {
    display: flex;
    align-items: center;
}

.my-property-card .meta-date {
    font-size: 0.8rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 6px;
}

.my-property-card .meta-date i {
    font-size: 0.75rem;
}

/* Card Actions - Professional Button Group */
.my-property-card .card-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px 20px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.my-property-card .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    background: var(--surface);
    color: var(--gray-600);
    width: auto;
    height: auto;
}

.my-property-card .action-btn i {
    font-size: 1rem;
}

.my-property-card .action-btn span {
    display: block;
    line-height: 1.2;
}

.my-property-card .action-btn.view-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.my-property-card .action-btn.edit-btn:hover {
    background: rgba(201, 162, 39, 0.1);
    color: var(--primary);
}

.my-property-card .action-btn.feature-btn {
    background: rgba(201, 162, 39, 0.1);
    color: var(--primary);
}

.my-property-card .action-btn.feature-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.my-property-card .action-btn.unfeature-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    color: var(--white);
}

.my-property-card .action-btn.unfeature-btn:hover {
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    transform: translateY(-1px);
}

.my-property-card .action-btn.delete-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* Empty State Card */
.empty-state-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.empty-state-card .empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.3);
}

.empty-state-card .empty-icon i {
    font-size: 2rem;
    color: var(--white);
}

.empty-state-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0 0 12px 0;
}

.empty-state-card p {
    font-size: 1rem;
    color: var(--gray-500);
    margin: 0 0 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   FEATURE MODALS - PREMIUM STYLING
   ================================================ */

.feature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feature-modal.active {
    display: flex;
}

.feature-modal-content {
    background: var(--surface);
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-modal-content .modal-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.feature-modal-content .modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-modal-content .modal-icon.success {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.feature-modal-content .modal-icon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.feature-modal-content .modal-icon.renew {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.feature-modal-content .modal-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.feature-modal-content .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0;
}

.feature-modal-content .modal-body {
    padding: 24px;
}

.feature-modal-content .modal-body p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 16px 0;
    text-align: center;
}

.feature-modal-content .slot-info {
    background: var(--gray-100);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feature-modal-content .slot-info i {
    color: var(--primary);
}

.feature-modal-content .slot-info.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.feature-modal-content .slot-info.error i {
    color: #dc2626;
}

.feature-modal-content .slot-info.bonus {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.feature-modal-content .slot-info.bonus i {
    color: var(--gold);
}

/* Slot selection options for feature modal */
.feature-modal-content .slot-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.feature-modal-content .slot-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.feature-modal-content .slot-option:hover {
    background: var(--gray-200);
}

.feature-modal-content .slot-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.feature-modal-content .slot-option .slot-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.feature-modal-content .slot-option .slot-label i {
    color: var(--gray-500);
}

.feature-modal-content .slot-option.bonus {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(201, 162, 39, 0.15));
    border-color: rgba(201, 162, 39, 0.3);
}

.feature-modal-content .slot-option.bonus .slot-label i {
    color: var(--gold);
}

.feature-modal-content .slot-option.bonus:hover {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), rgba(201, 162, 39, 0.22));
}

.feature-modal-content .slot-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feature-modal-content .slot-option.disabled:hover {
    background: var(--gray-100);
}

.feature-modal-content .slot-option input[type="radio"]:checked + .slot-label i {
    color: var(--primary);
}

.feature-modal-content .slot-option.bonus input[type="radio"]:checked + .slot-label i {
    color: var(--gold);
}

.feature-modal-content .modal-footer {
    padding: 20px 24px 24px;
    display: flex;
    gap: 12px;
}

.feature-modal-content .btn-modal-cancel {
    flex: 1;
    padding: 14px 20px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.feature-modal-content .btn-modal-cancel:hover {
    background: var(--gray-200);
}

.feature-modal-content .btn-modal-confirm {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.feature-modal-content .btn-modal-confirm.success {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    color: var(--white);
}

.feature-modal-content .btn-modal-confirm.success:hover {
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    transform: translateY(-1px);
}

.feature-modal-content .btn-modal-confirm.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.feature-modal-content .btn-modal-confirm.danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.feature-modal-content .btn-modal-confirm.renew {
    background: linear-gradient(135deg, var(--primary) 0%, #d4af37 100%);
    color: var(--white);
}

.feature-modal-content .btn-modal-confirm.disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
}

/* Renew Modal Extras */
.renew-modal .renew-info,
.renew-modal .renew-bonus-info,
.renew-modal .renew-total-info {
    background: var(--gray-100);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.renew-modal .renew-info i,
.renew-modal .renew-bonus-info i,
.renew-modal .renew-total-info i {
    color: var(--primary);
}

.renew-modal .renew-bonus-info {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.renew-modal .renew-bonus-info i {
    color: #10b981;
}

.renew-modal .renew-total-info {
    background: rgba(201, 162, 39, 0.1);
    color: var(--primary-dark);
}

/* ================================================
   MY PROPERTIES RESPONSIVE STYLES
   ================================================ */

/* Owner Filter Banner - for viewing specific user's properties */
.owner-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 16px 24px;
    margin: 0 auto 20px auto;
    max-width: 1200px;
    width: calc(100% - 48px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.owner-filter-banner .owner-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.owner-filter-banner .owner-banner-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.owner-filter-banner .owner-banner-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold) 0%, #b8941d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.4rem;
}

.owner-filter-banner .owner-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.owner-filter-banner .owner-label {
    font-size: 0.85rem;
    color: #888;
}

.owner-filter-banner .owner-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
}

.owner-filter-banner .verified-badge {
    color: #22c55e;
    margin-left: 8px;
}

.owner-filter-banner .btn-clear-owner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.owner-filter-banner .btn-clear-owner:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
}

/* Clickable avatar and owner name links on property cards */
.card-avatar-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
    /* Note: No position: relative to preserve avatar's absolute positioning relative to card-content */
}

.card-avatar-link:hover .card-avatar,
.card-avatar:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.5), 0 3px 12px rgba(0,0,0,0.25);
}

.owner-name-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.owner-name-link:hover .owner-name {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Owner avatar link in property detail page */
.contact-card .owner-avatar-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
    position: relative;
}

.contact-card .owner-avatar-link:hover .owner-avatar {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
}

/* Small FB icon badge replacing the "Shared from Facebook" text in the card owner row */
.fb-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.facebook-source-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1877f2;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

.facebook-source-label i {
    font-size: 0.9rem;
    color: #1877f2;
}

.facebook-source-icon {
    color: #1877f2 !important;
    font-size: 1.3rem !important;
}

.card-avatar .facebook-source-icon {
    font-size: 1.1rem !important;
}

.owner-avatar .facebook-source-icon {
    font-size: 1.5rem !important;
}

.owner-name-link:hover .facebook-source-label {
    color: #166fe5;
    text-shadow: none;
}

.contact-card .owner-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: color 0.2s ease;
}

.contact-card .owner-name-link:hover .owner-name {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Ownership-review queue */
.ownership-review-list {
    display: grid;
    gap: 18px;
}

.ownership-review-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
}

.ownership-review-card__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.ownership-review-card h2 {
    margin: 9px 0 7px;
    font-size: 1.08rem;
    color: var(--text, #1f2937);
}

.ownership-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted, #64748b);
    font-size: 0.88rem;
    margin: 0;
}

.ownership-review-meta i { margin-right: 4px; }
.ownership-review-meta .fa-facebook { color: #1877f2; }

.source-identity-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    padding: 10px 12px;
    color: var(--text-muted, #64748b);
    background: rgba(24, 119, 242, 0.06);
    border: 1px solid rgba(24, 119, 242, 0.16);
    border-radius: 9px;
    font-size: 0.8rem;
}

.source-identity-panel strong {
    flex-basis: 100%;
    color: var(--text, #1f2937);
}

.source-identity-panel .fa-facebook { color: #1877f2; }

.source-identity-panel--compact {
    margin: 10px 0;
}

.source-identity-inline {
    color: #4f6f93 !important;
}

.source-identity-inline .fa-facebook {
    margin-right: 3px;
    color: #1877f2;
}

.ownership-review-reason {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9f1239;
    background: #fff1f2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.77rem;
    font-weight: 700;
}

.ownership-review-reason--ambiguous_match {
    color: #92400e;
    background: #fffbeb;
}

.ownership-review-reason--high_volume_claim {
    color: #5b21b6;
    background: #f5f3ff;
}

.ownership-review-card--grouped {
    border-color: rgba(109, 40, 217, 0.24);
}

.ownership-review-view {
    color: var(--primary, #168a69);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.ownership-existing-owner,
.ownership-anonymous-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px;
    margin: 18px 0;
    border-radius: 9px;
    line-height: 1.45;
    font-size: 0.9rem;
}

.ownership-existing-owner {
    color: #7c2d12;
    background: #fff7ed;
}

.ownership-anonymous-note {
    color: #1e40af;
    background: #eff6ff;
}

.ownership-resolution-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 16px;
}

.ownership-resolution-form label {
    display: block;
    flex: 1 0 100%;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text, #1f2937);
}

.ownership-resolution-form select {
    flex: 1 1 260px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    background: var(--input-bg, #fff);
    color: var(--text, #1f2937);
}

.ownership-resolution-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ownership-group-form {
    display: grid;
    align-items: stretch;
}

.ownership-group-list {
    min-width: 0;
    max-height: 430px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #dbe3ea);
    border-radius: 10px;
    padding: 10px;
    background: var(--input-bg, #fff);
}

.ownership-group-list legend {
    padding: 0 7px;
    color: var(--text, #1f2937);
    font-size: 0.82rem;
    font-weight: 700;
}

.ownership-group-item {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.ownership-group-item + .ownership-group-item {
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.ownership-group-item:hover {
    background: rgba(109, 40, 217, 0.05);
}

.ownership-group-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #168a69);
}

.ownership-group-item__body {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.ownership-group-item__body strong {
    color: var(--text, #1f2937);
    overflow-wrap: anywhere;
}

.ownership-group-item__body span {
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
}

.ownership-assign-btn { background: var(--primary, #168a69); color: #fff; }
.ownership-anonymous-btn { background: #fff; border: 1px solid #94a3b8; color: #334155; }

.ownership-claim-pending-banner {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 13px 16px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #4c1d95;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
}

.ownership-claim-pending-banner > i {
    margin-top: 3px;
}

.ownership-claim-pending-banner div {
    display: grid;
    gap: 2px;
}

.ownership-claim-pending-banner strong {
    color: #4c1d95;
}

.ownership-claim-pending-banner span {
    color: #6d28d9;
    line-height: 1.45;
}

.ownership-review-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-muted, #64748b);
}

.ownership-review-empty > i { color: var(--primary, #168a69); font-size: 2.3rem; }
.ownership-review-empty h2 { color: var(--text, #1f2937); margin: 12px 0 7px; }

@media (max-width: 640px) {
    .ownership-review-card { padding: 16px; }
    .ownership-review-card__header { display: block; }
    .ownership-review-view { display: inline-block; margin-top: 12px; }
    .ownership-resolution-form { align-items: stretch; }
    .ownership-resolution-form select { flex-basis: 100%; width: 100%; }
    .ownership-resolution-actions .btn { flex: 1 1 100%; }
    .ownership-group-item { grid-template-columns: auto minmax(0, 1fr); }
    .ownership-group-item .ownership-review-view {
        grid-column: 2;
        margin-top: 2px;
        justify-self: start;
    }
}

/* ================================================
   TINDER-STYLE MODERATION INTERFACE
   ================================================ */

.tinder-moderation-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.tinder-progress {
    text-align: center;
    margin-bottom: 24px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.progress-text .current-index {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.tinder-progress .progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.tinder-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #d4af37 100%);
    transition: width 0.4s ease;
}

.tinder-card-stack {
    position: relative;
    min-height: 600px;
}

.tinder-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.tinder-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    z-index: 10;
}

.tinder-card-images {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--gray-200);
}

.tinder-card-images img.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tinder-card-images .no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
}

.tinder-card-images .no-image-placeholder i {
    font-size: 4rem;
    color: var(--gray-500);
}

.card-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
}

.card-badges .type-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-badges .type-badge.rent {
    background: var(--rent-badge);
    color: var(--white);
}

.card-badges .type-badge.sell {
    background: var(--sell-badge);
    color: var(--white);
}

.card-badges .category-badge {
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.image-count {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.checkbox-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}

.checkbox-overlay input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary);
}

.tinder-card-content {
    padding: 20px 24px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.property-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.property-price {
    text-align: right;
    white-space: nowrap;
}

.property-price .price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.property-price .price-currency {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.property-price .price-period {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.property-location i {
    color: var(--primary);
}

.property-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 12px;
}

.property-features .feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.property-features .feature i {
    color: var(--primary);
}

.property-description {
    margin-bottom: 12px;
}

.property-description h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px 0;
}

.property-description p {
    color: var(--gray-700);
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

.owner-info-section {
    padding: 12px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(201, 162, 39, 0.05) 100%);
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, 0.2);
    margin-bottom: 12px;
}

.owner-info-section h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.owner-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.owner-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.owner-detail i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.property-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.property-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.property-meta .meta-item i {
    color: var(--gray-400);
}

.tinder-card-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.swipe-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.swipe-btn.reject-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.swipe-btn.reject-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.swipe-btn.view-btn {
    background: var(--surface);
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.swipe-btn.view-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.swipe-btn.approve-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
}

.swipe-btn.approve-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.tinder-navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.nav-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: var(--surface);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.view-toggle-section {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--gray-300);
    background: var(--surface);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-600);
}

.view-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.view-toggle-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

/* Rejection Modal Styles */
.rejection-modal {
    max-width: 500px;
}

.rejection-modal .modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.rejection-modal .modal-close {
    color: var(--white);
}

.rejection-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    color: #dc2626;
    margin-bottom: 16px;
}

.rejection-warning i {
    font-size: 1.2rem;
}

.quick-reasons {
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.quick-reasons p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.quick-reasons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-reason-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-700);
    text-align: center;
    line-height: 1.3;
}

.quick-reason-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.moderation-empty {
    padding: 80px 24px;
}

.moderation-empty .empty-icon-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moderation-empty .empty-icon-large i {
    font-size: 3rem;
    color: var(--white);
}

.moderation-empty h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 8px;
}

.moderation-empty p {
    color: var(--gray-500);
    max-width: 400px;
    margin: 0 auto;
}

/* Mobile responsiveness for Tinder moderation */

/* ================================================
   NOTIFICATION BADGE STYLES
   ================================================ */

.notification-link {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notification-mobile-link {
    position: relative;
}

.notification-badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

body.rtl .notification-badge-mobile {
    margin-left: 0;
    margin-right: 8px;
}

/* ================================================
   MODAL OVERLAY - PROPER POSITIONING
   ================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.modal-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

body.rtl .modal-footer {
    flex-direction: row-reverse;
}

/* ================================================
   TOAST NOTIFICATIONS - GLASSMORPHISM STYLE
   ================================================ */

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 90vw;
    width: 420px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-hiding {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    filter: blur(2px);
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.toast-error .toast-icon,
.toast-danger .toast-icon {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, var(--primary-gold) 0%, #c9a227 100%);
    color: var(--black);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
    display: block;
}

.toast-close {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--gray-700);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toast-progress linear forwards;
}

.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10B981, #059669);
}

.toast-error .toast-progress-bar,
.toast-danger .toast-progress-bar {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, #F59E0B, #D97706);
}

.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, var(--primary-gold), #c9a227);
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Dark mode support for glassmorphism */

/* RTL Support */
body.rtl #toast-container {
    direction: rtl;
}

body.rtl .toast-progress-bar {
    transform-origin: right;
}

/* Mobile Responsiveness */

/* Status Update Toast - Mobile Banner Style (like iPhone/Android notifications) */
.status-update-toast {
    position: fixed;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    max-width: 420px;
    width: calc(100% - 32px);
    
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    
    /* Mobile: Slide from top (like iPhone/Android banners) */
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-update-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Desktop: Bottom-right position */

/* Toast icon */
.status-update-toast .toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Approved (green) styling */
.status-update-toast.approved {
    border-left: 4px solid #10B981;
}

.status-update-toast.approved .toast-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Rejected (red) styling */
.status-update-toast.rejected {
    border-left: 4px solid #EF4444;
}

.status-update-toast.rejected .toast-icon {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Toast content */
.status-update-toast .toast-content {
    flex: 1;
    min-width: 0;
}

.status-update-toast .toast-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.status-update-toast .toast-message {
    font-size: 0.85rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Close button */
.status-update-toast .toast-close {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.2s;
}

.status-update-toast .toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--gray-600);
}

/* RTL support */
body.rtl .status-update-toast {
    border-left: none;
    border-right: 4px solid;
}

body.rtl .status-update-toast.approved {
    border-right-color: #10B981;
}

body.rtl .status-update-toast.rejected {
    border-right-color: #EF4444;
}

/* ============================================
   Agency Contact Feedback Modal
   ============================================ */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.feedback-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feedback-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.feedback-modal-overlay.active .feedback-modal {
    transform: scale(1) translateY(0);
}

.feedback-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s;
}

body.rtl .feedback-close {
    right: auto;
    left: 16px;
}

.feedback-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.feedback-header {
    text-align: center;
    margin-bottom: 24px;
}

.feedback-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feedback-icon i {
    font-size: 28px;
    color: white;
}

.feedback-header h3 {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.feedback-subtitle {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0;
}

.feedback-subtitle strong {
    color: var(--gold);
}

.feedback-body {
    margin-bottom: 24px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.star-rating .star {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.star-rating .star i {
    font-size: 36px;
    color: var(--gray-300);
    transition: all 0.2s;
}

.star-rating .star:hover i,
.star-rating .star.hover i {
    color: #FCD34D;
    transform: scale(1.1);
}

.star-rating .star.selected i {
    color: #F59E0B;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.feedback-comment {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    resize: none;
    transition: all 0.2s;
    font-family: inherit;
}

.feedback-comment:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 181, 121, 0.1);
}

.feedback-footer {
    display: flex;
    gap: 12px;
}

.btn-feedback-skip {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-feedback-skip:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-feedback-submit {
    flex: 2;
    padding: 14px 20px;
    border: none;
    background: linear-gradient(135deg, var(--gold) 0%, #c9a227 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-feedback-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-feedback-submit:disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

.feedback-report-toggle {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.btn-report-toggle {
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.2s;
}

.btn-report-toggle:hover {
    color: #ef4444;
}

.btn-report-toggle i {
    margin-right: 6px;
}

.report-section {
    margin-top: 16px;
    padding: 20px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #ef4444;
}

.report-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.report-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.report-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    background: white;
    cursor: pointer;
}

.report-select:focus {
    outline: none;
    border-color: var(--gold);
}

.report-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.report-textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-submit-report {
    width: 100%;
    padding: 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-report:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-submit-report:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

/* Already Reported Notice */
.already-reported-notice {
    text-align: center;
    padding: 24px 16px;
}

.already-reported-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease-out;
}

.already-reported-icon i {
    font-size: 28px;
    color: white;
}

.already-reported-notice p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Report Phone Section */
.report-phone-section {
    margin-bottom: 16px;
}

.report-phone-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.report-phone-section label .required {
    color: #ef4444;
}

.phone-input-group {
    display: flex;
    gap: 8px;
}

.country-code-select {
    width: 120px;
    padding: 12px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--gold);
}

.report-phone-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
}

.report-phone-input:focus {
    outline: none;
    border-color: var(--gold);
}

.phone-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-400);
}

/* Minimized feedback section when report is open */
.feedback-header.minimized {
    padding: 8px 0;
}

.feedback-header.minimized .feedback-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
    margin-bottom: 4px;
}

.feedback-header.minimized h3 {
    font-size: 14px;
    margin-bottom: 2px;
}

.feedback-header.minimized .feedback-subtitle {
    font-size: 11px;
    margin-bottom: 0;
}

.feedback-content-wrapper {
    transition: all 0.3s ease;
}

.feedback-content-wrapper.minimized {
    transform: scale(0.85);
    transform-origin: top center;
    margin-bottom: -20px;
}

.feedback-content-wrapper.minimized .feedback-body {
    padding: 8px 0;
}

.feedback-content-wrapper.minimized .star-rating {
    gap: 4px;
    margin-bottom: 4px;
}

.feedback-content-wrapper.minimized .star-rating .star {
    width: 28px;
    height: 28px;
}

.feedback-content-wrapper.minimized .star-rating .star i {
    font-size: 18px;
}

.feedback-content-wrapper.minimized .rating-labels {
    font-size: 10px;
    margin-bottom: 6px;
}

.feedback-content-wrapper.minimized .feedback-comment {
    padding: 8px;
    font-size: 12px;
    rows: 2;
}

.feedback-content-wrapper.minimized .feedback-footer {
    padding: 8px 0;
    gap: 8px;
}

.feedback-content-wrapper.minimized .btn-feedback-skip,
.feedback-content-wrapper.minimized .btn-feedback-submit {
    padding: 8px 16px;
    font-size: 12px;
}

/* Make report section more compact */
.report-section {
    margin-top: 8px;
    padding: 12px;
}

.report-header {
    margin-bottom: 10px;
}

.report-header h4 {
    font-size: 14px;
}

.report-form label {
    margin-bottom: 4px;
    font-size: 12px;
}

.report-select,
.report-textarea {
    padding: 8px;
    font-size: 13px;
}

.report-textarea {
    min-height: 50px;
}

.btn-submit-report {
    padding: 10px 16px;
    font-size: 13px;
}

/* ============================================
   Property Status Check Modal
   ============================================ */
.status-check-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.status-check-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-check-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.status-check-modal-overlay.active .status-check-modal {
    transform: scale(1) translateY(0);
}

.status-check-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s;
}

body.rtl .status-check-close {
    right: auto;
    left: 16px;
}

.status-check-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.status-check-header {
    text-align: center;
    margin-bottom: 20px;
}

.status-check-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold) 0%, #D4AF37 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.status-check-icon i {
    font-size: 28px;
    color: white;
}

.status-check-header h3 {
    font-size: 1.4rem;
    color: var(--gray-800);
    margin: 0 0 8px;
    font-weight: 600;
}

.status-check-question {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
}

.status-check-property {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.status-check-property-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: var(--gray-200);
    flex-shrink: 0;
}

.status-check-property-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.status-check-ad-number {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
}

.status-check-title {
    font-size: 0.95rem;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-check-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-status-yes {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-status-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-status-yes:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-status-no {
    width: 100%;
    padding: 14px 20px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-status-no:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.btn-status-no:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-check-result {
    text-align: center;
    padding: 20px 0;
}

.status-check-result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease-out;
}

.status-check-result-icon i {
    font-size: 32px;
    color: white;
}

.status-check-result p {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin: 0;
}

/* RTL Support for Status Check Modal */
body.rtl .status-check-property {
    flex-direction: row-reverse;
}

body.rtl .status-check-property-info {
    text-align: right;
}

/* Mobile Responsive */

/* ============================================================
   MOBILE BAYUT-STYLE REDESIGN (Task #33)
   Scoped to ≤768px. Desktop must stay unchanged.
   ============================================================ */

/* Always-visible mobile-only and desktop-only helpers */
.mobile-only { display: none; }

/* ── 1. Header: lang/globe (lead) · centered logo · hamburger (trail) ── */

/* ── 2. Hero: taller video + overlapping search card (Bayut mobile pattern) ── */

/* ── 3. Search widget: full-width stacked segments ── */

/* ── 4. More-Filters becomes BOTTOM SHEET on mobile ── */


.more-filters-panel-header { display: none; }
.btn-apply-filters { display: none; }

/* ── 8. Mobile property card polish ── */

/* (c) Hero video play/pause centered overlay (mobile only) */
.hero-video-toggle { display: none; }

/* ============================================================
   TASK #37 — Mobile filter bars: single horizontal scroll lane
   (Bayut.eg style). Applies to both the hero filter row and the
   listings inline filter bar. Overrides all previous mobile
   stacking / column / full-width rules.
   ============================================================ */

/* ── Base (all viewports): mobile-price-pill-trigger is hidden on desktop */
.mobile-price-pill-trigger { display: none; }
/* ── Base: mobile-price-field (price inputs in More Filters) hidden on desktop */
.mobile-price-field { display: none !important; }
/* ── Base: the dot indicator on price pill */
.price-pill-dot { color: var(--primary); font-weight: 900; }

/* ── Sidebar listings layout + clean hero ── */

/* ── 1. Hero: clean two-pill layout ── */
.hero-search-body {
    padding: 0;
}
.type-pill-toggle {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.search-row-1 {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.search-row-1 .type-pill {
    padding: 9px 20px;
    border-radius: 8px;
    border: 2px solid var(--gray-200);
    background: var(--surface);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.search-row-1 .type-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.search-row-1 .type-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

/* ── 3. Single-lane filter bar ── */

/* ── 4. Filter lane styles ── */

/* Wrapper — sticky bar sitting between hero and listings */
.filter-lane-wrap {
    position: sticky;
    top: var(--navbar-h);
    z-index: 120;
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: none;
}

/* Mobile meta bar — hidden on desktop by default; desktop override below */
.mobile-meta-bar { display: none; }
/* Favorites text label — hidden on mobile, shown on desktop via media query */
.meta-fav-label { display: none; }
/* Search-mode stacking: filter bar sits below results-search-row on ALL viewports */
body.has-results-row .filter-lane-wrap {
    top: calc(var(--navbar-h) + var(--results-row-h, 0px));
}

/* The form: one horizontal flex row; scroll only on mobile */
.filter-lane {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    overflow: visible;
    position: relative;
}
.filter-lane::-webkit-scrollbar { display: none; }
.filter-lane > * { flex-shrink: 0; }

/* LTR desktop: let the filter pill row scroll instead of truncating */
html[dir="ltr"] .filter-lane {
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
    scrollbar-width: none;
    /* No trailing padding — scroll ends exactly at the last button */
    padding-inline-end: 0;
}
html[dir="ltr"] .filter-lane::-webkit-scrollbar { display: none; }

/* LTR desktop: edge-fade hints on filter-lane-wrap */
/* position:sticky (base) already creates a containing block — no relative needed */

html[dir="ltr"] .filter-lane-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 48px; height: 100%;
    background: linear-gradient(to left, var(--filter-fade-bg, #fff) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.2s;
}
html[dir="ltr"] .filter-lane-wrap.fl-at-end::after { opacity: 0; }

html[dir="ltr"] .filter-lane-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 48px; height: 100%;
    background: linear-gradient(to right, var(--filter-fade-bg, #fff) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
}
html[dir="ltr"] .filter-lane-wrap.fl-scrolled::before { opacity: 1; }

/* LTR desktop: pin the For Rent/For Sale toggle — it stays at the left edge
   while the rest of the filter pills scroll past it */
@media (min-width: 769px) {
    html[dir="ltr"] .fl-type-group {
        position: sticky;
        left: 0;
        background: var(--filter-fade-bg, #fff);
        z-index: 3;
        padding-right: 6px;
    }
}

/* Type pills grouped in a toggle group */
.fl-type-group {
    display: inline-flex;
    background: var(--gray-100);
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}
.fl-type-pill {
    border: none;
    background: transparent;
    color: var(--gray-600);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.fl-type-pill:hover { background: rgba(255,255,255,0.6); color: var(--gray-800); }
.fl-type-pill.active {
    background: var(--primary);
    color: var(--dark);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Select pills — pill-shaped native selects */
.fl-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 30px 8px 14px;
    border-radius: 50px;
    border: 1.5px solid var(--gray-200);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.15s;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
}
.fl-select:focus { border-color: var(--primary); outline: none; box-shadow: none; }
.fl-select.fl-active {
    border-color: var(--primary);
    color: var(--primary);
    /* font-weight intentionally kept at 500 — changing weight resizes <select> elements */
}
html[dir="rtl"] .fl-select {
    background-position: left 12px center;
    padding: 8px 14px 8px 30px;
}

/* ── Per-filter ✕ wrapper ── */
.fl-sel-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}
/* Active select: suppress the dropdown arrow — ✕ occupies that slot */
.fl-sel-wrap .fl-select.fl-active { background: var(--surface) !important; }
/* ✕ clear button — absolutely positioned in the trailing arrow slot */
.fl-sel-x {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
    cursor: pointer;
    transition: color 0.15s;
    background: var(--surface);
    border-radius: 0 50px 50px 0;
}
.fl-sel-x:hover,
.fl-sel-x:focus { color: #e53e3e; outline: none; }
html[dir="rtl"] .fl-sel-x { right: auto; left: 0; border-radius: 50px 0 0 50px; }

/* Shared pill base */
.fl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--gray-200);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.fl-pill:hover { border-color: var(--primary); color: var(--primary); }
.fl-pill.active {
    background: rgba(212,175,55,0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

/* More Filters wrapper — relative so desktop dropdown anchors here */
.fl-more-wrap { position: relative; flex-shrink: 0; }

/* Active dot badge */
.fl-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* Clear-all × button */
.fl-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--gray-200);
    background: var(--surface);
    color: var(--gray-400);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.15s;
}
.fl-clear-btn:hover { border-color: var(--gray-400); color: var(--gray-700); }

/* ── Professional More Filters Dropdown (desktop) ── */
/* Hide when closed — bypasses the base max-height:0 animation trick */
.fl-more-wrap .more-filters-panel:not(.open) {
    display: none !important;
}
.fl-more-wrap .more-filters-panel.open {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
    width: 680px !important;
    min-width: 680px !important;
    max-width: 680px !important;
    max-height: calc(100vh - 180px) !important;
    transition: none !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.06), 0 20px 52px rgba(0,0,0,0.16);
    z-index: 200;
    animation: flDropDown 0.2s cubic-bezier(0.16,1,0.3,1);
    padding: 0;
}
html[dir="rtl"] .fl-more-wrap .more-filters-panel.open { left: 0 !important; right: auto !important; }

/* Click-outside backdrop for desktop */
.fl-more-wrap .mf-backdrop.active {
    display: block !important;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 199;
}

/* Header */
.fl-more-wrap .more-filters-panel.open .more-filters-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
    background: var(--surface);
    z-index: 2;
}
.fl-more-wrap .more-filters-panel.open .more-filters-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
    font-size: 0.75rem;
    transition: background 0.15s, color 0.15s;
}
.fl-more-wrap .more-filters-panel.open .more-filters-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Grid → 2-column layout, no scrolling needed */
.fl-more-wrap .more-filters-panel.open .more-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    border: none;
}

/* Each section */
.fl-more-wrap .more-filters-panel.open .mf-section {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-100);
    border-right: 1px solid var(--gray-100);
}
.fl-more-wrap .more-filters-panel.open .mf-section:nth-child(even) {
    border-right: none;
}
/* Toggles + actions always span full width */
.fl-more-wrap .more-filters-panel.open .mf-section.mf-toggles {
    grid-column: 1 / -1;
    border-right: none;
}
.fl-more-wrap .more-filters-panel.open .mf-section-title {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 6px;
}

/* Min/Max pairs */
.fl-more-wrap .more-filters-panel.open .mf-pair {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.fl-more-wrap .more-filters-panel.open .mf-pair .filter-item { flex: 1; min-width: 0; }
.fl-more-wrap .more-filters-panel.open .mf-sep {
    display: flex;
    align-items: flex-end;
    padding-bottom: 6px;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Field items */
.fl-more-wrap .more-filters-panel.open .filter-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.fl-more-wrap .more-filters-panel.open .filter-item label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fl-more-wrap .more-filters-panel.open .filter-item input,
.fl-more-wrap .more-filters-panel.open .filter-item select {
    padding: 6px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.84rem;
    background: var(--bg);
    color: var(--text);
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fl-more-wrap .more-filters-panel.open .filter-item input:focus,
.fl-more-wrap .more-filters-panel.open .filter-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
    background: var(--surface);
}

/* Toggle rows */
.fl-more-wrap .more-filters-panel.open .mf-toggles {
    padding: 0;
    border-bottom: none;
}
.fl-more-wrap .more-filters-panel.open .mf-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.84rem;
    color: var(--text);
    grid-column: auto;
    transition: background 0.12s;
    gap: 0;
}
.fl-more-wrap .more-filters-panel.open .mf-toggle-label:last-child { border-bottom: none; }
.fl-more-wrap .more-filters-panel.open .mf-toggle-label:hover { background: var(--gray-50, rgba(0,0,0,0.02)); }
.fl-more-wrap .more-filters-panel.open .mf-toggle-label > span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fl-more-wrap .more-filters-panel.open .mf-toggle-label input[type="checkbox"] { display: none; }
.fl-more-wrap .more-filters-panel.open .mf-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--gray-200);
    border-radius: 12px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}
.fl-more-wrap .more-filters-panel.open .mf-toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
}
.fl-more-wrap .more-filters-panel.open .mf-toggle-label input:checked ~ .mf-toggle-track { background: var(--primary); }
.fl-more-wrap .more-filters-panel.open .mf-toggle-label input:checked ~ .mf-toggle-track::after { transform: translateX(20px); }

/* Actions bar — always at bottom */
.fl-more-wrap .more-filters-panel.open .more-filters-actions {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid var(--gray-100);
    margin-top: 0;
    position: static;
    background: var(--surface);
    box-shadow: none;
    z-index: 2;
    flex-shrink: 0;
}
.fl-more-wrap .more-filters-panel.open .btn-apply-filters {
    display: block;
    flex: 1;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s;
    text-align: center;
}
.fl-more-wrap .more-filters-panel.open .btn-apply-filters:hover { opacity: 0.88; }
.fl-more-wrap .more-filters-panel.open .btn-clear-filters {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.87rem;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.fl-more-wrap .more-filters-panel.open .btn-clear-filters:hover {
    border-color: var(--gray-400);
    color: var(--gray-800);
}

@keyframes flDropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RTL for lane ── */
html[dir="rtl"] .filter-lane { flex-direction: row-reverse; }
html[dir="rtl"] .fl-type-group { flex-direction: row-reverse; }

/* ── 5a. Near-breakpoint desktop safeguard (769px–1100px) ── */

/* ── 5. Mobile overrides (≤768px) ── */

@keyframes slideUpSheet {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}



/* ─────────────────────────────────────────────────────────────
   COMPONENT RESPONSIVE OVERRIDES
   Migrated from inline positions. Grouped by breakpoint.
   Overridden by the Responsive System section that follows.
   ───────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(30, 30, 30, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .toast-message {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .toast-close {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.6);
    }
    
    .toast-close:hover {
        background: rgba(255, 255, 255, 0.15);
        color: rgba(255, 255, 255, 0.9);
    }
}

@media (min-width: 769px) {
    .ad-card.in-view:not(:hover) .ad-overlay {
        padding-top: 60px;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .ad-card.in-view:not(:hover) .ad-description {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
        transform: translateY(10px);
    }
    .status-update-toast {
        top: auto;
        bottom: 24px;
        left: auto;
        right: 24px;
        transform: translateX(120%);
    }
    
    .status-update-toast.show {
        transform: translateX(0);
    }
    body.rtl .status-update-toast {
        right: auto;
        left: 24px;
        transform: translateX(-120%);
    }
    
    body.rtl .status-update-toast.show {
        transform: translateX(0);
    }
}

/* In-between desktop band (769px–1100px) is handled by the dedicated
   single-scroll-lane block appended at the end of this file. */

@media (max-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-content {
        grid-template-columns: 1fr;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .my-properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .featured-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links, .lang-toggle {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    .carousel-arrow {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-dot {
        width: 4px !important;
        height: 4px !important;
        min-width: 4px !important;
        min-height: 4px !important;
        max-width: 4px !important;
        max-height: 4px !important;
    }
    .footer-v2-inner {
        padding: 18px 16px 14px;
    }
    .fv2-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .fv2-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    .fv2-badges {
        flex-wrap: wrap;
    }
    .fv2-bottom {
        flex-wrap: wrap;
        gap: 8px;
    }
    .fv2-copy {
        flex: 1 1 100%;
        text-align: center;
    }
    /* TOP button is fixed viewport — no flex order needed */
    .fv2-top-btn {
        bottom: 16px;
        right: 16px;
    }
    .search-row-1 {
        flex-wrap: wrap;
        gap: 8px;
    }

    .type-pill-toggle {
        order: 1;
        width: 100%;
        justify-content: flex-start;
    }

    .search-main.genius-search-main {
        order: 2;
        width: 100%;
        flex: none;
    }

    .btn-search-inline {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .btn-search-label {
        display: inline;
    }

    .filter-pill-select {
        min-width: calc(50% - 3px);
        max-width: calc(50% - 3px);
        flex: none;
    }

    .filter-pill-price-range {
        width: 100%;
        flex: none;
    }

    .filter-pill-price-input {
        flex: 1;
        width: auto;
    }

    .more-filters-toggle {
        flex: none;
    }

    .more-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-checkbox-item {
        grid-column: span 1;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .sort-dropdown select {
        height: 40px;
        padding: 0 32px 0 12px;
        font-size: 0.85rem;
        min-width: 140px;
        border-radius: 25px;
    }
    .btn-favorites {
        height: 40px;
        padding: 0 12px;
        font-size: 0.85rem;
        border-radius: 25px;
    }
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-actions {
        width: 100%;
    }
    .current-images {
        grid-template-columns: repeat(2, 1fr);
    }
    .image-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .delete-preview {
        flex-direction: column;
    }
    .preview-image {
        width: 100%;
        height: 150px;
    }
    .categorized-images {
        grid-template-columns: 1fr;
    }
    .current-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Container */
    .container {
        padding: 0 12px;
    }
    
    /* Typography scaling */
    .detail-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .detail-price {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }
    
    .detail-location {
        font-size: 0.95rem;
        flex-wrap: wrap;
    }
    
    /* Property Detail Page */
    .detail-main {
        padding: 16px;
    }
    
    .detail-image {
        height: 250px;
    }
    
    .detail-placeholder {
        height: 250px;
    }
    
    .detail-placeholder i {
        font-size: 4rem;
    }
    
    .detail-badges {
        top: 12px;
        left: 12px;
        gap: 6px;
    }
    
    .detail-badges .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    /* Meta Grid - 2 columns on mobile */
    .detail-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .meta-item {
        padding: 14px 10px;
    }
    
    .meta-item i {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }
    
    .meta-item .meta-value {
        font-size: 1.1rem;
    }
    
    .meta-item .meta-label {
        font-size: 0.75rem;
    }
    
    /* Description */
    .detail-description h3 {
        font-size: 1.1rem;
    }
    
    .detail-description p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    /* Contact Card */
    .contact-card {
        padding: 16px;
    }
    
    .contact-card h3 {
        font-size: 1rem;
    }
    
    .owner-info {
        padding: 12px;
    }
    
    .owner-name {
        font-size: 1rem;
    }
    
    .owner-phone {
        font-size: 0.9rem;
    }
    
    /* Contact Buttons - Full width stacked */
    .contact-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        justify-content: center;
    }
    
    /* Forms */
    .form-card {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Auth Forms */
    .auth-container {
        padding: 20px 16px;
    }
    
    .auth-card {
        padding: 24px 20px;
    }
    
    .auth-card h2 {
        font-size: 1.4rem;
    }
    
    /* Buttons */
    .btn, .btn-primary, .btn-submit {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Listings Section */
    .listings-section {
        padding: 0 0 24px;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    /* Type Tabs */
    .type-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Filter Bar */
    .filter-bar {
        gap: 8px;
    }
    
    .filter-group select {
        min-width: 100%;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* Property Cards */
    .card-content {
        padding: 14px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-location {
        font-size: 0.8rem;
    }
    
    .card-meta {
        gap: 12px;
        font-size: 0.8rem;
    }
    
    .card-price {
        font-size: 1.1rem;
    }
    
    /* My Properties */
    .my-properties-section {
        padding: 24px 0;
    }
    
    .property-actions {
        flex-wrap: wrap;
    }
    
    .property-actions .btn {
        flex: 1;
        min-width: 45%;
    }
    
    /* Empty State */
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.2rem;
    }
    
    /* Footer */
    .footer {
        padding: 24px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .agency-header {
        flex-direction: column;
    }
    
    .agency-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .agency-name-row {
        justify-content: center;
    }
    
    .agency-stats {
        justify-content: center;
    }
    
    .agency-contact {
        width: 100%;
    }
    
    .agency-contact .btn {
        width: 100%;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr;
    }
    
    .top-property-item {
        flex-wrap: wrap;
    }
    
    .top-property-item .property-stats {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
    }
    .nav-link,
    .mobile-link,
    .tab,
    .btn,
    .contact-btn,
    input[type="submit"],
    button {
        min-height: 44px;
    }
    
    /* Prevent horizontal scroll — clip does NOT create a scroll container,
       so position:sticky on the navbar is completely unaffected */
    html, body {
        overflow-x: clip;
    }
    
    .container,
    .nav-container,
    .detail-content,
    .property-grid,
    .form-card {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .template-selector-section,
    .save-template-section {
        padding: 12px;
    }
    .status-tabs {
        padding: 4px;
        gap: 4px;
        overflow-x: visible;
        flex-wrap: nowrap;
    }
    
    .status-tab {
        flex: 1;
        padding: 8px 6px;
        font-size: 0.75rem;
        justify-content: center;
        text-align: center;
        min-width: 0;
    }
    
    .status-tab i {
        display: none;
    }
    
    .tab-count {
        padding: 1px 5px;
        font-size: 0.65rem;
        margin-left: 2px;
    }
    
    .section-header-banner {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .banner-icon {
        width: 48px;
        height: 48px;
    }
    .my-properties-section {
        padding: 24px 0 60px;
    }
    
    .my-properties-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .my-properties-header .btn {
        width: 100%;
    }
    
    .properties-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .properties-stats .stat-item {
        padding: 16px;
        min-width: auto;
    }
    
    .properties-stats .stat-number {
        font-size: 1.5rem;
    }
    
    .featured-dashboard {
        padding: 20px;
        border-radius: 16px;
    }
    
    .featured-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .my-properties-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .my-property-card .card-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .expiring-alert-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .expiring-alert-banner .alert-action {
        width: 100%;
    }
    .owner-filter-banner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 16px;
        width: calc(100% - 32px);
    }
    
    .owner-filter-banner .owner-info {
        flex-direction: column;
    }
    
    .owner-filter-banner .btn-clear-owner {
        width: 100%;
        justify-content: center;
    }
    .tinder-card-stack {
        min-height: 500px;
    }
    
    .tinder-card-images {
        height: 200px;
    }
    
    .tinder-card-content {
        padding: 16px;
        max-height: 280px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .property-price {
        text-align: left;
    }
    
    .property-features {
        gap: 12px;
        padding: 12px;
    }
    
    .owner-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .tinder-card-actions {
        flex-wrap: wrap;
    }
    
    .swipe-btn {
        min-width: calc(50% - 6px);
    }
    
    .swipe-btn.view-btn {
        width: 100%;
        order: 3;
    }
 .mobile-only { display: block; } .desktop-only { display: none; } 
    :root { --navbar-h: 40px; }
    .nav-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        height: 40px;
        padding: 0 12px;
    }
    /* Reveal lang toggle on mobile (overrides line 324 hide rule) */
    .lang-toggle {
        display: flex !important;
        order: 1;
        justify-self: start;
    }
    .lang-btn {
        padding: 4px 6px;
        background: transparent;
        border: none;
        border-radius: 0;
        font-size: 0.78rem;
        gap: 4px;
    }
    .lang-btn::before {
        content: "\f0ac"; /* fa-globe */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 0.85rem;
        color: var(--primary);
    }
    .logo {
        order: 2;
        justify-self: center;
        font-size: 1.1rem;
    }
    .logo img {
        height: 34px;
        max-width: 42vw;
    }
    .mobile-menu-btn {
        order: 3;
        justify-self: end;
        padding: 4px 8px;
        font-size: 1.4rem;
    }
    /* Hide the redundant lang link inside hamburger menu */
    .mobile-lang { display: none; }
    .hero {
        padding: 0 !important;
        min-height: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    .hero-video-container {
        position: absolute; /* full-bleed background, same as desktop */
        inset: 0;
        height: auto;
        width: 100%;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(43,61,79,0.25) 0%, rgba(43,61,79,0.65) 100%);
    }
    /* Search content centred over the video — no pull-down */
    .hero-content {
        position: relative;
        margin: 0 auto;
        padding: 0;
        background: transparent;
        text-align: center;
        z-index: 10;
        width: calc(100% - 32px);
        max-width: 400px;
    }
    .hero-content h1 {
        color: var(--white) !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.45) !important;
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
        font-weight: 700;
    }
    .hero-content p {
        display: none !important;
    }
    /* Search card — frosted glass, modern rounded card */
    .genius-search-form,
    .search-form {
        background: rgba(255,255,255,0.93);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        backdrop-filter: blur(24px) saturate(180%);
        border-radius: 24px;
        border: 1px solid rgba(255,255,255,0.65);
        box-shadow: 0 12px 40px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.6) inset;
        margin: 0 auto;
        max-width: 100%;
    }
    .hero-search-body {
        padding: 16px 16px 18px !important;
        gap: 12px !important;
    }
    /* Type pills — clean pill segmented control */
    .type-pill-toggle {
        width: 100%;
        gap: 0 !important;
        background: rgba(0,0,0,0.07);
        padding: 4px;
        border-radius: 50px;
    }
    .type-pill {
        flex: 1;
        padding: 9px 8px !important;
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        border: none !important;
        background: transparent;
        border-radius: 50px;
        color: rgba(0,0,0,0.5);
        transition: all 0.2s ease;
    }
    .type-pill.active {
        background: #fff !important;
        color: var(--primary) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.14) !important;
    }
    /* Search input: clean rounded with no harsh border */
    .search-input-wrapper {
        border-radius: 50px;
        overflow: hidden;
    }
    .search-input-wrapper input {
        padding: 13px 14px 13px 42px;
        font-size: 0.95rem;
        border-radius: 50px;
        border: 1.5px solid rgba(0,0,0,0.1);
        background: rgba(255,255,255,0.7);
        transition: border-color 0.2s, background 0.2s;
    }
    .search-input-wrapper input:focus {
        border-color: var(--primary) !important;
        background: #fff;
        outline: none;
    }
    .rtl .search-input-wrapper input {
        padding: 13px 42px 13px 14px;
    }
    .search-input-wrapper i { left: 15px; font-size: 0.95rem; color: var(--gray-400); }
    .rtl .search-input-wrapper i { left: auto; right: 15px; }

    /* Search button: bold full-width pill */
    .btn-search-inline {
        padding: 14px 22px !important;
        font-size: 0.97rem;
        font-weight: 700 !important;
        border-radius: 50px;
        letter-spacing: 0.02em;
        box-shadow: 0 4px 16px rgba(0,180,90,0.25);
    }

    .filter-pill-select {
        min-width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        padding: 11px 32px 11px 14px !important;
        font-size: 0.85rem !important;
        background-color: var(--white) !important;
        border-color: var(--gray-200) !important;
    }
    .rtl .filter-pill-select {
        padding: 11px 14px 11px 32px !important;
    }
    .filter-pill-price-range {
        width: 100%;
        padding: 4px 12px;
        border-radius: 50px;
    }
    .filter-pill-price-input {
        padding: 10px 6px !important;
        font-size: 0.85rem !important;
    }
    .more-filters-toggle {
        width: 100%;
        justify-content: center;
        padding: 11px 14px !important;
        font-size: 0.9rem !important;
    }
    .more-filters-panel.open {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999;
        max-height: 100vh !important;
        height: 100vh;
        background: var(--surface);
        overflow-y: auto;
        padding: 0 0 88px;
        animation: slideUpSheet 0.3s ease-out;
        border-radius: 0;
    }
    @keyframes slideUpSheet {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .more-filters-panel-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--gray-200);
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 2;
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--black);
    }
    .more-filters-close {
        width: 36px; height: 36px;
        border: none; background: var(--gray-100); border-radius: 50%;
        font-size: 1rem; color: var(--gray-700); cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .more-filters-panel.open .more-filters-grid {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
        gap: 14px !important;
        border-top: none !important;
    }
    .more-filters-panel.open .more-filters-grid .filter-item input,
    .more-filters-panel.open .more-filters-grid .filter-item select {
        padding: 12px 14px;
        font-size: 1rem;
    }
    .more-filters-panel.open .filter-checkbox-item {
        grid-column: span 1 !important;
    }
    .more-filters-panel.open .more-filters-actions {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        padding: 12px 16px;
        background: var(--surface);
        border-top: 1px solid var(--gray-200);
        margin-top: 0;
        justify-content: space-between;
        gap: 12px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }
    .more-filters-panel.open .btn-clear-filters {
        flex: 1;
        text-align: center;
        padding: 12px;
        border-radius: 50px;
        background: var(--gray-100);
        color: var(--gray-700);
    }
    .more-filters-panel.open .btn-apply-filters {
        flex: 1;
        text-align: center;
        padding: 12px;
        border: none;
        border-radius: 50px;
        background: var(--primary);
        color: var(--white);
        font-weight: 700;
        cursor: pointer;
    }
    .more-filters-panel.open .btn-apply-filters { display: inline-block; }
    /* Backdrop for tap-outside-to-close */
    .mf-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1099;
        opacity: 0;
        transition: opacity 0.25s;
    }
    .mf-backdrop.active {
        display: block;
        opacity: 1;
    }
    /* ── More Filters bottom sheet: Home Indicator + polish ── */
    .sheet-handle {
        display: block;
        width: 44px;
        height: 5px;
        background: var(--gray-300);
        border-radius: 3px;
        margin: 14px auto 6px;
        flex-shrink: 0;
        cursor: grab;
        touch-action: none;
        transition: background 0.15s, transform 0.15s;
    }
    .sheet-handle:active {
        cursor: grabbing;
        background: var(--gray-400);
    }
    @keyframes slideDownSheet {
        from { transform: translateY(0); }
        to   { transform: translateY(110%); }
    }
    .more-filters-panel.mf-closing {
        animation: slideDownSheet 0.26s ease forwards !important;
    }
    .more-filters-panel-header {
        border-bottom: 2px solid var(--gold) !important;
    }
    .more-filters-panel.open .more-filters-grid {
        display: block !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    .mf-section {
        display: block;
        padding: 0 16px 4px;
        border-bottom: 1px solid var(--gray-100);
        margin-bottom: 0;
    }
    .mf-section.mf-toggles { border-bottom: none; padding-bottom: 16px; }
    .mf-section-title {
        display: block;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: var(--primary);
        margin: 14px 0 8px;
    }
    .mf-pair {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: end;
        gap: 6px;
        margin-bottom: 12px;
    }
    .mf-sep {
        display: block;
        color: var(--gray-400);
        font-size: 1rem;
        padding-bottom: 13px;
        text-align: center;
    }
    .mf-section .filter-item { margin-bottom: 12px; }
    .mf-section .filter-item label {
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--gray-500);
        margin-bottom: 5px;
    }
    .more-filters-panel.open .more-filters-grid .filter-item input,
    .more-filters-panel.open .more-filters-grid .filter-item select {
        border-radius: 10px !important;
        padding: 13px 14px !important;
        border: 1.5px solid var(--gray-200) !important;
        background: var(--surface) !important;
        font-size: 1rem !important;
        width: 100%;
    }
    .more-filters-panel.open .more-filters-grid .filter-item input:focus,
    .more-filters-panel.open .more-filters-grid .filter-item select:focus {
        outline: none;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 3px rgba(37,181,121,0.12);
    }
    .mf-toggle-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 0;
        border-bottom: 1px solid var(--gray-100);
        cursor: pointer;
        font-size: 0.95rem;
        color: var(--black);
        gap: 12px;
    }
    .mf-toggle-label input[type="checkbox"] { display: none; }
    .mf-toggle-track {
        display: block;
        width: 44px;
        height: 24px;
        border-radius: 12px;
        background: var(--gray-200);
        position: relative;
        transition: background 0.2s;
        flex-shrink: 0;
    }
    .mf-toggle-track::after {
        content: '';
        position: absolute;
        width: 18px; height: 18px;
        background: #fff;
        border-radius: 50%;
        top: 3px; left: 3px;
        transition: transform 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    }
    .mf-toggle-label input[type="checkbox"]:checked + .mf-toggle-track { background: var(--primary); }
    .mf-toggle-label input[type="checkbox"]:checked + .mf-toggle-track::after { transform: translateX(20px); }
    html[dir="rtl"] .mf-toggle-track::after { left: auto; right: 3px; }
    html[dir="rtl"] .mf-toggle-label input[type="checkbox"]:checked + .mf-toggle-track::after { transform: translateX(-20px); }
    .more-filters-panel.open .btn-clear-filters {
        background: transparent !important;
        border: 1.5px solid var(--primary) !important;
        color: var(--primary) !important;
        font-weight: 600;
    }
    .more-filters-panel.open .btn-apply-filters {
        background: var(--primary) !important;
        font-size: 1rem !important;
        letter-spacing: 0.2px;
    }
    .property-card {
        border-radius: var(--radius);
    }
    .property-card .card-info,
    .property-card .property-info {
        padding: 12px 14px 14px;
    }
    .property-card .card-price,
    .property-card .property-price {
        font-size: 1.15rem;
        font-weight: 800;
    }
    .property-card .card-title,
    .property-card .property-title {
        font-size: 0.95rem;
    }
    .listings-section { padding: 0 0 80px; }
    /* Push grid below the fixed filter+sort bar; height measured by JS → --flw-h */
    .listings-section > .container { padding-top: var(--flw-h, 92px); }

    /* Mobile meta bar — hidden on desktop, shown inside fixed chip bar */
    .mobile-meta-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 14px 8px;
        border-top: 1px solid var(--gray-100);
        gap: 8px;
    }
    .mobile-meta-count {
        font-size: 0.78rem;
        color: var(--gray-500);
        font-weight: 500;
        white-space: nowrap;
    }
    .mobile-meta-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .mobile-sort-select {
        font-size: 0.78rem;
        padding: 4px 24px 4px 8px;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        background: var(--surface);
        color: var(--gray-700);
        cursor: pointer;
        appearance: auto;
        max-width: 120px;
    }
    .mobile-meta-fav {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--surface);
        border: 1px solid var(--gray-200);
        color: var(--primary);
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Hide the full section-header on mobile — replaced by mobile-meta-bar */
    .listings-section .section-header { display: none; }

    .section-header { margin-bottom: 16px; padding: 0 12px; }
    .section-header h2 { font-size: 1.05rem; }

    /* Tighten the inline desktop listings filter bar; keep functional but compact */
    .listings-filter-bar {
        margin: 0 12px 12px;
    }
    .lsbar-main {
        flex-direction: column;
        gap: 10px;
    }
    .lsbar-filters {
        flex-wrap: wrap;
        gap: 8px;
    }
    .lsbar-actions { width: 100%; }
    .lsbar-search-btn { width: 100%; justify-content: center; }
    .hero-video-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 52px; height: 52px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.55);
        border: 2px solid rgba(255, 255, 255, 0.9);
        color: var(--white);
        font-size: 1.05rem;
        cursor: pointer;
        z-index: 5;
        backdrop-filter: blur(4px);
    }
    .hero-video-toggle:active { transform: translate(-50%, -50%) scale(0.95); }
    /* ── A. LISTINGS FILTER BAR (lsbar) ─────────────────────
       Show the bar (was hidden); convert to a single lane.
       Use display:contents on sub-containers to flatten all
       children into one flex row for correct ordering.          */

    /* Override the display:none that hides it on mobile */
    .listings-filter-bar > .lsbar-main {
        display: flex !important;
    }

    /* The listings bar itself: white card with separator */
    .listings-filter-bar {
        margin: 0 !important;
        background: var(--surface);
        border-bottom: 1px solid var(--gray-100);
    }

    /* Single horizontal scroll lane */
    .lsbar-main {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 8px !important;
        align-items: center !important;
        padding: 4px 12px !important;
    }
    .lsbar-main::-webkit-scrollbar { display: none !important; }

    /* Flatten sub-containers → all their children become direct
       flex children of .lsbar-main, enabling single-lane layout */
    .lsbar-type-pills,
    .lsbar-filters {
        display: contents !important;
    }

    /* Type pill toggle: compact, no full-width stretch */
    .lsbar-main .type-pill-toggle {
        display: flex !important;
        flex-shrink: 0 !important;
        width: auto !important;
        flex-wrap: nowrap !important;
        background: var(--gray-100);
        padding: 4px;
        border-radius: 50px;
        gap: 0 !important;
        order: 0;
    }
    .lsbar-main .type-pill-toggle .type-pill {
        flex: none !important;
        padding: 7px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Filter selects: compact pills, content-width */
    .lsbar-main .filter-pill-select {
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        flex-shrink: 0 !important;
        padding: 7px 30px 7px 12px !important;
        font-size: 0.82rem !important;
        background-color: var(--white) !important;
        border-color: var(--gray-200) !important;
        white-space: nowrap;
        order: 0;
    }
    .rtl .lsbar-main .filter-pill-select {
        padding: 7px 12px 7px 30px !important;
    }

    /* Lane price range: hidden on mobile (replaced by Price pill) */
    .lsbar-main .lane-price-range {
        display: none !important;
    }

    /* Price pill trigger: visible on mobile */
    .mobile-price-pill-trigger {
        display: inline-flex !important;
        flex-shrink: 0 !important;
        width: auto !important;
        flex: none !important;
        padding: 7px 14px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
        order: 0;
    }

    /* More Filters: compact pill, always LAST in the row */
    .lsbar-main .more-filters-toggle:not(.mobile-price-pill-trigger) {
        width: auto !important;
        flex: none !important;
        flex-shrink: 0 !important;
        padding: 7px 14px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
        order: 99 !important;
    }

    /* Actions: search button compact, comes before More Filters */
    .lsbar-actions {
        display: flex !important;
        flex-shrink: 0 !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        order: 97 !important;
    }
    .lsbar-search-btn {
        width: auto !important;
        padding: 7px 16px !important;
        font-size: 0.82rem !important;
        border-radius: 50px !important;
        white-space: nowrap;
        justify-content: center !important;
    }
    .lsbar-search-label { display: none !important; }
    .lsbar-actions .btn-clear-filters-inline { flex-shrink: 0 !important; }

    /* Price fields in More Filters sheet: visible on mobile */
    .mobile-price-field {
        display: block !important;
    }
    .filter-lane-wrap {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        right: 0;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
        background: var(--surface);
        transition: opacity 0.2s ease;
    }
    /* Hidden only while the hero section is still on screen */
    .filter-lane-wrap.flw-hero-visible {
        opacity: 0;
        pointer-events: none;
    }
    /* Leading fade hint — appears once user scrolls away from the start */
    .filter-lane-wrap::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 48px;
        background: linear-gradient(to left, transparent, var(--surface, #fff));
        pointer-events: none;
        z-index: 2;
        opacity: 0;
        transition: opacity 0.2s;
    }
    /* Show leading fade once lane has scrolled away from start */
    .filter-lane-wrap.fl-scrolled::before {
        opacity: 1;
    }
    /* RTL: leading edge is on the right */
    html[dir="rtl"] .filter-lane-wrap::before {
        left: auto;
        right: 0;
        background: linear-gradient(to right, transparent, var(--surface, #fff));
    }
    /* Trailing fade hint — signals the lane scrolls horizontally */
    .filter-lane-wrap::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 48px;
        background: linear-gradient(to right, transparent, var(--surface, #fff));
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.2s;
    }
    /* Hide fade when user has scrolled to the end */
    .filter-lane-wrap.fl-at-end::after {
        opacity: 0;
    }
    /* RTL: fade appears on the left edge instead */
    html[dir="rtl"] .filter-lane-wrap::after {
        right: auto;
        left: 0;
        background: linear-gradient(to left, transparent, var(--surface, #fff));
    }
    .filter-lane {
        padding: 10px 0 10px 12px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    /* No trailing scroll space — content ends at last chip */
    .filter-lane::after { display: none; }
    /* Normalize wrapper containers so they don't add visual gaps */
    .fl-type-group {
        background: transparent;
        padding: 0;
        gap: 0;
        margin: 0;
    }
    /* Hide fl-more-wrap's closed panel from contributing to wrapper width */
    .fl-more-wrap { margin: 0; overflow: hidden; }
    /* Take closed panel out of flow so it adds zero width to the lane */
    .fl-more-wrap .more-filters-panel:not(.open) { position: absolute; width: 0; overflow: hidden; }
    /* Clear button floats at the trailing edge — never extends scroll width */
    .fl-clear-btn {
        position: sticky;
        right: 0;
        z-index: 5;
        background: var(--surface);
        box-shadow: -8px 0 10px var(--surface);
    }
    html[dir="rtl"] .fl-clear-btn {
        right: auto;
        left: 0;
        box-shadow: 8px 0 10px var(--surface);
    }
    /* Leading "Filters" button is redundant on mobile — hide it */
    .fl-filters-btn { display: none !important; }
    /* RTL mobile: use direction:rtl + flex-direction:row so scroll origin is the right edge */
    html[dir="rtl"] .filter-lane {
        direction: rtl;
        flex-direction: row;
        padding: 10px 12px 10px 0;
    }
    /* Restore original mobile order regardless of RTL DOM reorder done for desktop */
    .filter-lane .fl-type-group { order: -1; }
    .filter-lane .fl-more-wrap  { order: 2; }
    /* Both type pills always visible on mobile in the scrollable lane */

    /* ── fl-more-wrap: bottom sheet on mobile (half-screen, no scroll) ── */
    .fl-more-wrap .more-filters-panel.open {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        /* Kill desktop 680px fixed width */
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        /* Half screen height — auto-scroll on tiny phones only */
        height: auto !important;
        max-height: 58vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.18) !important;
        padding: 0 0 60px !important;
        background: var(--surface) !important;
        border: none !important;
        animation: slideUpSheet 0.3s ease !important;
        z-index: 1100 !important;
    }
    /* Home Indicator pill */
    .fl-more-wrap .more-filters-panel.open .sheet-handle {
        display: block !important;
        width: 36px !important;
        height: 4px !important;
        background: var(--gray-300) !important;
        border-radius: 2px !important;
        margin: 8px auto 2px !important;
        cursor: grab !important;
        touch-action: none !important;
    }
    /* Compact sticky header */
    .fl-more-wrap .more-filters-panel.open .more-filters-panel-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 14px !important;
        border-bottom: 1px solid var(--gray-100) !important;
        margin-bottom: 0 !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: var(--gray-900) !important;
        position: sticky !important;
        top: 0 !important;
        background: var(--surface) !important;
        z-index: 2 !important;
    }
    /* 2-column grid so all 5 sections fit in ~2 rows */
    .fl-more-wrap .more-filters-panel.open .more-filters-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    /* Price row: full width */
    .fl-more-wrap .more-filters-panel.open .mf-section:nth-child(1) {
        grid-column: span 2 !important;
    }
    /* Area row: full width */
    .fl-more-wrap .more-filters-panel.open .mf-section:nth-child(2) {
        grid-column: span 2 !important;
    }
    /* Toggles (Featured + Verified): full width */
    .fl-more-wrap .more-filters-panel.open .mf-section.mf-toggles {
        grid-column: span 2 !important;
    }
    /* Close button: no background on mobile */
    .fl-more-wrap .more-filters-panel.open .more-filters-close {
        background: none !important;
        border: none !important;
        color: var(--gray-500) !important;
        font-size: 1.05rem !important;
        width: auto !important;
        height: auto !important;
        padding: 2px 6px !important;
    }
    /* All sections: tight compact padding */
    .fl-more-wrap .more-filters-panel.open .mf-section {
        padding: 8px 12px !important;
        border-bottom: 1px solid var(--gray-100) !important;
        border-right: none !important;
    }
    /* Neighbourhood (col 1) gets right divider to separate from Bedrooms (col 2) */
    .fl-more-wrap .more-filters-panel.open .mf-section:nth-child(3) {
        border-right: 1px solid var(--gray-100) !important;
    }
    /* Section label: smaller */
    .fl-more-wrap .more-filters-panel.open .mf-section-title {
        font-size: 0.7rem !important;
        margin-bottom: 4px !important;
        letter-spacing: 0.03em !important;
    }
    /* Inputs and selects: compact */
    .fl-more-wrap .more-filters-panel.open .mf-section input,
    .fl-more-wrap .more-filters-panel.open .mf-section select {
        padding: 7px 10px !important;
        font-size: 0.85rem !important;
        height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Toggles row: use flex so Featured + Verified sit side-by-side */
    .fl-more-wrap .more-filters-panel.open .mf-toggles {
        display: flex !important;
        flex-direction: row !important;
        gap: 20px !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }
    /* Toggle labels: compact, no bottom border between them */
    .fl-more-wrap .more-filters-panel.open .mf-toggle-label {
        padding: 0 !important;
        border-bottom: none !important;
        font-size: 0.82rem !important;
        flex: none !important;
    }
    /* Toggle track: slightly smaller on mobile */
    .fl-more-wrap .more-filters-panel.open .mf-toggle-track {
        width: 36px !important;
        height: 20px !important;
        flex-shrink: 0 !important;
    }
    .fl-more-wrap .more-filters-panel.open .mf-toggle-track::after {
        width: 14px !important;
        height: 14px !important;
        top: 3px !important;
        left: 3px !important;
    }
    .fl-more-wrap .more-filters-panel.open .mf-toggle-label input:checked ~ .mf-toggle-track::after {
        transform: translateX(16px) !important;
    }
    html[dir="rtl"] .fl-more-wrap .more-filters-panel.open .mf-toggle-label input:checked ~ .mf-toggle-track::after {
        transform: translateX(-16px) !important;
    }
    /* Actions bar: fixed at bottom, above backdrop */
    .fl-more-wrap .more-filters-panel.open .more-filters-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        gap: 10px !important;
        padding: 10px 14px !important;
        background: var(--surface) !important;
        border-top: 1px solid var(--gray-100) !important;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.07) !important;
        z-index: 1101 !important;
    }
    .fl-more-wrap .more-filters-panel.open .btn-apply-filters {
        display: block !important;
        flex: 2 !important;
        padding: 10px !important;
        border-radius: 50px !important;
        font-size: 0.9rem !important;
    }
    .fl-more-wrap .more-filters-panel.open .btn-clear-filters {
        flex: 1 !important;
        padding: 10px !important;
        border-radius: 50px !important;
        text-align: center !important;
        font-size: 0.85rem !important;
    }

    /* Hero on mobile: full-width pills */
    /* Kill the double frame — search-row-1 is now a transparent layout wrapper */
    .search-row-1 {
        flex-direction: column;
        gap: 10px;
        padding: 0;
        border-radius: 0;
        border: none;
        background: transparent !important;
        box-shadow: none !important;
    }
    .search-row-1 .type-pill-toggle {
        width: 100%;
        justify-content: stretch;
    }
    /* Fix pill borders — must override the 2-class `.search-row-1 .type-pill` global rule */
    .search-row-1 .type-pill {
        flex: 1;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 8px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border: none !important;
        background: transparent !important;
        color: rgba(0,0,0,0.5) !important;
        border-radius: 50px !important;
    }
    .search-row-1 .type-pill.active {
        background: #fff !important;
        color: var(--primary) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.13) !important;
    }
    .search-row-1 .genius-search-main { width: 100%; }
    .search-row-1 .btn-search { width: 100%; justify-content: center; }
}

@media (max-width: 650px) {
    .filter-checkboxes-row {
        flex-direction: row;
        gap: 8px;
        margin-top: 6px;
        padding-top: 8px;
    }
    
    .filter-checkboxes-row .filter-checkbox {
        flex: 1;
        min-width: 0;
    }
    
    .checkbox-label {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .checkbox-text {
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .checkbox-text i {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
    .detail-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .file-upload-inline {
        min-height: 120px;
    }
    
    .file-upload-inline .file-upload-content {
        padding: 20px;
        min-height: 120px;
    }
    .poster-type-selector {
        flex-direction: column;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-search-body {
        padding: 14px 14px 16px;
    }

    .type-pill {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .filter-pill-select {
        font-size: 0.78rem;
    }
    .search-form {
        padding: 12px;
        gap: 10px;
        width: calc(100% - 24px);
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .advanced-filters {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .filters-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filter-item {
        min-width: 0;
        max-width: 100%;
    }
    
    .filter-item select,
    .filter-item input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filter-checkbox {
        grid-column: span 1;
    }
    
    .type-option span {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .search-input-wrapper input {
        padding: 12px 12px 12px 40px;
        font-size: 0.95rem;
    }
    
    .rtl .search-input-wrapper input {
        padding: 12px 40px 12px 12px;
    }
    
    .filter-item input,
    .filter-item select {
        padding: 10px 12px;
    }
    
    .filter-checkboxes-row {
        grid-column: span 2;
        flex-direction: row;
        gap: 8px;
        margin-top: 4px;
        padding-top: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .filter-checkboxes-row .filter-checkbox {
        flex: 1;
        min-width: 0;
    }
    
    .checkbox-label {
        padding: 8px 10px;
        width: 100%;
        gap: 6px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-text {
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .checkbox-text i {
        font-size: 0.8rem;
    }
    .whatsapp-choice-selector {
        flex-direction: column;
    }
    
    .whatsapp-choice-option .choice-content {
        padding: 12px 14px;
    }
    .contact-choice-options {
        flex-direction: column;
    }
    
    .contact-choice-option .choice-content {
        padding: 12px 14px;
    }
    .account-type-selector {
        flex-direction: column;
    }
    
    .account-type-option .option-content {
        flex-direction: row;
        justify-content: center;
        padding: 14px 16px;
    }
    
    .account-type-option .option-content i {
        font-size: 1.25rem;
    }
    .phone-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .country-code-select {
        width: 100%;
        min-width: unset;
    }
    
    .phone-input-wrapper {
        width: 100%;
    }
    
    .phone-input-wrapper input {
        width: 100%;
        padding-left: 16px !important;
    }
    
    .input-icon-wrapper {
        width: 100%;
    }
    
    .input-icon-wrapper input {
        padding-left: 40px !important;
    }
    
    .input-icon-wrapper i {
        left: 14px !important;
        position: absolute !important;
    }
    
    .rtl .phone-input-group {
        flex-direction: column;
    }
    
    .rtl .phone-input-wrapper input {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .rtl .input-icon-wrapper input {
        padding-left: 16px !important;
        padding-right: 40px !important;
    }
    
    .rtl .input-icon-wrapper i {
        left: auto !important;
        right: 14px !important;
    }
    .nav-container {
        height: 56px;
        padding: 0 12px;
    }
    
    .logo img {
        height: 40px;
        max-width: 44vw;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .detail-meta-grid {
        gap: 8px;
    }
    
    .meta-item {
        padding: 12px 8px;
    }
    
    .meta-item .meta-value {
        font-size: 1rem;
    }
    
    .meta-item .meta-label {
        font-size: 0.7rem;
    }
    
    .detail-title {
        font-size: 1.25rem;
    }
    
    .detail-price {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .property-actions .btn {
        min-width: 100%;
        flex: none;
    }
    .my-properties-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .my-properties-header .header-icon {
        width: 48px;
        height: 48px;
    }
    
    .my-properties-header h1 {
        font-size: 1.5rem;
    }
    
    .properties-stats .stat-item {
        padding: 12px;
    }
    
    .properties-stats .stat-number {
        font-size: 1.25rem;
    }
    
    .properties-stats .stat-label {
        font-size: 0.75rem;
    }
    
    .featured-dashboard .dashboard-title-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .featured-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .my-property-card .card-body {
        padding: 16px;
    }
    
    .my-property-card .card-image-wrapper {
        height: 180px;
    }
    
    .my-property-card .card-actions {
        padding: 12px 16px;
    }
    
    .feature-modal-content {
        margin: 10px;
    }
    #toast-container {
        top: 12px;
        width: calc(100% - 24px);
        max-width: none;
    }
    
    .toast {
        padding: 14px 16px;
        gap: 10px;
        border-radius: 12px;
    }
    
    .toast-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .toast-message {
        font-size: 0.9rem;
    }
    
    .toast-close {
        width: 24px;
        height: 24px;
    }
    .feedback-modal {
        padding: 24px;
        margin: 16px;
    }
    
    .star-rating .star {
        width: 40px;
        height: 40px;
    }
    
    .star-rating .star i {
        font-size: 30px;
    }
    
    .feedback-footer {
        flex-direction: column-reverse;
    }
    
    .btn-feedback-skip,
    .btn-feedback-submit {
        flex: none;
        width: 100%;
    }
    .status-check-modal {
        padding: 24px;
    }
    
    .status-check-header h3 {
        font-size: 1.2rem;
    }
    
    .status-check-question {
        font-size: 0.9rem;
    }
    
    .status-check-property-image {
        width: 60px;
        height: 45px;
    }
    
    .btn-status-yes,
    .btn-status-no {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .status-tabs {
        padding: 3px;
        gap: 3px;
    }
    
    .status-tab {
        padding: 6px 4px;
        font-size: 0.7rem;
        flex-direction: column;
        gap: 2px;
    }
    
    .tab-count {
        display: none;
    }
}

@media (max-width: 380px) {
    .hero {
        padding-top: 70px;
        overflow: hidden;
    }
    
    .hero-content {
        padding: 0 12px;
        max-width: 100%;
    }
    
    .search-form {
        padding: 10px;
        gap: 8px;
        width: calc(100% - 16px);
        max-width: 100%;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .filter-item {
        grid-column: span 1;
    }
    
    .filter-checkboxes-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-row select,
    .filter-row input {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    .search-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE SYSTEM
   Mobile-first. Breakpoints: xs(320) sm(480) md(768)
                               lg(1024) xl(1280) 2xl(1440)
   ───────────────────────────────────────────────────────────── */

/* ── Global safety guards (unconditional) ── */

html, body { max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed, object, svg { max-width: 100%; height: auto; }
p, h1, h2, h3, h4, h5, h6, li, td, th, label, span {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Fluid typography on key components ── */

.hero-content h1, .hero-title {
    font-size: clamp(1.4rem, 4vw + 0.5rem, 3rem);
    line-height: 1.2;
}

.detail-title {
    font-size: clamp(1.2rem, 3vw + 0.3rem, 2rem);
    line-height: 1.3;
}

.form-title, .section-header h2, .page-header h1 {
    font-size: clamp(1.1rem, 2.5vw, 1.75rem);
}

body { font-size: var(--text-base); }

/* ── Table scroll utility ── */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-radius: var(--radius-sm);
}

.table-scroll > table { min-width: 600px; width: 100%; }

/* Apply to all existing named table wrappers */
.table-responsive, .admin-table-wrap,
.properties-table-wrapper, .users-table-wrapper,
.reports-table-wrap, .ads-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* ── Admin tables: Properties & Users — stop letter-stacking, fit without scroll ── */

/* 1. Headers never wrap letter-by-letter */
#propertiesTable th,
#usersTable th { white-space: nowrap; }

/* 2. Fixed table layout + column widths (desktop ≥993px only).
      Properties col 3 (Title) and Users col 2 (Name) are the auto/flex columns.
      Fixed totals are sized so no horizontal scroll at 1280px (936px usable):
        Properties 836px → Title gets 100px. Users 809px → Name gets 127px. */
@media (min-width: 993px) {
    /* Override any display:block injected by the ≤1023px utility rule */
    #propertiesTable,
    #usersTable { display: table; table-layout: fixed; width: 100%; }

    /* Properties table — 10 columns
       Fixed cols total 836px (80+70+92+110+90+120+110+78+86).
       Total leaves Title auto 100px at 1280px (936px usable) — no horizontal scroll.
       Title auto: 100px at 1280px, 186px at 1366px, 740px at 1920px.
       Type=110px: "FOR RENT" badge ~72px, usable 78px (110-32) — 6px margin.
       Category=90px: "CATEGORY" header ~87px fits; overflow:hidden clips long values. */
    #propertiesTable th:nth-child(1),  #propertiesTable td:nth-child(1)  { width: 80px; }
    #propertiesTable th:nth-child(2),  #propertiesTable td:nth-child(2)  { width: 70px; }
    /* col 3 = Title — auto, absorbs all remaining space */
    #propertiesTable th:nth-child(4),  #propertiesTable td:nth-child(4)  { width: 92px;  white-space: nowrap; }
    #propertiesTable th:nth-child(5),  #propertiesTable td:nth-child(5)  { width: 110px; }
    #propertiesTable th:nth-child(6),  #propertiesTable td:nth-child(6)  { width: 90px;  white-space: nowrap; }
    #propertiesTable th:nth-child(7),  #propertiesTable td:nth-child(7)  { width: 120px; }
    #propertiesTable th:nth-child(8),  #propertiesTable td:nth-child(8)  { width: 110px; }
    #propertiesTable th:nth-child(9),  #propertiesTable td:nth-child(9)  { width: 78px;  white-space: nowrap; }
    #propertiesTable th:nth-child(10), #propertiesTable td:nth-child(10) { width: 86px; }

    /* Users table — 9 columns
       Fixed cols total 809px (44+115+116+116+100+98+100+120).
       Type=116px: "Agency" badge (icon+gap+text) ~78px + 32px cell = 110px min; 116px gives 6px margin.
       Name auto: 127px at 1280px, 213px at 1366px — fits without scroll at all widths. */
    #usersTable th:nth-child(1), #usersTable td:nth-child(1) { width: 44px; }
    /* col 2 = Name — auto, takes all remaining space */
    #usersTable th:nth-child(3), #usersTable td:nth-child(3) { width: 115px; white-space: nowrap; }
    #usersTable th:nth-child(4), #usersTable td:nth-child(4) { width: 116px; }
    #usersTable th:nth-child(5), #usersTable td:nth-child(5) { width: 116px; }
    #usersTable th:nth-child(6), #usersTable td:nth-child(6) { width: 100px; }
    #usersTable th:nth-child(7), #usersTable td:nth-child(7) { width: 98px; }
    #usersTable th:nth-child(8), #usersTable td:nth-child(8) { width: 100px; white-space: nowrap; }
    #usersTable th:nth-child(9), #usersTable td:nth-child(9) { width: 120px; }
}

/* 3. Overflow / truncation rules */
/* Properties: Image — scale thumbnail to fit the 70px column (usable 38px after 16px padding each side) */
#propertiesTable td:nth-child(2) .table-image { width: 38px; height: 28px; }
/* Properties: Title */
#propertiesTable td:nth-child(3) { overflow: hidden; white-space: nowrap; }
#propertiesTable td:nth-child(3) .title-link {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Properties: Type badge — clip any edge-case overflow without stacking */
#propertiesTable td:nth-child(5) { overflow: hidden; }
/* Properties: Category — clip text so it never bleeds into Location */
#propertiesTable td:nth-child(6) { overflow: hidden; text-overflow: ellipsis; }
/* Properties: Location */
#propertiesTable td:nth-child(7) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Properties: Owner name truncated, Owner phone always full */
#propertiesTable td:nth-child(8) .owner-name {
    display: block; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 100%;
}
#propertiesTable td:nth-child(8) .owner-phone { white-space: nowrap; }
/* Users: Name */
#usersTable td:nth-child(2) { overflow: hidden; }
#usersTable td:nth-child(2) .user-name {
    display: block; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 100%;
}
/* Users: Type badge — clip any edge-case overflow */
#usersTable td:nth-child(4) { overflow: hidden; }

/* 4. Never-truncate cells — always show fully */
#propertiesTable td.price-cell { white-space: nowrap; }
#propertiesTable td.date-cell,
#usersTable      td.date-cell  { white-space: nowrap; }

/* ── RTL text alignment safety ── */

.rtl input, .rtl select, .rtl textarea { text-align: right; }

/* ── 12-column grid utility ── */

.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-md, 1rem);
    box-sizing: border-box;
}

.col-1  { grid-column: span 1;  }
.col-2  { grid-column: span 2;  }
.col-3  { grid-column: span 3;  }
.col-4  { grid-column: span 4;  }
.col-5  { grid-column: span 5;  }
.col-6  { grid-column: span 6;  }
.col-7  { grid-column: span 7;  }
.col-8  { grid-column: span 8;  }
.col-9  { grid-column: span 9;  }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* Shorthand auto-collapse grid utilities */
.grid-cols-1  { display: grid; grid-template-columns: repeat(1,  1fr); gap: var(--space-md); }
.grid-cols-2  { display: grid; grid-template-columns: repeat(2,  1fr); gap: var(--space-md); }
.grid-cols-3  { display: grid; grid-template-columns: repeat(3,  1fr); gap: var(--space-md); }
.grid-cols-4  { display: grid; grid-template-columns: repeat(4,  1fr); gap: var(--space-md); }
.grid-cols-5  { display: grid; grid-template-columns: repeat(5,  1fr); gap: var(--space-md); }
.grid-cols-6  { display: grid; grid-template-columns: repeat(6,  1fr); gap: var(--space-md); }
.grid-cols-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-md); }

/* ══════════════════════════════════════════════════════════════
   MIN-WIDTH BREAKPOINTS (mobile-first expansions)
   ══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .col-md-1  { grid-column: span 1;  }
    .col-md-2  { grid-column: span 2;  }
    .col-md-3  { grid-column: span 3;  }
    .col-md-4  { grid-column: span 4;  }
    .col-md-5  { grid-column: span 5;  }
    .col-md-6  { grid-column: span 6;  }
    .col-md-7  { grid-column: span 7;  }
    .col-md-8  { grid-column: span 8;  }
    .col-md-9  { grid-column: span 9;  }
    .col-md-10 { grid-column: span 10; }
    .col-md-11 { grid-column: span 11; }
    .col-md-12 { grid-column: span 12; }
}

@media (min-width: 1024px) {
    .col-lg-1  { grid-column: span 1;  }
    .col-lg-2  { grid-column: span 2;  }
    .col-lg-3  { grid-column: span 3;  }
    .col-lg-4  { grid-column: span 4;  }
    .col-lg-5  { grid-column: span 5;  }
    .col-lg-6  { grid-column: span 6;  }
    .col-lg-7  { grid-column: span 7;  }
    .col-lg-8  { grid-column: span 8;  }
    .col-lg-9  { grid-column: span 9;  }
    .col-lg-10 { grid-column: span 10; }
    .col-lg-11 { grid-column: span 11; }
    .col-lg-12 { grid-column: span 12; }
}

@media (min-width: 1280px) {
    .col-xl-1  { grid-column: span 1;  }
    .col-xl-2  { grid-column: span 2;  }
    .col-xl-3  { grid-column: span 3;  }
    .col-xl-4  { grid-column: span 4;  }
    .col-xl-5  { grid-column: span 5;  }
    .col-xl-6  { grid-column: span 6;  }
    .col-xl-7  { grid-column: span 7;  }
    .col-xl-8  { grid-column: span 8;  }
    .col-xl-9  { grid-column: span 9;  }
    .col-xl-10 { grid-column: span 10; }
    .col-xl-11 { grid-column: span 11; }
    .col-xl-12 { grid-column: span 12; }
}

@media (min-width: 1440px) {
    .container, .nav-container { max-width: 1400px; }
}

/* ══════════════════════════════════════════════════════════════
   MAX-WIDTH BREAKPOINTS (progressive narrowing, mobile-first)
   ══════════════════════════════════════════════════════════════ */

/* ≤ 1023px — Below desktop */
/* iOS Safari zoom prevention: any input < 16px triggers auto-zoom — apply globally */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
select,
textarea {
    font-size: max(16px, 1em);
}
select { line-height: 1.4; }

@media (max-width: 1023px) {
    /* Tables inside admin: allow horizontal scroll instead of page overflow */
    .admin-main table, .admin-tab table { min-width: 540px; }
    .admin-tab > div > table,
    .admin-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    /* Property grid: 2 columns on tablet */
    .property-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Image gallery: shorter on tablet */
    .image-gallery .main-image { height: 420px; }
}

/* ≤ 767px — Mobile portrait and below */
@media (max-width: 767px) {
    /* Make main a flex column so the hero can fill it */
    main { display: flex; flex-direction: column; }

    /* Hero: fills all available space between navbar and footer */
    .hero.hero--landing {
        flex: 1;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    /* Hero content: centered, constrained width */
    .hero-content h1 { font-size: 1.3rem; margin-bottom: 12px; }
    .hero-content p  { font-size: 0.9rem; margin-bottom: 12px; }

    /* Results search bar — sits below fixed nav */
    .results-search-row { top: var(--navbar-h); padding: 2px 0; }
    .results-search-submit span { display: none; }
    .results-search-submit      { padding: 9px 14px; }

    /* Form containers */
    .form-container { padding: 24px 18px; margin: 0 8px; }
    .post-page, .edit-page { padding: 24px 0; }
    .form-title { margin-bottom: 20px; }

    /* Auth cards */
    .auth-container { padding: 20px 12px; min-height: calc(100vh - 140px); }
    .auth-card { padding: 28px 20px; }

    /* Admin: stat grid, tabs, table containers */
    .tab-header h1 { font-size: clamp(1.1rem, 4vw, 1.4rem); }
    .tab-header p  { font-size: 0.85rem; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .admin-tab { overflow-x: hidden; }
    .admin-table-container, .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
    }
    .admin-table { min-width: 700px; }

    /* Account settings cards */
    .account-settings-container, .settings-container { padding: 16px; }
    .settings-card, .account-card { padding: 20px 16px; }

    /* grid-cols auto-collapse: 3+ → 2 col */
    .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-cols-12 { grid-template-columns: repeat(4, 1fr); }
}

/* ≤ 640px — Small mobile landscape / large phones */
@media (max-width: 640px) {
    /* Image gallery */
    .image-gallery .main-image { height: 280px; border-radius: var(--radius-sm); }
    .thumbnail { width: 72px; height: 56px; }

    /* Detail page: contact buttons */
    .btn-whatsapp, .btn-call { font-size: 1rem; padding: 14px 16px; }
    .contact-card { padding: 16px; }

    /* Detail action buttons: 2-up grid */
    .detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .detail-actions .btn { font-size: 0.85rem; padding: 10px 12px; }

    /* Page-header row: stack vertically */
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-header .btn { width: 100%; justify-content: center; }
    .delete-buttons { flex-direction: column; }
    .delete-buttons .btn { width: 100%; }

    /* Sort / listings count row */
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header-actions { width: 100%; }
    .sort-dropdown select { width: 100%; min-width: unset; }

    /* Analytics stat grid: 2-col */
    .analytics-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { flex-direction: column; text-align: center; padding: 16px; }
    .stat-card .stat-value { font-size: 1.5rem; }

    /* Photo upload grid: 2-col */
    .photos-grid, .categorized-images { grid-template-columns: repeat(2, 1fr) !important; }
    .file-upload-inline .file-upload-content { padding: 20px; min-height: 110px; }
    .file-upload-inline .file-upload-content i    { font-size: 1.5rem; }
    .file-upload-inline .file-upload-content span { font-size: 0.82rem; }
}

/* ≤ 480px — Most phones portrait */
@media (max-width: 480px) {
    /* Property grid: single column */
    .property-grid { grid-template-columns: 1fr !important; gap: 12px; }

    /* Image gallery: compact */
    .image-gallery .main-image { height: 220px; }
    .thumbnail { width: 60px; height: 46px; }
    .thumbnail-strip { gap: 6px; }

    /* Detail page meta grid */
    .detail-page { padding: 12px 0 72px; }
    .detail-meta-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .meta-item { padding: 10px 8px; }
    .meta-item .meta-value { font-size: 1rem; }
    .meta-item .meta-label { font-size: 0.7rem; }
    .detail-main { padding: 12px; }
    .detail-description p { font-size: 0.92rem; line-height: 1.75; }

    /* Flash messages */
    .flash-messages { width: calc(100% - 24px); max-width: none; }
    .flash-message  { padding: 12px 16px; font-size: 0.9rem; }

    /* Admin stat cards */
    .admin-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .admin-stat-number { font-size: 2rem; }
    .admin-stat-card   { padding: 14px; }

    /* Modals slide up from bottom */
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal-card    { border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }
    .modal-body    { padding: 16px; }
    .modal-footer  { padding: 12px 16px; flex-direction: column; gap: 8px; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    /* Touch targets: 44×44px minimum */
    .btn,
    button:not(.modal-close):not(.gallery-nav):not(.favorite-btn):not(.remove-preview),
    a.btn, .nav-link, .tab, .type-pill, .fl-type-pill, .fl-pill,
    input[type="submit"], input[type="button"] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* My properties grid */
    .my-properties-grid { grid-template-columns: 1fr !important; gap: 12px; }

    /* Upload overlay */
    .upload-modal { padding: 28px 20px; width: calc(100% - 32px); }
    .upload-modal h3 { font-size: 1.15rem; }

    /* Featured banner */
    .featured-dashboard  { padding: 16px; border-radius: var(--radius-sm); }
    .expiring-alert-banner { padding: 14px; font-size: 0.88rem; }

    /* Tinder moderation */
    .tinder-card-stack   { min-height: 420px; }
    .tinder-card-content { max-height: 250px; }
    .swipe-btn           { padding: 12px 16px; font-size: 0.9rem; }
    .quick-reasons-grid  { grid-template-columns: 1fr; }

    /* Property card footer actions */
    .property-actions { flex-wrap: wrap; gap: 6px; }
    .property-actions .btn-sm {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
        text-align: center;
    }

    /* Form container tighter padding */
    .form-container { padding: 18px 14px; border-radius: var(--radius-sm); margin: 0 4px; }

    /* grid-cols collapse to 1-col */
    .grid-cols-2, .grid-cols-3, .grid-cols-4,
    .grid-cols-5, .grid-cols-6 { grid-template-columns: 1fr; }
    .grid-cols-12 { grid-template-columns: repeat(2, 1fr); }
}

/* ≤ 420px */
@media (max-width: 420px) {
    .auth-card { padding: 20px 14px; border-radius: var(--radius-sm); }
    .auth-header h1 { font-size: 1.4rem; }
    .auth-icon { font-size: 2.5rem; margin-bottom: 12px; }
}

/* ≤ 400px */
@media (max-width: 400px) {
    .otp-input { font-size: 1.5rem !important; letter-spacing: 0.25rem; padding: 12px 8px; }
    .nav-container { height: 48px; }
    .logo img {
        height: 32px;
        max-width: 46vw;
    }
    .form-row, .form-row-3 { grid-template-columns: 1fr !important; }
    .photos-grid, .categorized-images { grid-template-columns: 1fr !important; }
}

/* ≤ 380px */
@media (max-width: 380px) {
    .analytics-stats { grid-template-columns: 1fr; }
}

/* ≤ 360px */
@media (max-width: 360px) {
    .hero-search-body { padding: 10px !important; gap: 8px !important; }
    .search-form, .genius-search-form { width: calc(100% - 16px); }
    .type-pill { font-size: 0.78rem !important; padding: 7px 6px !important; }
}

/* Short viewport with keyboard open */
@media (max-height: 560px) and (max-width: 768px) {
    .auth-container { align-items: flex-start; padding-top: 12px; }
}

/* Filter checkboxes: 2-col between 481-640px */
@media (min-width: 481px) and (max-width: 640px) {
    .filter-checkboxes-row { flex-direction: row; }
    .filter-checkboxes-row .filter-checkbox { flex: 1; }
}

/* ─────────────────────────────────────────────────────────────
   DARK MODE
   Overrides CSS custom-property tokens so every component that
   uses var() adapts automatically.  Hardcoded colours that
   bypass variables are overridden by selector rules below.
   ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {

    /* ── Token overrides ─────────────────────────────────── */
    :root {
        --surface:    #1e2a3a;    /* card / panel backgrounds        */
        --secondary:  #1a2233;
        /* --white stays #ffffff — used for text on dark buttons     */
        --black:      #e8edf3;
        --text:       #c5cdd8;
        --accent:     #4a6278;
        --gray-50:    #141c28;
        --gray-100:   #111827;   /* page body background             */
        --gray-200:   #2a3547;   /* borders / dividers               */
        --gray-300:   #3d4f63;
        --gray-400:   #6b7280;
        --gray-500:   #9ca3af;
        --gray-600:   #c5cdd8;
        --gray-700:   #dce3ec;
        --gray-800:   #f1f5f9;
        --shadow:     0 2px 8px rgba(0, 0, 0, 0.35);
        --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.5);
    }

    /* ── Hardcoded-colour overrides ──────────────────────── */

    /* Genius search dropdown (hardcoded background: white) */
    .genius-dropdown {
        background: var(--surface);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    }
    .genius-result-item:hover,
    .genius-suggestion-item:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    /* Google sign-in button (hardcoded background: #fff) */
    .btn-google {
        background: var(--gray-200);
        color: var(--gray-700);
        border-color: var(--gray-300);
    }
    .btn-google:hover {
        background: var(--gray-300);
    }

    /* Feedback modal (hardcoded background: white) */
    .feedback-modal {
        background: var(--surface);
    }
    .btn-feedback-skip {
        background: var(--gray-200);
        color: var(--gray-600);
        border-color: var(--gray-300);
    }
    .btn-feedback-skip:hover {
        background: var(--gray-300);
    }

    /* Report modal inputs/selects (hardcoded background: white) */
    .report-select,
    .report-textarea,
    .country-code-select {
        background: var(--gray-200);
        color: var(--gray-700);
        border-color: var(--gray-300);
    }

    /* Status-check modal (hardcoded background: white) */
    .status-check-modal {
        background: var(--surface);
    }

    /* Auth pages */
    .auth-card,
    .auth-container .card {
        background: var(--surface);
    }

    /* Input / select / textarea elements */
    input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        background-color: var(--gray-200);
        color: var(--gray-700);
        border-color: var(--gray-300);
    }
    input::placeholder,
    textarea::placeholder {
        color: var(--gray-400);
    }
    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--primary);
        background-color: var(--gray-200);
    }

    /* Mobile bottom sheet */
    .filter-sheet {
        background: var(--surface);
    }

    /* Native select option dropdowns */
    option {
        background: var(--surface);
        color: var(--gray-700);
    }

    /* Admin & dashboard tables */
    table {
        background: var(--surface);
    }
    th {
        background: var(--gray-50);
        color: var(--gray-700);
    }
    tr:nth-child(even) td {
        background: rgba(255,255,255,0.03);
    }
    td {
        border-color: var(--gray-200);
        color: var(--gray-600);
    }

    /* Components using hardcoded background: white */
    .property-card,
    .card,
    .filter-panel,
    .modal-content,
    .dropdown-menu,
    .nav-dropdown,
    .sidebar,
    .swipe-card,
    .rejection-card,
    .edit-sheet,
    .hero-search-card {
        background: var(--surface);
    }

    /* Nav dropdown link hover */
    .nav-dropdown a:hover {
        background: rgba(255,255,255,0.07);
    }

    /* Mobile type pills light hover state */
    .fl-type-pill:hover {
        background: rgba(255,255,255,0.12);
        color: var(--gray-700);
    }

    /* Sticky chip bar on mobile listings */
    .sticky-chip-bar {
        background: var(--surface);
        border-bottom-color: var(--gray-200);
    }

    /* Scrollbar (Chromium) */
    ::-webkit-scrollbar-track { background: #111827; }
    ::-webkit-scrollbar-thumb { background: #3d4f63; }
    ::-webkit-scrollbar-thumb:hover { background: #4a6278; }
}

/* ══════════════════════════════════════════════════════════════
   POST / EDIT PROPERTY FORM — SMALL PHONE POLISH
   Target devices: iPhone SE (375 px), iPhone 14 (390 px)
   ══════════════════════════════════════════════════════════════ */

/* Extra-photo remove button: always visible on touch devices (not hover-only) */
@media (hover: none) {
    .file-upload-preview-grid .preview-item-small .remove-extra-photo {
        opacity: 1;
        width: 24px;
        height: 24px;
        top: 3px;
        right: 3px;
    }

    [dir="rtl"] .file-upload-preview-grid .preview-item-small .remove-extra-photo {
        right: auto;
        left: 3px;
    }
}

/* ── ≤ 640 px: initial tightening ── */
@media (max-width: 640px) {
    /* Location box: reduce heavy internal padding */
    .location-section {
        padding: 16px;
    }

    /* WhatsApp / contact choice cards: min touch height */
    .whatsapp-choice-option .choice-content,
    .contact-choice-option .choice-content {
        min-height: 48px;
    }

    /* Remove-preview (main/room photo) button: wider tap zone */
    .file-upload-inline .file-upload-preview .remove-preview {
        width: 40px;
        height: 40px;
    }

    /* Submit: always full-width on mobile */
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    /* Image delete overlay button (edit form): bigger tap area */
    .delete-image-btn {
        width: 32px;
        height: 32px;
        top: 6px;
        right: 6px;
        font-size: 0.85rem;
    }

    /* RTL: delete button position */
    [dir="rtl"] .delete-image-btn {
        right: auto;
        left: 6px;
    }

    /* Extra-photo remove button: always visible, slightly larger */
    .file-upload-preview-grid .preview-item-small .remove-extra-photo {
        opacity: 1;
        width: 24px;
        height: 24px;
    }
}

/* ── ≤ 480 px: most phones portrait ── */
@media (max-width: 480px) {
    /* Location section: tighter padding */
    .location-section {
        padding: 12px;
    }

    .location-section .section-label {
        font-size: 1rem;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    /* WhatsApp + contact stacked choice: tighter gap */
    .whatsapp-choice-selector,
    .contact-choice-options {
        gap: 8px;
    }

    /* Photo upload areas: compact but still tappable */
    .file-upload-inline {
        min-height: 100px;
    }

    .file-upload-inline .file-upload-content {
        min-height: 100px;
        padding: 18px 12px;
    }

    /* Extra-photo thumbnail grid: slightly smaller items so they wrap cleanly */
    .file-upload-preview-grid .preview-item-small {
        width: 60px;
        height: 60px;
    }

    .file-upload-preview-grid .add-more-photos {
        width: 60px;
        height: 60px;
    }

    /* Price row: force single-column stack (currency → price → period) */
    #priceRentRow,
    #priceRow {
        grid-template-columns: 1fr !important;
    }
}

/* ── ≤ 375 px: iPhone SE and similar ── */
@media (max-width: 375px) {
    /* Location section: absolute minimum padding */
    .location-section {
        padding: 10px;
    }

    /* Categorized images (edit form): tighter boxes */
    .categorized-images {
        gap: 10px;
    }

    .image-category-section {
        padding: 10px;
    }

    /* WhatsApp / contact choice text */
    .whatsapp-choice-option .choice-content span,
    .contact-choice-option .choice-content span {
        font-size: 0.85rem;
    }

    /* Form divider label: smaller */
    .form-divider span {
        font-size: 0.85rem;
    }

    /* Compact row gaps */
    .form-row,
    .form-row-2,
    .form-row-3 {
        gap: 12px;
    }

    /* Submit button: always full-width, no override */
    .btn-submit {
        width: 100% !important;
        padding: 15px 16px;
    }

    /* File upload: reduce redundant padding further */
    .file-upload-inline .file-upload-content {
        padding: 16px 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MANUAL DARK MODE — html[data-theme="dark"]
   Mirrors the @media (prefers-color-scheme: dark) rules above so
   users who click the toggle override their OS setting.
   ═══════════════════════════════════════════════════════════════ */

/* Toast (mirrors line ~9687 block) */
html[data-theme="dark"] .toast {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .toast-message {
    color: rgba(255, 255, 255, 0.9);
}
html[data-theme="dark"] .toast-close {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}
html[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* ── Token overrides ─────────────────────────────────────────── */
html[data-theme="dark"] :root,
html[data-theme="dark"] {
    --filter-fade-bg: #1e2a3a;
    --surface:    #1e2a3a;
    --secondary:  #1a2233;
    --black:      #e8edf3;
    --text:       #c5cdd8;
    --accent:     #4a6278;
    --gray-50:    #141c28;
    --gray-100:   #111827;
    --gray-200:   #2a3547;
    --gray-300:   #3d4f63;
    --gray-400:   #6b7280;
    --gray-500:   #9ca3af;
    --gray-600:   #c5cdd8;
    --gray-700:   #dce3ec;
    --gray-800:   #f1f5f9;
    --shadow:     0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ── Hardcoded-colour overrides ──────────────────────────────── */
html[data-theme="dark"] .genius-dropdown {
    background: var(--surface);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .genius-result-item:hover,
html[data-theme="dark"] .genius-suggestion-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .btn-google {
    background: var(--gray-200);
    color: var(--gray-700);
    border-color: var(--gray-300);
}
html[data-theme="dark"] .btn-google:hover {
    background: var(--gray-300);
}

html[data-theme="dark"] .feedback-modal {
    background: var(--surface);
}
html[data-theme="dark"] .btn-feedback-skip {
    background: var(--gray-200);
    color: var(--gray-600);
    border-color: var(--gray-300);
}
html[data-theme="dark"] .btn-feedback-skip:hover {
    background: var(--gray-300);
}

html[data-theme="dark"] .report-select,
html[data-theme="dark"] .report-textarea,
html[data-theme="dark"] .country-code-select {
    background: var(--gray-200);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

html[data-theme="dark"] .status-check-modal {
    background: var(--surface);
}

html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-container .card {
    background: var(--surface);
}

html[data-theme="dark"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background-color: var(--gray-200);
    color: var(--gray-700);
    border-color: var(--gray-300);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--gray-400);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: var(--primary);
    background-color: var(--gray-200);
}

html[data-theme="dark"] .filter-sheet {
    background: var(--surface);
}

html[data-theme="dark"] option {
    background: var(--surface);
    color: var(--gray-700);
}

html[data-theme="dark"] table {
    background: var(--surface);
}
html[data-theme="dark"] th {
    background: var(--gray-50);
    color: var(--gray-700);
}
html[data-theme="dark"] tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}
html[data-theme="dark"] td {
    border-color: var(--gray-200);
    color: var(--gray-600);
}

html[data-theme="dark"] .property-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .filter-panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .nav-dropdown,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .swipe-card,
html[data-theme="dark"] .rejection-card,
html[data-theme="dark"] .edit-sheet,
html[data-theme="dark"] .hero-search-card {
    background: var(--surface);
}

html[data-theme="dark"] .nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .fl-type-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gray-700);
}

html[data-theme="dark"] .sticky-chip-bar {
    background: var(--surface);
    border-bottom-color: var(--gray-200);
}

html[data-theme="dark"] ::-webkit-scrollbar-track { background: #111827; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3d4f63; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #4a6278; }

/* ── Light mode override (explicit user choice, suppress OS dark) ── */
@media (prefers-color-scheme: dark) {
    html[data-theme="light"] {
        --surface:    #ffffff;
        --secondary:  #f8fafc;
        --black:      #1e293b;
        --text:       #475569;
        --accent:     #e2e8f0;
        --gray-50:    #f8fafc;
        --gray-100:   #f1f5f9;
        --gray-200:   #e2e8f0;
        --gray-300:   #cbd5e1;
        --gray-400:   #94a3b8;
        --gray-500:   #64748b;
        --gray-600:   #475569;
        --gray-700:   #334155;
        --gray-800:   #1e293b;
        --shadow:     0 2px 8px rgba(0, 0, 0, 0.08);
        --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.15);
    }
    html[data-theme="light"] .toast { background: rgba(255,255,255,0.95); border-color: rgba(0,0,0,0.08); }
    html[data-theme="light"] .toast-message { color: #1e293b; }
    html[data-theme="light"] .toast-close { background: rgba(0,0,0,0.06); color: #475569; }
    html[data-theme="light"] .genius-dropdown { background: #ffffff; box-shadow: 0 12px 48px rgba(0,0,0,0.12); }
    html[data-theme="light"] .btn-google { background: #ffffff; color: #334155; border-color: #e2e8f0; }
    html[data-theme="light"] .btn-google:hover { background: #f1f5f9; }
    html[data-theme="light"] .feedback-modal,
    html[data-theme="light"] .status-check-modal { background: #ffffff; }
    html[data-theme="light"] .report-select,
    html[data-theme="light"] .report-textarea,
    html[data-theme="light"] .country-code-select { background: #ffffff; color: #334155; border-color: #e2e8f0; }
    html[data-theme="light"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    html[data-theme="light"] select,
    html[data-theme="light"] textarea { background-color: #ffffff; color: #334155; border-color: #e2e8f0; }
    html[data-theme="light"] .filter-sheet { background: #ffffff; }
    html[data-theme="light"] option { background: #ffffff; color: #334155; }
    html[data-theme="light"] table { background: #ffffff; }
    html[data-theme="light"] th { background: #f8fafc; color: #334155; }
    html[data-theme="light"] tr:nth-child(even) td { background: rgba(0,0,0,0.02); }
    html[data-theme="light"] td { border-color: #e2e8f0; color: #475569; }
    html[data-theme="light"] .property-card,
    html[data-theme="light"] .card,
    html[data-theme="light"] .filter-panel,
    html[data-theme="light"] .modal-content,
    html[data-theme="light"] .dropdown-menu,
    html[data-theme="light"] .nav-dropdown,
    html[data-theme="light"] .sidebar,
    html[data-theme="light"] .swipe-card,
    html[data-theme="light"] .rejection-card,
    html[data-theme="light"] .edit-sheet,
    html[data-theme="light"] .hero-search-card { background: #ffffff; }
    html[data-theme="light"] .sticky-chip-bar { background: #ffffff; border-bottom-color: #e2e8f0; }
    html[data-theme="light"] ::-webkit-scrollbar-track { background: #f1f5f9; }
    html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; }
    html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
}

/* ── Theme button: mobile sizing ─────────────────────────────── */
@media (max-width: 768px) {
    .theme-btn {
        width: auto;
        height: auto;
        font-size: 0.85rem;
        border-radius: 0;
        border: none;
        background: transparent;
        margin-inline-start: 4px;
        padding: 4px;
    }
    .theme-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        color: var(--primary);
    }
}

/* ── Desktop filter bar — single-row compact layout ── */
@media (min-width: 769px) {
    /* Fix position:sticky inside flex body */
    body { display: block; }
    main { min-height: calc(100vh - 200px); }

    /* Re-assert sticky explicitly for desktop */
    .filter-lane-wrap {
        display: flex;
        align-items: center;
        padding: 0 16px;
        max-width: 100%;
        position: sticky;
        top: var(--navbar-h);
        z-index: 120;
    }
    /* Redundant on desktop — More Filters covers it */
    .filter-lane-wrap .fl-filters-btn { display: none !important; }
    /* Row-break disabled on desktop — single row layout */
    .fl-row-break { display: none !important; }
    /* Allow dropdown panel to escape the button bounds */
    .fl-more-wrap {
        overflow: visible;
        position: relative;
        max-width: max-content;
        flex-shrink: 0;
    }
    .fl-more-wrap .more-filters-panel:not(.open) {
        display: none;
    }
    /* Form: single row, no wrapping — overflow visible so panel can drop down */
    .filter-lane-wrap .filter-lane {
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 5px 0;
        align-items: center;
    }
    /* Selects: grow to fill available space, shrink if needed — all stay on one row */
    .filter-lane-wrap .fl-select {
        flex: 1 1 0;
        min-width: 0;
        padding: 5px 20px 5px 8px;
        font-size: 0.79rem;
    }
    html[dir="rtl"] .filter-lane-wrap .fl-select {
        padding: 5px 8px 5px 20px;
        background-position: left 8px center;
    }
    /* Wrapper mirrors the select's flex role; ✕ narrowed to match 20px arrow slot */
    .filter-lane-wrap .fl-sel-wrap { flex: 1 1 0; min-width: 0; }
    .filter-lane-wrap .fl-sel-x { width: 20px; }

    /* Type pills — compact */
    .filter-lane-wrap .fl-type-pill {
        padding: 5px 10px;
        font-size: 0.79rem;
        flex-shrink: 0;
    }
    /* More Filters pill — compact */
    .filter-lane-wrap .fl-more-btn {
        padding: 5px 10px;
        font-size: 0.79rem;
    }
    /* Clear / active-filter chip — compact */
    .filter-lane-wrap .fl-clear-btn {
        padding: 4px 8px;
        font-size: 0.77rem;
        flex-shrink: 0;
    }

    /* Meta bar: right-side panel, vertically centered */
    .mobile-meta-bar {
        display: flex !important;
        align-items: center;
        align-self: center;
        gap: 6px;
        flex-shrink: 0;
        padding: 6px 0 6px 14px;
        margin-left: 10px;
        border-left: 1px solid var(--gray-200);
    }
    html[dir="rtl"] .mobile-meta-bar {
        border-left: none;
        border-right: 1px solid var(--gray-200);
        margin-left: 0;
        margin-right: 10px;
        padding: 6px 14px 6px 0;
    }
    /* Count text — compact */
    .mobile-meta-count {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--gray-500);
        white-space: nowrap;
    }
    /* Actions wrapper */
    .mobile-meta-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    /* Sort select — compact pill */
    .mobile-sort-select {
        appearance: none;
        -webkit-appearance: none;
        padding: 5px 24px 5px 10px;
        border-radius: 50px;
        border: 1.5px solid var(--gray-200);
        background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--gray-700);
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
        transition: border-color 0.15s;
        max-width: none;
    }
    .mobile-sort-select:focus { border-color: var(--primary); outline: none; }
    html[dir="rtl"] .mobile-sort-select {
        background-position: left 8px center;
        padding: 5px 10px 5px 24px;
    }
    /* Favorites — pill button with icon + label */
    .mobile-meta-fav {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 14px;
        border-radius: 50px;
        border: 1.5px solid var(--gray-200);
        background: var(--surface);
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--primary);
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.15s;
        flex-shrink: 0;
        width: auto;
        height: auto;
    }
    .mobile-meta-fav:hover {
        border-color: var(--primary);
        background: rgba(212,175,55,0.06);
    }
    /* Show the text label inside favorites on desktop */
    .meta-fav-label { display: inline; }

    /* Hide old section-header in listings (replaced by meta bar) */
    .listings-section .section-header { display: none; }
}

/* ── LTR desktop: undo select shrinking so filter lane can scroll ── */
@media (min-width: 769px) {
    html[dir="ltr"] .filter-lane-wrap .fl-select {
        flex: 0 0 auto;
        min-width: auto;
    }
    html[dir="ltr"] .filter-lane-wrap .fl-sel-wrap {
        flex: 0 0 auto;
        min-width: auto;
    }
}

/* ── Shrinking sticky header (mobile only, listings page) ── */
@media (max-width: 768px) {
    .navbar {
        background: #fff;
        border-bottom: none;
        box-shadow: none;
    }

    /* Navbar: shrink only on the listings/properties page */
    body.has-results-row {
        --navbar-h: 32px;
    }
    body.has-results-row .nav-container {
        height: 32px;
    }
    body.has-results-row .logo img {
        height: 30px;
        max-width: 42vw;
    }

    .results-search-row {
        background: #fff;
        border-bottom: none;
        margin: 0;
        padding: 1px 0;
        top: var(--navbar-h);
    }
    .filter-lane-wrap {
        margin: 0;
        background: #fff;
        box-shadow: none;
    }
    .results-search-input-wrap {
        background: #fff;
        padding: 3px 10px;
    }
    .results-search-input-wrap input {
        min-height: 22px;
        font-size: 0.78rem;
    }
    .results-search-submit {
        padding: 3px 10px;
        min-height: 22px;
        font-size: 0.78rem;
    }
    .filter-lane {
        padding: 3px 0 3px 12px;
    }
    .filter-lane > select,
    .filter-lane > button,
    .filter-lane > input {
        min-height: 26px;
    }
    .filter-lane > .fl-sel-wrap { min-height: 26px; }
    .fl-sel-x { width: 22px; }
    .fl-type-pill {
        padding: 3px 8px !important;
        font-size: 0.75rem !important;
    }
    .fl-select {
        padding: 3px 22px 3px 8px !important;
        font-size: 0.75rem !important;
    }
    html[dir="rtl"] .fl-select {
        padding: 3px 8px 3px 22px !important;
    }
    .fl-pill {
        padding: 3px 10px !important;
        font-size: 0.75rem !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   In-between desktop band (769px–1100px): single horizontal-scroll filter
   lane — mirrors the phone scroll lane (full-size controls, edge fades,
   bottom-sheet More Filters) WITHOUT pulling in mobile-only chrome (navbar
   shrink, font shrink, mobile meta bar, hidden section header).
   Appended last so it overrides the wide-desktop single-row block above.
   ────────────────────────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1100px) {
    /* Lane becomes a single horizontally-scrolling row */
    .filter-lane-wrap .filter-lane {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .filter-lane-wrap .filter-lane::-webkit-scrollbar { display: none; }
    .filter-lane-wrap .filter-lane::after { display: none; }

    /* Controls keep their full size (undo the wide-desktop shrink-to-fit) */
    .filter-lane-wrap .fl-select {
        flex: 0 0 auto;
        min-width: auto;
        max-width: none;
        padding: 8px 30px 8px 14px;
        font-size: 0.85rem;
    }
    html[dir="rtl"] .filter-lane-wrap .fl-select {
        padding: 8px 14px 8px 30px;
        background-position: left 12px center;
    }
    /* Wrapper: match the select's flex reset; ✕ uses full 30px arrow slot */
    .filter-lane-wrap .fl-sel-wrap { flex: 0 0 auto; min-width: auto; max-width: none; }
    .filter-lane-wrap .fl-sel-x { width: 30px; }
    .filter-lane-wrap .fl-type-pill {
        padding: 7px 16px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    .filter-lane-wrap .fl-more-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Leading "Filters" pill stays hidden — More Filters covers it */
    .filter-lane-wrap .fl-filters-btn { display: none !important; }

    /* RTL: use direction:rtl + flex-direction:row (matches the phone lane the
       fade-toggle script was written for) instead of the wide-desktop row-reverse. */
    html[dir="rtl"] .filter-lane-wrap .filter-lane {
        direction: rtl;
        flex-direction: row;
    }
    /* Keep type pills leading and More Filters trailing regardless of the
       RTL template's DOM reordering. */
    .filter-lane-wrap .filter-lane .fl-type-group { order: -1; }
    .filter-lane-wrap .filter-lane .fl-more-wrap  { order: 2; }

    /* Clear chip floats at the trailing edge — never extends the scroll width */
    .filter-lane-wrap .fl-clear-btn {
        position: sticky;
        right: 0;
        z-index: 5;
        background: var(--surface);
        box-shadow: -8px 0 10px var(--surface);
    }
    html[dir="rtl"] .filter-lane-wrap .fl-clear-btn {
        right: auto;
        left: 0;
        box-shadow: 8px 0 10px var(--surface);
    }

    /* Closed More Filters panel must not stretch the scroll width */
    .fl-more-wrap { overflow: visible; }
    .fl-more-wrap .more-filters-panel:not(.open) {
        position: absolute;
        width: 0;
        overflow: hidden;
    }

    /* ── Edge fade hints (toggled by the same scroll/resize script) ── */
    .filter-lane-wrap::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 48px;
        background: linear-gradient(to left, transparent, var(--surface, #fff));
        pointer-events: none;
        z-index: 4;
        opacity: 0;
        transition: opacity 0.2s;
    }
    .filter-lane-wrap.fl-scrolled::before { opacity: 1; }
    html[dir="rtl"] .filter-lane-wrap::before {
        left: auto;
        right: 0;
        background: linear-gradient(to right, transparent, var(--surface, #fff));
    }
    /* Trailing fade anchored to the meta bar's lane-side edge so it never
       sits over the meta bar controls. */
    .mobile-meta-bar { position: relative; }
    .mobile-meta-bar::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-48px);
        width: 48px;
        background: linear-gradient(to right, transparent, var(--surface, #fff));
        pointer-events: none;
        z-index: 4;
        transition: opacity 0.2s;
    }
    .filter-lane-wrap.fl-at-end .mobile-meta-bar::before { opacity: 0; }
    html[dir="rtl"] .mobile-meta-bar::before {
        left: auto;
        right: 0;
        transform: translateX(48px);
        background: linear-gradient(to left, transparent, var(--surface, #fff));
    }

    /* ── More Filters opens as a bottom sheet (escapes the scroll clip) ── */
    .mf-backdrop.active {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.45) !important;
        z-index: 1099 !important;
        opacity: 1 !important;
    }
    .fl-more-wrap .more-filters-panel.open {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 70vh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.18) !important;
        padding: 0 0 70px !important;
        background: var(--surface) !important;
        border: none !important;
        animation: slideUpSheet 0.3s ease !important;
        z-index: 1100 !important;
    }
    html[dir="rtl"] .fl-more-wrap .more-filters-panel.open {
        left: 0 !important;
        right: 0 !important;
    }
    .fl-more-wrap .more-filters-panel.open .sheet-handle {
        display: block !important;
        width: 44px !important;
        height: 5px !important;
        background: var(--gray-300) !important;
        border-radius: 3px !important;
        margin: 14px auto 6px !important;
        cursor: grab !important;
        touch-action: none !important;
    }
    .fl-more-wrap .more-filters-panel.open .more-filters-panel-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 16px !important;
        border-bottom: 1px solid var(--gray-100) !important;
        position: sticky !important;
        top: 0 !important;
        background: var(--surface) !important;
        z-index: 2 !important;
    }
    .fl-more-wrap .more-filters-panel.open .more-filters-close {
        background: none !important;
        border: none !important;
        color: var(--gray-500) !important;
        font-size: 1.1rem !important;
        width: auto !important;
        height: auto !important;
        padding: 2px 6px !important;
    }
    /* Apply / Clear pinned at the sheet bottom */
    .fl-more-wrap .more-filters-panel.open .more-filters-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        gap: 10px !important;
        padding: 10px 16px !important;
        background: var(--surface) !important;
        border-top: 1px solid var(--gray-100) !important;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.07) !important;
        z-index: 1101 !important;
    }
    .fl-more-wrap .more-filters-panel.open .btn-apply-filters {
        flex: 2 !important;
        padding: 10px !important;
        border-radius: 50px !important;
    }
    .fl-more-wrap .more-filters-panel.open .btn-clear-filters {
        flex: 1 !important;
        padding: 10px !important;
        border-radius: 50px !important;
        text-align: center !important;
    }
}
