/* ============================================================
   site.css — Estratégia Leilões
   Baseado no template HomeSpace (BootstrapMade)
   ============================================================ */

/* ── Variáveis ─────────────────────────────────────────────── */
:root {
    --color-primary:        #0d6efd;
    --color-primary-dark:   #0a58ca;
    --color-primary-light:  #e7f0ff;
    --color-accent:         #f97316;
    --color-success:        #198754;
    --color-danger:         #dc3545;
    --color-warning:        #ffc107;
    --color-text:           #212529;
    --color-muted:          #6c757d;
    --color-border:         #dee2e6;
    --color-bg:             #f8f9fa;
    --color-white:          #ffffff;
    --font-primary:         'Roboto', sans-serif;
    --font-heading:         'Montserrat', sans-serif;
    --shadow-sm:            0 2px 8px rgba(0,0,0,.08);
    --shadow-md:            0 4px 20px rgba(0,0,0,.12);
    --shadow-lg:            0 8px 40px rgba(0,0,0,.16);
    --radius-sm:            6px;
    --radius-md:            12px;
    --radius-lg:            20px;
    --transition:           all .3s ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background: var(--color-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }

/* ── Preloader ─────────────────────────────────────────────── */
#preloader {
    position: fixed; inset: 0;
    background: var(--color-white);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .4s ease;
}

/* ── Scroll Top ────────────────────────────────────────────── */
.scroll-top {
    position: fixed; right: 20px; bottom: 20px;
    width: 42px; height: 42px;
    background: var(--color-primary); color: #fff;
    border-radius: 50%;
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    font-size: 20px;
    box-shadow: var(--shadow-md);
}
.scroll-top.active { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-3px); }

/* ── Header ────────────────────────────────────────────────── */
.header {
    background: var(--color-white);
    height: 70px;
    z-index: 997;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.header.scrolled {
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--color-border);
}

.logo { text-decoration: none; }
.logo-icon { font-size: 2rem; color: var(--color-primary); }
.sitename {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
}
.sitename span { color: var(--color-primary); }

/* ── Navbar ────────────────────────────────────────────────── */
.navmenu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.navmenu a {
    display: flex; align-items: center;
    padding: 8px 16px;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: .92rem;
}
.navmenu a:hover, .navmenu a.active {
    color: var(--color-primary);
    background: var(--color-primary-light);
}
.mobile-nav-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-text);
    transition: var(--transition);
}

@media (max-width: 1199px) {
    .mobile-nav-toggle { display: block; }
    .navmenu {
        position: fixed;
        top: 70px; right: -100%;
        width: 280px; height: calc(100vh - 70px);
        background: var(--color-white);
        z-index: 998;
        box-shadow: var(--shadow-lg);
        padding: 20px;
        transition: right .3s ease;
        overflow-y: auto;
    }
    .navmenu.navmenu-active { right: 0; }
    .navmenu ul { flex-direction: column; gap: 4px; }
    .navmenu a { padding: 12px 16px; }
}

/* ── Section base ──────────────────────────────────────────── */
.section { padding: 60px 0; }
.light-background { background: var(--color-bg); }

.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    position: relative; display: inline-block;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}
.section-title p { color: var(--color-muted); max-width: 600px; margin: 0 auto; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { padding: 80px 0; background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 60%); }

.hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .85rem; font-weight: 600;
    margin-bottom: 20px;
}
.hero-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--color-text);
}
.hero-content p { font-size: 1.05rem; color: var(--color-muted); max-width: 500px; }

.btn-hero-primary {
    display: inline-flex; align-items: center;
    padding: 14px 28px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .95rem;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(13,110,253,.35);
}
.btn-hero-primary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13,110,253,.45); }

