/**
 * EC Vendas — sobreposição mínima à paleta do AdminUIUX (theme-pista mantido no body).
 * Primária #001738 · Acento #3396ed · Superfície #fdfdfc
 */
:root {
    --ec-primary: #001738;
    --ec-accent: #3396ed;
    --ec-surface: #fdfdfc;
    --ec-vendas-radius: 4px;
}

/* Menos arredondamento nos botões (e controles de formulário) */
.btn:not(.rounded-circle):not(.btn-circle),
.form-control,
.form-select,
.input-group-text {
    border-radius: var(--ec-vendas-radius) !important;
}

body {
    --adminuiux-theme-1: var(--ec-primary);
    --adminuiux-theme-accent-1: var(--ec-accent);
    --adminuiux-theme-1-rgb: 0, 23, 56;
    --adminuiux-theme-accent-1-rgb: 51, 150, 237;
}

.adminuiux-content,
#main-content {
    background-color: var(--ec-surface);
}

.btn-theme,
.btn-accent {
    --bs-btn-bg: var(--ec-accent);
    --bs-btn-border-color: var(--ec-accent);
    --bs-btn-hover-bg: #2680d4;
    --bs-btn-hover-border-color: #2680d4;
}

.adminuiux-header .navbar-brand img[data-bs-img] {
    object-fit: contain;
}

.vendas-welcome-avatar {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
}

/* ===== Cadastro de imóvel ===== */

/* Dropzone.js — cadastro de imóvel (preview AdminUIUX: sucesso, erro, progresso) */
.imv-dropzone.dropzone {
    min-height: 7rem;
    border-radius: 0.85rem;
}

.imv-dropzone.dropzone .dz-message {
    margin: 1rem 0;
}

.imv-dropzone.dropzone .dz-button {
    border: 0;
    background: transparent;
    color: var(--ec-accent);
    font-weight: 500;
    padding: 0;
}

.imv-dropzone.dropzone .dz-button:hover {
    text-decoration: underline;
}

/* Previews em linha (como component-dropzone do template) */
.imv-dropzone.dropzone.dz-started .dz-message {
    display: none;
}

.imv-dropzone.dropzone .dz-preview {
    margin: 0.5rem;
}

.imv-dropzone.dropzone .dz-preview .dz-image {
    border-radius: 0.65rem;
    overflow: hidden;
}

/* Badge "Capa" no primeiro preview do Dropzone (no cadastro) */
#imvDropzoneMidias.dropzone .dz-preview:first-child .dz-image {
    position: relative;
}

#imvDropzoneMidias.dropzone .dz-preview:first-child .dz-image::after {
    content: 'Capa';
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    background-color: var(--ec-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    line-height: 1.1;
    z-index: 2;
}

#imvDropzoneMidias.dropzone .dz-preview .dz-image {
    position: relative;
}

/* ===== Busca vendas (mobile) ===== */

.vendas-busca-wrap {
    position: relative;
}

.vendas-busca-wrap .form-control {
    border-radius: 999px;
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    min-height: 2.75rem;
    font-size: 1rem;
}

.vendas-busca-wrap .busca-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.vendas-ruas-busca__clear {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.vendas-ruas-busca__clear:active {
    background: rgba(0, 23, 56, 0.06);
}

.vendas-ruas-busca__meta {
    margin-top: -0.25rem;
}

/* ===== Home Vendas — ruas expansíveis ===== */

.vendas-ruas {
    --vendas-rua-font: "DM Sans", "Open Sans", sans-serif;
    --vendas-rua-display: "Fraunces", "Poppins", serif;
    font-family: var(--vendas-rua-font);
}

.vendas-ruas__heading {
    font-family: var(--vendas-rua-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--ec-primary);
    margin-bottom: 0.75rem;
}

.vendas-rua {
    margin-bottom: 0.65rem;
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 23, 56, 0.06), 0 4px 16px rgba(0, 23, 56, 0.04);
}

.vendas-rua__header {
    display: flex;
    align-items: stretch;
    background: var(--ec-primary);
}

.vendas-rua__trigger {
    flex: 1;
    min-width: 0;
    width: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.vendas-rua__header:hover .vendas-rua__trigger,
.vendas-rua__trigger:hover,
.vendas-rua__trigger:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    outline: none;
}

.vendas-rua__trigger:focus-visible {
    box-shadow: inset 0 0 0 2px var(--ec-accent);
}

.vendas-rua__projeto-btn {
    flex-shrink: 0;
    align-self: center;
    margin-right: 0.65rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.vendas-rua__projeto-btn:hover,
.vendas-rua__projeto-btn:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
    transform: scale(1.04);
}