.btn-hero-outline {
    display: inline-flex; align-items: center;
    padding: 13px 28px;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .95rem;
    transition: var(--transition);
}
.btn-hero-outline:hover { background: var(--color-primary); color: #fff; }

/* Achievement grid */
.achievement-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.achievement-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--color-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    flex: 1; min-width: 130px;
}
.achievement-icon { font-size: 1.8rem; color: var(--color-primary); }
.achievement-number { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.achievement-text { font-size: .78rem; color: var(--color-muted); font-weight: 500; }

/* Hero feature cards */
.hero-cards { display: flex; flex-direction: column; gap: 16px; }
.feature-card {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--color-white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card-icon {
    width: 48px; height: 48px; min-width: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.bg-primary-soft { background: var(--color-primary-light); }
.bg-success-soft { background: #d1f0e0; }
.bg-warning-soft { background: #fff3cd; }
.feature-card-body h5 { font-size: 1rem; margin-bottom: 4px; }
.feature-card-body p { font-size: .85rem; color: var(--color-muted); margin: 0 0 8px; }
.feature-link { font-size: .85rem; font-weight: 600; color: var(--color-primary); }
.feature-link:hover { color: var(--color-primary-dark); }

/* ── Info Cards (Features Section) ────────────────────────── */
.info-card {
    background: var(--color-white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    height: 100%;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.info-icon {
    width: 64px; height: 64px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}
.info-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
.info-card p { color: var(--color-muted); font-size: .9rem; margin: 0; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header { padding: 40px 0 30px; background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 100%); border-bottom: 1px solid var(--color-border); }
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 8px 0 4px; }
.page-subtitle { color: var(--color-muted); font-size: 1rem; margin: 0; }
.badge-count { font-weight: 700; color: var(--color-primary); font-size: 1.1em; }

.breadcrumb-custom { background: none; padding: 0; font-size: .85rem; }
.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--color-muted); }
.breadcrumb-custom a { color: var(--color-primary); }
.breadcrumb-custom .active { color: var(--color-muted); }

/* ── Upload Card ───────────────────────────────────────────── */
.upload-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.upload-card-header h3 { font-size: 1.3rem; margin-bottom: 4px; }
.upload-card-header p { color: var(--color-muted); font-size: .9rem; margin-bottom: 24px; }

/* Dropzone */
.dropzone-area {
    position: relative;
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius-md);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    background: var(--color-primary-light);
    transition: var(--transition);
    min-height: 200px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
}
.dropzone-area:hover, .dropzone-area.dragover {
    background: #dae9ff;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 4px rgba(13,110,253,.12);
}
.dropzone-area.has-file { border-style: solid; background: #f0fff4; border-color: var(--color-success); }
.dropzone-icon { font-size: 3rem; color: var(--color-primary); }
.dropzone-text h5 { color: var(--color-text); font-size: 1.1rem; margin: 0; }
.dropzone-text p { color: var(--color-muted); font-size: .9rem; margin: 0; }
.dropzone-input {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

/* File Preview */
.file-preview {
    display: flex; align-items: center; gap: 14px;
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 16px;
}
.file-preview-icon { font-size: 2rem; }
.file-preview-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: .95rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .82rem; }
.btn-remove-file {
    background: none; border: none; color: var(--color-danger);
    font-size: 1.3rem; cursor: pointer; padding: 4px;
    transition: var(--transition);
}
.btn-remove-file:hover { transform: scale(1.2); }

/* Botão importar */
.btn-importar {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(13,110,253,.3);
}
.btn-importar:enabled:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13,110,253,.4); }
.btn-importar:disabled { background: #adb5bd; cursor: not-allowed; box-shadow: none; transform: none; }

/* Alert resultado */
.alert-resultado { border-radius: var(--radius-md); padding: 20px; }

/* Instructions Card */
.instructions-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: 100%;
}
.instructions-card h4 { font-size: 1.1rem; margin-bottom: 20px; color: var(--color-text); }
.instructions-list { list-style: none; padding: 0; margin: 0; }
.instructions-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
}
.instructions-list li:last-child { border-bottom: none; }
.step-number {
    background: var(--color-primary);
    color: #fff;
    width: 24px; height: 24px; min-width: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700;
}
.file-specs h5 { font-size: .95rem; margin-bottom: 10px; }
.file-specs code { background: var(--color-primary-light); color: var(--color-primary); padding: 1px 6px; border-radius: 4px; font-size: .85rem; }

/* ── Filtros ───────────────────────────────────────────────── */
.filtros-section { padding: 20px 0; }
.filtros-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.filtros-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.filtros-header h5 { margin: 0; font-size: 1rem; color: var(--color-text); }
.btn-limpar-filtros {
    background: none; border: 1px solid var(--color-border);
    color: var(--color-muted); padding: 5px 12px;
    border-radius: var(--radius-sm); font-size: .82rem;
    cursor: pointer; transition: var(--transition);
}
.btn-limpar-filtros:hover { border-color: var(--color-danger); color: var(--color-danger); }

/* ── Tabela ────────────────────────────────────────────────── */
.table-header-bar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}

.table-imoveis { font-size: .88rem; }
.table-imoveis thead tr { background: var(--color-bg); }
.table-imoveis thead th {
    font-family: var(--font-heading);
    font-size: .8rem; font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}
.table-imoveis tbody td { padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid #f1f3f5; }
.linha-imovel { transition: background .15s; }
.linha-imovel:hover { background: #f8f9ff !important; }

.numero-imovel { font-family: monospace; font-size: .82rem; color: var(--color-muted); }
.cidade-nome { font-weight: 500; font-size: .9rem; }
.modalidade-text { font-size: .83rem; color: var(--color-muted); }

/* ── Valores financeiros ────────────────────────────────────────────── */
.valor-avaliacao {
    display: block;
    font-size: .78rem;
    color: var(--color-muted);
    font-weight: 500;
}
.valor-avaliacao-label {
    display: block;
    font-size: .7rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    margin-bottom: 1px;
}
.valor-minimo {
    display: block;
    font-size: 1.05rem;
    color: var(--color-text);
    font-weight: 800;
}
.valor-minimo-label {
    display: block;
    font-size: .7rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    margin-bottom: 1px;
}
.property-valores {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.property-valor-item { display: flex; flex-direction: column; }

/* Tabela — valores (sem azul) */
td .valor-avaliacao { font-size: .85rem; }
td .valor-minimo    { font-size: .92rem; }

/* Badges */
.badge-tipo {
    display: inline-block;
    padding: 3px 10px; border-radius: 50px;
    font-size: .78rem; font-weight: 700;
    white-space: nowrap;
}
/* Cores por tipo de imóvel */
.badge-tipo-casa        { background: #d1f0e0; color: #146c43; }
.badge-tipo-apartamento { background: #dae9ff; color: #0a58ca; }
.badge-tipo-terreno     { background: #fff0d9; color: #b45309; }
.badge-tipo-comercial   { background: #ede9ff; color: #5b21b6; }
.badge-tipo-outro       { background: #e9ecef; color: #495057; }
.badge-desconto {
    display: inline-block;
    padding: 4px 10px; border-radius: 50px;
    font-size: .82rem; font-weight: 700;
}
.desconto-alto { background: #d1f0e0; color: #198754; }
.desconto-medio { background: #fff3cd; color: #664d03; }
.badge-sim { color: #198754; font-size: .82rem; font-weight: 600; }
.badge-nao { color: #dc3545; font-size: .82rem; font-weight: 600; }

/* Botões de ação */
.btn-acoes { display: flex; gap: 6px; justify-content: center; }
.btn-detalhe, .btn-externo {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: var(--transition);
    cursor: pointer;
}
.btn-detalhe { background: var(--color-primary-light); color: var(--color-primary); border: none; }
.btn-detalhe:hover { background: var(--color-primary); color: #fff; }
.btn-externo { background: #fff3e0; color: var(--color-accent); border: none; }
.btn-externo:hover { background: var(--color-accent); color: #fff; }
.btn-mapa-card {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: var(--transition);
    cursor: pointer;
    background: #e8f5e9; color: #2e7d32; border: none;
}
.btn-mapa-card:hover { background: #2e7d32; color: #fff; }
.btn-mapa-lista {
    background: none; border: none; padding: 0;
    font-size: 1rem; cursor: pointer; color: #adb5bd;
    line-height: 1; transition: color .2s, transform .15s; outline: none;
}
.btn-mapa-lista:hover { transform: scale(1.2); color: #2e7d32; }

.btn-viabilidade-card {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: var(--transition);
    cursor: pointer;
    background: #e3f2fd; color: #1565c0; border: none; text-decoration: none;
}
.btn-viabilidade-card:hover { background: #1565c0; color: #fff; }
.btn-viabilidade-lista {
    background: none; border: none; padding: 0;
    font-size: 1rem; cursor: pointer; color: #adb5bd;
    line-height: 1; transition: color .2s, transform .15s; outline: none;
    text-decoration: none; display: inline-block;
}
.btn-viabilidade-lista:hover { transform: scale(1.2); color: #1565c0; }

/* Paginação */
.pagination-custom .page-link {
    color: var(--color-primary);
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    font-size: .88rem;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}
.pagination-custom .page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.pagination-custom .page-link:hover { background: var(--color-primary-light); }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon { font-size: 4rem; color: #adb5bd; margin-bottom: 16px; }
.empty-state h4 { color: var(--color-muted); }
.empty-state p { color: var(--color-muted); font-size: .95rem; }

/* ── Modal Detalhes ────────────────────────────────────────── */
.detalhe-header { background: var(--color-bg); padding: 16px; border-radius: var(--radius-md); margin-bottom: 8px; }
.detalhe-section {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--color-border);
    height: 100%;
}
.detalhe-section-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.detalhe-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: .88rem;
}
.detalhe-item:last-child { border-bottom: none; }
.detalhe-label { color: var(--color-muted); font-weight: 500; flex-shrink: 0; }
.detalhe-valor { font-weight: 600; text-align: right; }

/* ── Timeline do Histórico ─────────────────────────────────── */
.historico-section {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--color-border);
}

.timeline {
    position: relative;
    padding: 8px 0 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 14px; top: 0; bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
    position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-badge {
    width: 30px; height: 30px; min-width: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    position: relative; z-index: 1;
    background: var(--color-white);
    border: 2px solid var(--color-border);
}
.timeline-badge-atual {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}
.timeline-badge-antigo {
    border-color: var(--color-border);
    color: var(--color-muted);
}

.timeline-content { flex: 1; min-width: 0; }
.timeline-date {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.timeline-dados { background: var(--color-white); border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--color-border); margin-top: 6px; }
.timeline-label { display: block; font-size: .72rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.timeline-valor { display: block; font-size: .88rem; font-weight: 500; color: var(--color-text); }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
    background: #1a2535;
    color: #adb5bd;
    padding: 36px 0 0;
    margin-top: 60px;
}
.footer a { color: #7eb3ff; }
.footer a:hover { color: var(--color-white); }
.footer-logo-icon { font-size: 2.2rem; color: var(--color-primary); }

/* Brand */
.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 2px;
}
.footer-brand-name span { color: var(--color-primary); }
.footer-brand-sub {
    font-size: .82rem;
    color: #7eb3ff;
    margin-top: 2px;
}

/* Nav links centralizados */
.footer-nav-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-nav-links a {
    color: #adb5bd;
    font-size: .88rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 3px 0;
    border-bottom: 1px solid transparent;
}
.footer-nav-links a:hover {
    color: var(--color-white);
    border-bottom-color: var(--color-primary);
}

/* Link Caixa (direita) */
.footer-caixa-link {
    display: inline-flex;
    align-items: center;
    color: #7eb3ff;
    font-size: .9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid rgba(126,179,255,.25);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
}
.footer-caixa-link:hover {
    color: var(--color-white);
    background: rgba(126,179,255,.12);
    border-color: rgba(126,179,255,.5);
}

/* Linha de copyright */
.footer-copy {
    margin-top: 28px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,.07);
    text-align: center;
    font-size: .8rem;
    color: #6c757d;
    letter-spacing: .01em;
}

/* ── Toggle Vista (Lista / Grade) ──────────────────────────── */
.view-toggle-group { display: flex; gap: 6px; }
.btn-view-toggle {
    width: 36px; height: 36px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; color: var(--color-muted);
    cursor: pointer; transition: var(--transition);
}
.btn-view-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-view-toggle.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ── Cards de Imóveis (Grade) ───────────────────────────────── */
.property-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex; flex-direction: column;
}
.property-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: transparent;
}

/* Wrapper da imagem */
.property-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--color-bg);
    flex-shrink: 0;
}
.property-image-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.property-item:hover .property-image-wrapper img { transform: scale(1.05); }
.property-image-wrapper .img-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #adb5bd;
    font-size: 2.5rem;
}
.property-image-wrapper .img-placeholder span { font-size: .78rem; margin-top: 6px; color: #adb5bd; }

/* Badges de status sobre a imagem */
.property-status {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; flex-wrap: wrap; gap: 4px;
}
.status-badge {
    padding: 3px 9px;
    border-radius: 50px;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.status-badge.financiamento { background: #d1f0e0; color: #198754; }
.status-badge.venda { background: #dae9ff; color: #0a58ca; }
.status-badge.desconto { background: #fff3cd; color: #664d03; }

/* Botões de ação sobre a imagem (favoritar / compartilhar) */
.property-actions {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; flex-direction: column; gap: 5px;
    opacity: 0;
    transform: translateX(6px);
    transition: var(--transition);
}
.property-item:hover .property-actions { opacity: 1; transform: translateX(0); }
.action-btn {
    width: 32px; height: 32px;
    background: var(--color-white);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; color: var(--color-text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.action-btn.favorite-btn:hover { background: #ffe0e0; color: #dc3545; }
.action-btn.share-btn:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* Corpo do card */
.property-details {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.property-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.property-price {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
}
.property-type-badge {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 2px 9px;
    border-radius: 50px;
    font-size: .74rem; font-weight: 700;
    white-space: nowrap;
}
.property-codigo {
    font-size: .78rem;
    color: var(--color-muted);
    font-family: monospace;
}
.property-address {
    font-size: .85rem;
    color: var(--color-muted);
    display: flex; align-items: flex-start; gap: 4px;
    margin: 0;
    line-height: 1.4;
}
.property-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0;
}
.spec-item {
    display: flex; align-items: center; gap: 4px;
    font-size: .8rem; color: var(--color-muted);
}
.spec-item i { color: var(--color-primary); font-size: .85rem; }
.spec-item span { font-weight: 500; }

.property-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f3f5;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 6px;
}
.modalidade-badge {
    font-size: .75rem;
    color: var(--color-muted);
    background: var(--color-bg);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.btn-ver-detalhe {
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-ver-detalhe:hover { background: var(--color-primary); color: #fff; }

/* ── Utilitários ───────────────────────────────────────────── */
.fw-semibold { font-weight: 600; }

/* ── Dashboard KPI Cards ───────────────────────────────────── */
.section-title-row {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

.kpi-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border-left: 4px solid var(--color-border);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.kpi-primary  { border-left-color: var(--color-primary); }
.kpi-success  { border-left-color: var(--color-success); }
.kpi-warning  { border-left-color: var(--color-warning); }
.kpi-danger   { border-left-color: var(--color-danger); }
.kpi-info     { border-left-color: #0dcaf0; }

.kpi-icon {
    width: 56px; height: 56px; min-width: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
}
.kpi-primary  .kpi-icon { background: var(--color-primary-light);  color: var(--color-primary); }
.kpi-success  .kpi-icon { background: #d1f0e0;  color: var(--color-success); }
.kpi-warning  .kpi-icon { background: #fff3cd;  color: #855f00; }
.kpi-danger   .kpi-icon { background: #ffe0e0;  color: var(--color-danger); }
.kpi-info     .kpi-icon { background: #cff4fc;  color: #0a6575; }

.kpi-body { flex: 1; min-width: 0; }
.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 4px;
}
.kpi-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}
.kpi-sub {
    font-size: .78rem;
    color: var(--color-muted);
}

/* ── Venda Direta Online — Destaque Visual ─────────────────── */

/* Badge inline (card footer / modal) */
.badge-vdo {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(249,115,22,.35);
}

/* Badge menor para tabela */
.badge-vdo-sm {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Faixa no topo do card */
.vdo-banner {
    background: linear-gradient(90deg, #f97316, #ea580c);
    color: #fff;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    padding: 6px 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Banner no modal */
.vdo-banner-modal {
    background: linear-gradient(90deg, #f97316, #ea580c);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(249,115,22,.35);
}

/* Linha VDO na tabela */
.linha-vdo {
    background: #fff9f5 !important;
    border-left: 3px solid #f97316;
}
.linha-vdo:hover { background: #fff4ed !important; }

/* ── Cards e linhas clicáveis ───────────────────────────────── */
.property-clickable {
    cursor: pointer;
    user-select: none;
}
.property-clickable:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
.property-clickable:hover .property-details { background: #fafbff; }

.linha-clickable { cursor: pointer; transition: background .12s; }
.linha-clickable:hover { background: #f0f6ff !important; }

/* ── Log de Erro na tabela ──────────────────────────────────── */
.log-erro-col {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .8rem;
}
.log-erro-cell {
    cursor: help;
    font-size: .8rem;
}

/* ── Responsividade extra ──────────────────────────────────── */
@media (max-width: 767px) {
    .section { padding: 40px 0; }
    .hero { padding: 40px 0; }
    .page-header { padding: 24px 0 20px; }
    .upload-card { padding: 20px; }
    .filtros-card { padding: 16px; }
    .hero-actions { justify-content: center; }
    .achievement-grid { justify-content: center; }
    .table-imoveis { font-size: .82rem; }
}

@media (max-width: 575px) {
    .btn-hero-primary, .btn-hero-outline { width: 100%; justify-content: center; }
    .upload-card { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════
   Enriquecimento — novos campos (Titulo, Disputa, FGTS,
   Regras de Pagamento, Imagem detalhe)
   ═══════════════════════════════════════════════════════ */

/* ── Título no card (grade) ─────────────────────────── */
.titulo-imovel {
    font-size: .93rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Título no modal de detalhe ─────────────────────── */
.titulo-imovel-detalhe {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 6px;
}

/* ── Badge "Em disputa" ─────────────────────────────── */
/* Usado no card (sobre a imagem) e na linha da tabela  */
.badge-disputa {
    display: inline-flex;
    align-items: center;
    background-color: #ff8c00;
    color: #fff;
    font-weight: 700;
    font-size: .72rem;
    border-radius: 5px;
    padding: 3px 8px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(255,140,0,.35);
}

/* ── FGTS Sim / Não ─────────────────────────────────── */
.fgts-sim {
    display: inline-flex;
    align-items: center;
    background: var(--color-success);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 600;
}
.fgts-nao {
    display: inline-flex;
    align-items: center;
    background: var(--color-muted);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .8rem;
}

/* ── Regras de Pagamento (texto longo) ──────────────── */
.descricao-regras {
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: #444;
    font-size: .87rem;
    max-width: 100%;
}

/* ── Imagem no detalhe (menor e quadrada) ───────────── */
.imagem-detalhe {
    width: 100%;
    max-width: 300px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f3f5;
    position: relative;
}
.imagem-detalhe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-placeholder-detalhe {
    display: none;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #adb5bd;
    font-size: 3rem;
}
.img-placeholder-detalhe span {
    font-size: .82rem;
    margin-top: 8px;
}

/* Responsivo: imagem menor em mobile */
@media (max-width: 767px) {
    .imagem-detalhe { max-width: 100%; height: 220px; }
    .titulo-imovel-detalhe { font-size: 1.1rem; }
}

/* ── Destaque de Preços (próximo à foto) ────────────── */
.preco-destaque-box {
    background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 100%);
    border: 1px solid #c7deff;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Linha do Valor de Avaliação */
.preco-avaliacao-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dce8ff;
}
.preco-avaliacao-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.preco-avaliacao-valor {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-muted);
}

/* Linha do Val. Mínimo de Venda */
.preco-venda-linha {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.preco-venda-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: block;
    margin-bottom: 2px;
}
.preco-venda-valor {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

/* Badge de desconto dentro do destaque */
.preco-desconto-badge {
    display: inline-flex;
    align-items: center;
    background: #d1f0e0;
    color: #146c43;
    font-weight: 800;
    font-size: .85rem;
    border-radius: 6px;
    padding: 4px 10px;
    white-space: nowrap;
    align-self: flex-end;
}

@media (max-width: 575px) {
    .preco-venda-valor { font-size: 1.3rem; }
}

/* ═══════════════════════════════════════════════════════
   Favoritos — botões, ícones e badge de contagem
   ═══════════════════════════════════════════════════════ */

/* ── Botão coração no card (sobre a imagem) ─────────── */
.btn-favorito-card {
    position: absolute;
    top: 10px; right: 10px;
    width: 34px; height: 34px;
    background: rgba(255,255,255,.92);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all .25s;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    outline: none;
}
.btn-favorito-card:hover { transform: scale(1.18); background: #fff; }
.btn-favorito-card.favorito-ativo  { color: #dc3545; }
.btn-favorito-card.favorito-inativo { color: #adb5bd; }
.btn-favorito-card.favorito-loading { opacity: .6; pointer-events: none; }

/* ── Botão coração na lista (tabela) ────────────────── */
.btn-favorito-lista {
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    transition: color .2s, transform .15s;
    outline: none;
}
.btn-favorito-lista.favorito-ativo  { color: #dc3545; }
.btn-favorito-lista.favorito-inativo { color: #adb5bd; }
.btn-favorito-lista:hover { transform: scale(1.2); color: #dc3545; }

/* ── Botão coração no modal de detalhe ──────────────── */
.btn-favorito-modal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 5px 14px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}
.btn-favorito-modal.favorito-ativo {
    color: #dc3545;
    border-color: #dc3545;
    background: #fff5f5;
}
.btn-favorito-modal.favorito-inativo { color: var(--color-muted); }
.btn-favorito-modal:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}
.btn-favorito-modal.favorito-loading { opacity: .6; pointer-events: none; }

/* ═══════════════════════════════════════════════════════
   Barra "Última Importação" — Dashboard
   ═══════════════════════════════════════════════════════ */

.ultima-importacao-bar {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 24px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid var(--color-primary);
    user-select: none;
}
.ultima-importacao-bar:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-primary-dark);
    background: #fafbff;
}
.ultima-importacao-bar:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.ultima-import-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.ultima-import-title {
    font-family: var(--font-heading);
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text);
}
.ultima-import-data {
    font-size: .85rem;
    color: var(--color-muted);
}
.ultima-import-clique {
    font-size: .82rem;
    color: var(--color-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: .7;
    transition: opacity .2s;
}
.ultima-importacao-bar:hover .ultima-import-clique { opacity: 1; }

.ultima-import-stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.import-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    flex: 1;
    min-width: 130px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background .15s;
}
.import-stat:hover { background: var(--color-bg); }
.import-stat i { font-size: 1.4rem; }
.import-stat-success i { color: var(--color-success); }
.import-stat-warning i { color: #b45309; }
.import-stat-danger  i { color: var(--color-danger); }
.import-stat-info    i { color: var(--color-primary); }

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text);
    display: block;
}
.stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: block;
    margin-top: 2px;
}

.import-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .import-stat { min-width: 100px; padding: 8px 12px; }
    .stat-value  { font-size: 1.2rem; }
    .ultima-import-header { margin-bottom: 10px; padding-bottom: 8px; }
}

/* ── Badge de contagem no nav ───────────────────────── */
.nav-favoritos-badge {
    display: inline-flex;
    align-items: center; justify-content: center;
    background: #dc3545;
    color: #fff;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    font-size: .7rem; font-weight: 700;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   Cards de UF — Modal "Detalhes da Importação"
   ═══════════════════════════════════════════════════════ */

.uf-card-detail {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    background: #fff;
    min-height: 58px;
}

.uf-card-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    border-color: var(--color-primary);
}

.uf-card-detail:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Sigla colorida à esquerda */
.uf-card-sigla {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 58px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .5px;
    flex-shrink: 0;
}

/* Corpo: total + percentual */
.uf-card-body {
    flex: 1;
    padding: 6px 10px;
    min-width: 0;
}

.uf-card-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.uf-card-pct {
    font-size: .72rem;
    color: #6c757d;
    margin-top: 1px;
}

/* Seta "ver mais" à direita */
.uf-card-arrow {
    padding: 0 10px;
    color: #adb5bd;
    font-size: .9rem;
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}

.uf-card-detail:hover .uf-card-arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAPA — Split layout + Google Maps markers + InfoWindow
   ═══════════════════════════════════════════════════════════════════════════ */

/* Layout dividido lista (~40%) | mapa (~60%) */
.split-wrapper {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: 70vh;
}

.split-lista {
    flex: 0 0 40%;
    min-width: 0;
    padding: 0 12px 40px 20px;
}

.split-mapa {
    flex: 0 0 60%;
    position: sticky;
    top: 72px;
    height: calc(100vh - 88px);
    padding: 0 20px 0 8px;
}

#mapaImoveis {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
}

/* Cards no painel esquerdo: força 2 colunas para aproveitar bem o espaço reduzido */
.split-lista #gradeCorpo > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Botão "Ver Mapa" — visível só no mobile */
.btn-toggle-mapa {
    display: none;
}

/* Mobile */
@media (max-width: 991px) {
    .split-wrapper { flex-direction: column; }

    .split-lista {
        flex: none;
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
    }

    .split-lista #gradeCorpo > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .split-mapa {
        display: none;
        flex: none;
        width: 100%;
        max-width: 100%;
        height: 55vw;
        min-height: 280px;
        max-height: 460px;
        position: relative;
        top: auto;
        padding: 12px 16px;
    }

    .split-mapa.mapa-visivel { display: block; }

    .btn-toggle-mapa {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
}

/* ── Marcadores customizados (AdvancedMarkerElement) ─────────────────────── */

.marker-imovel {
    background: #1e40af;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
    border: 2px solid #fff;
    transition: background .15s, transform .15s;
    cursor: pointer;
    user-select: none;
    line-height: 1.3;
}

.marker-destacado {
    background: #f59e0b !important;
    transform: scale(1.2);
}

/* ── Google Maps InfoWindow: remove padding padrão e arredonda ───────────── */

.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18) !important;
    max-width: 260px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
}

/* Esconde a barra de título padrão do InfoWindow */
.gm-style .gm-style-iw-ch { display: none !important; }

/* Botão fechar no canto superior direito */
.gm-style .gm-style-iw button.gm-ui-hover-effect {
    top: 4px !important;
    right: 4px !important;
    background: rgba(255,255,255,.85) !important;
    border-radius: 50% !important;
}

/* ── Conteúdo do popup ───────────────────────────────────────────────────── */

.mapa-popup {
    width: 260px;
    font-family: inherit;
}

.mapa-popup-img {
    position: relative;
    height: 140px;
    background: #f1f5f9;
    overflow: hidden;
}

.mapa-popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mapa-popup-sem-img {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.mapa-popup-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    z-index: 1;
}

.mapa-popup-body {
    padding: 12px;
}

.mapa-popup-body p {
    margin: 0 0 4px;
    line-height: 1.35;
}

.mapa-popup-titulo {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mapa-popup-codigo {
    font-size: 11px;
    color: #94a3b8;
}

.mapa-popup-preco {
    font-size: 17px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px !important;
}

.mapa-popup-specs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.mapa-popup-specs .sep {
    color: #cbd5e1;
    font-size: 10px;
}

.mapa-popup-loc {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 0 !important;
}

/* ── Vista mapa (toggle de visualização) ─────────────────────────────────── */

#viewMapa #mapaImoveis {
    height: calc(100vh - 320px);
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
}