.vendas-rua__numero {
    flex-shrink: 0;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    border-radius: 0.55rem;
    background: rgba(51, 150, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0.05rem;
}

.vendas-rua__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: rgba(51, 150, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-top: 0.05rem;
}

.vendas-rua__meta {
    flex: 1;
    min-width: 0;
}

.vendas-rua__nome {
    font-family: var(--vendas-rua-display);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
    white-space: normal;
    word-break: break-word;
}

.vendas-rua__sub {
    font-size: 0.72rem;
    opacity: 0.75;
    margin: 0.15rem 0 0;
}

.vendas-rua__count {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
}

.vendas-rua__chevron {
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.85;
    transition: transform 0.25s ease;
    margin-top: 0.15rem;
}

.vendas-rua.is-open .vendas-rua__chevron {
    transform: rotate(180deg);
}

.vendas-rua__panel {
    background: #fff;
    border: 1px solid rgba(0, 23, 56, 0.08);
    border-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .vendas-rua__panel {
        animation: vendasRuaReveal 0.28s ease;
    }
}

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

.vendas-unidades {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.75rem;
}

@media (min-width: 576px) {
    .vendas-unidades {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .vendas-unidades {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
        padding: 1rem;
    }
}

.vendas-unidade {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.7rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(0, 23, 56, 0.1);
    background: var(--ec-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.vendas-unidade:hover {
    border-color: var(--ec-accent);
    box-shadow: 0 6px 18px rgba(51, 150, 237, 0.12);
    transform: translateY(-1px);
    color: inherit;
}

.vendas-unidade--bloqueada {
    cursor: not-allowed;
    opacity: 0.82;
    background: rgba(108, 117, 125, 0.06);
}

.vendas-unidade--bloqueada:hover {
    border-color: rgba(0, 23, 56, 0.1);
    box-shadow: none;
    transform: none;
}

.vendas-unidade__titulo {
    font-family: var(--vendas-rua-display);
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.2;
    color: var(--ec-primary);
    margin: 0;
}

.vendas-unidade__modelo {
    font-size: 0.72rem;
    color: #5c6b7a;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vendas-unidade__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: auto;
}

.vendas-pill {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 0.18rem 0.45rem;
    display: inline-block;
    font-weight: 600;
    line-height: 1.2;
}

.vendas-pill--disponivel {
    background: rgba(25, 135, 84, 0.14);
    color: #198754;
}

.vendas-pill--pre-reservado {
    background: rgba(51, 150, 237, 0.16);
    color: #2563eb;
}

.vendas-pill--reservado {
    background: rgba(234, 88, 12, 0.14);
    color: #c2410c;
}

.vendas-pill--indisponivel {
    background: rgba(220, 53, 69, 0.14);
    color: #dc3545;
}

.vendas-pill--bloqueado {
    background: rgba(108, 117, 125, 0.14);
    color: #6c757d;
}

.vendas-pill--destaque {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.2));
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.vendas-ruas__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.vendas-rua[hidden] {
    display: none !important;
}

/* ===== Mapa de loteamento — quadras e lotes ===== */

.vendas-loteamento {
    --vendas-rua-font: "DM Sans", "Open Sans", sans-serif;
    --vendas-rua-display: "Fraunces", "Poppins", serif;
    font-family: var(--vendas-rua-font);
}

.vendas-rua__empreendimento {
    font-size: 0.68rem;
    opacity: 0.85;
    margin: 0.1rem 0 0;
    font-style: italic;
}

.vendas-loteamento__quadras {
    padding: 0.75rem;
}

@media (min-width: 992px) {
    .vendas-loteamento__quadras {
        padding: 1rem;
    }
}

.vendas-quadra + .vendas-quadra {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(0, 23, 56, 0.1);
}

.vendas-quadra__titulo {
    font-family: var(--vendas-rua-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ec-primary);
    margin: 0 0 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vendas-quadra__count {
    font-family: var(--vendas-rua-font);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 23, 56, 0.06);
    color: #5c6b7a;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.vendas-quadra__lado {
    font-size: 0.72rem;
    font-weight: 600;
    color: #5c6b7a;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vendas-lotes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 576px) {
    .vendas-lotes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .vendas-lotes-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

.vendas-lote {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.65rem 0.6rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(0, 23, 56, 0.1);
    background: var(--ec-surface);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.vendas-lote:hover,
.vendas-lote--link:hover {
    border-color: var(--ec-accent);
    box-shadow: 0 4px 14px rgba(51, 150, 237, 0.1);
    transform: translateY(-1px);
    color: inherit;
}

.vendas-lote--bloqueado {
    opacity: 0.82;
    background: rgba(108, 117, 125, 0.05);
    cursor: not-allowed;
}

.vendas-lote__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.vendas-lote__titulo {
    font-family: var(--vendas-rua-display);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
    color: var(--ec-primary);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.vendas-lote__fav {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #adb5bd;
    padding: 0;
    line-height: 1;
    font-size: 0.9rem;
}

.vendas-lote__fav.is-favorito,
.vendas-lote__fav:hover {
    color: #e11d48;
}

.vendas-lote__modelo {
    font-size: 0.7rem;
    color: #5c6b7a;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vendas-lote__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: auto;
}

.vendas-lote__preco {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ec-primary);
    margin: 0;
}

.vendas-lote__areas {
    font-size: 0.65rem;
    color: #6c757d;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
