/* ImobiGestor — identidade visual: verdes, branco e cinzas. */
:root {
    --brand-900: #0f3d2c;
    --brand-800: #14523a;
    --brand-700: #1a6b4b;
    --brand-600: #1e8a5a;
    --brand-100: #e3f2ea;

    --surface: #ffffff;
    --background: #f3f5f4;
    --ink: #1f2a26;
    --ink-muted: #5f6b66;
    --grid: #e4e8e6;
    --border: #dde3e0;

    --chart-receita: #1e8a5a;
    --chart-despesa: #d0661c;

    --sidebar-width: 250px;

    --bs-primary: var(--brand-700);
    --bs-primary-rgb: 26, 107, 75;
    --bs-link-color: var(--brand-700);
    --bs-link-color-rgb: 26, 107, 75;
    --bs-link-hover-color: var(--brand-900);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--background);
}

.btn-primary {
    --bs-btn-bg: var(--brand-700);
    --bs-btn-border-color: var(--brand-700);
    --bs-btn-hover-bg: var(--brand-800);
    --bs-btn-hover-border-color: var(--brand-800);
    --bs-btn-active-bg: var(--brand-900);
    --bs-btn-active-border-color: var(--brand-900);
    --bs-btn-disabled-bg: var(--brand-700);
    --bs-btn-disabled-border-color: var(--brand-700);
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 .2rem rgba(30, 138, 90, .2);
}
.form-check-input:checked { background-color: var(--brand-700); border-color: var(--brand-700); }
.progress-bar { background-color: var(--brand-600); }

/* ---------- Estrutura ---------- */
body.app { min-height: 100vh; }

.app-shell { display: flex; min-height: 100vh; }

.content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1rem;
    background: var(--brand-900);
    color: #fff;
}
.brand-text { font-weight: 600; letter-spacing: .02em; }

/* ---------- Sidebar ---------- */
.sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    --bs-offcanvas-bg: var(--brand-900);
    --bs-offcanvas-color: #fff;
    /* !important: o Bootstrap força fundo transparente em .offcanvas-lg no desktop. */
    background-color: var(--brand-900) !important;
    color: #fff;
}

@media (min-width: 992px) {
    /* O Bootstrap esconde o cabeçalho do offcanvas no desktop; mantém a marca visível. */
    .sidebar .offcanvas-header { display: flex; }
    .sidebar {
        width: var(--sidebar-width);
        flex-shrink: 0;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .sidebar .offcanvas-body { display: flex; flex-direction: column; }
}

.sidebar-header { padding: 1.25rem 1.25rem .75rem; }

.brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.brand:hover { color: #fff; }
.brand i { color: #7fd1a8; }

.sidebar-body {
    display: flex;
    flex-direction: column;
    padding: 0 .75rem 1rem;
}

.sidebar-section {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9fd3b8;
    margin: 1.1rem .6rem .35rem;
}

.sidebar .nav-link {
    color: #eef6f2;
    border-radius: .4rem;
    padding: .5rem .65rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .92rem;
    transition: background-color .15s, color .15s;
}
.sidebar .nav-link i { color: #9fd3b8; font-size: 1rem; }
.sidebar .nav-link:hover,
.sidebar .nav-link:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar .nav-link:hover i { color: #fff; }
.sidebar .nav-link:focus-visible { outline: 2px solid #9fd3b8; outline-offset: -2px; }
.sidebar .nav-link.active {
    background: var(--brand-700);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #9fd3b8;
}
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-link.disabled { color: rgba(238, 246, 242, .6); }
.sidebar .nav-link.disabled i { color: rgba(159, 211, 184, .6); }

.badge-fase {
    margin-left: auto;
    font-size: .62rem;
    padding: .1rem .35rem;
    color: #cfe7db;
    border: 1px solid rgba(159, 211, 184, .45);
    border-radius: .25rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem .5rem 0;
    border-top: 1px solid rgba(255, 255, 255, .15);
    color: #eef6f2;
}

/* ---------- Páginas ---------- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.card { border-color: var(--border); border-radius: .6rem; }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .6rem;
    padding: 1rem 1.1rem;
    height: 100%;
}
.stat-card-destaque { border-left: 4px solid var(--brand-600); }
.stat-label { font-size: .82rem; color: var(--ink-muted); display: flex; align-items: center; gap: .4rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat-money { font-size: 1.35rem; }

.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; }
.dot-receita { background: var(--chart-receita); }
.dot-despesa { background: var(--chart-despesa); }

.chart-card .card-body { display: flex; flex-direction: column; }
.chart-title { font-size: .95rem; font-weight: 600; margin-bottom: .75rem; }
.chart-legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--ink-muted); margin-bottom: .5rem; }
.chart-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.chart-box { position: relative; height: 240px; }

/* ---------- Login / páginas públicas ---------- */
body.publico { background: var(--background); }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(160deg, var(--brand-900) 0%, var(--brand-700) 100%);
}
.login-card { width: 100%; max-width: 400px; border: none; }
.login-logo {
    width: 56px; height: 56px; margin: 0 auto;
    border-radius: 14px;
    background: var(--brand-100);
    color: var(--brand-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

@media (max-width: 575.98px) {
    .content { padding: 1rem; }
    .stat-value { font-size: 1.5rem; }
    .stat-money { font-size: 1.15rem; }
}

/* ---------- Utilitários ---------- */
.min-w-0 { min-width: 0; }
.texto-livre { white-space: pre-line; }
a.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.stat-link:hover { border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(15, 61, 44, .08); }

/* ---------- Selos de situação (ícone + texto, nunca só cor) ---------- */
.selo {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .75rem; font-weight: 600;
    padding: .2rem .55rem; border-radius: 999px;
    border: 1px solid transparent;
}
.selo-disponivel { background: #e3f2ea; color: #14523a; border-color: #b9dfc9; }
.selo-locado     { background: #e6eefb; color: #1d4a8c; border-color: #c3d4f2; }
.selo-manutencao { background: #fdf0e3; color: #8a4310; border-color: #f3d2b1; }
.selo-reservado  { background: #f1ebfa; color: #5b3a8a; border-color: #dccff0; }
.selo-inativo    { background: #eceeed; color: #4f5753; border-color: #d6dad8; }

/* ---------- Lista de imóveis ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; }
.chip {
    white-space: nowrap; font-size: .85rem; text-decoration: none;
    padding: .3rem .8rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); color: var(--ink);
}
.chip:hover { border-color: var(--brand-600); color: var(--brand-800); }
.chip.active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.imovel-card { overflow: hidden; }
.imovel-card.imovel-inativo { opacity: .7; }
.imovel-foto { position: relative; display: block; aspect-ratio: 16 / 10; background: #e9edeb; }
.imovel-foto img { width: 100%; height: 100%; object-fit: cover; }
.imovel-foto .selo { position: absolute; top: .6rem; left: .6rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.sem-foto { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #a3aca8; font-size: 2rem; }
.imovel-nome { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imovel-nome:hover { color: var(--brand-700); }
.imovel-valor { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.imovel-acoes { display: flex; justify-content: space-between; background: var(--surface); padding: .35rem .5rem; }
.imovel-acoes a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem;
    font-size: .7rem; color: var(--ink-muted); text-decoration: none; padding: .3rem 0; border-radius: .35rem;
}
.imovel-acoes a i { font-size: 1rem; }
.imovel-acoes a:hover { color: var(--brand-700); background: var(--brand-100); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-muted); }
.empty-state > i { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

/* ---------- Detalhes ---------- */
.imovel-header-foto { width: 120px; aspect-ratio: 4 / 3; border-radius: .5rem; overflow: hidden; background: #e9edeb; flex-shrink: 0; }
.imovel-header-foto img { width: 100%; height: 100%; object-fit: cover; }

.abas-wrapper { overflow-x: auto; scrollbar-width: thin; }
.abas { flex-wrap: nowrap; border-bottom: none; }
.abas .nav-link { white-space: nowrap; color: var(--ink-muted); font-size: .9rem; }
.abas .nav-link.active { color: var(--brand-800); font-weight: 600; background: var(--surface); border-color: var(--border) var(--border) var(--surface); }
.card-aba { border-top-left-radius: 0; padding: 1.25rem; }

.resumo-lista { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 0; }
.resumo-lista dt { font-weight: 500; color: var(--ink-muted); font-size: .88rem; }
.resumo-lista dd { margin: 0; }

.mini-secao { border: 1px solid var(--border); border-radius: .5rem; padding: .85rem 1rem; margin-bottom: .75rem; }
.mini-secao h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); margin-bottom: .5rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .82rem; background: var(--brand-100); color: var(--brand-800); padding: .2rem .55rem; border-radius: .35rem; }

.thumbs { display: flex; gap: .5rem; overflow-x: auto; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: .35rem; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .4rem 1rem; }

.lista-regras { list-style: none; padding: 0; margin: 0; }
.lista-regras > li { padding: .75rem 0; border-bottom: 1px solid var(--grid); }
.lista-regras > li:last-child { border-bottom: none; }
.regra-inativa { opacity: .6; }

.upload-box { border: 1px dashed var(--border); border-radius: .5rem; padding: 1rem; background: #fafbfa; }
.upload-box input[type=file] { flex: 1 1 16rem; }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.galeria-item { position: relative; margin: 0; border: 1px solid var(--border); border-radius: .5rem; overflow: hidden; background: var(--surface); }
.galeria-item.principal { border-color: var(--brand-600); box-shadow: 0 0 0 2px var(--brand-100); }
.galeria-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.selo-principal {
    position: absolute; top: .4rem; left: .4rem; font-size: .7rem; font-weight: 600;
    background: var(--brand-700); color: #fff; padding: .15rem .45rem; border-radius: .3rem;
}
.galeria-acoes { display: flex; gap: .25rem; padding: .35rem; }

.timeline { list-style: none; padding: 0 0 0 1rem; margin: 0; border-left: 2px solid var(--grid); }
.timeline > li { position: relative; padding: 0 0 1rem .75rem; }
.timeline > li::before {
    content: ""; position: absolute; left: -1.38rem; top: .35rem;
    width: .65rem; height: .65rem; border-radius: 50%; background: var(--brand-600); border: 2px solid var(--surface);
}
.timeline-data { font-size: .78rem; color: var(--ink-muted); }

.placeholder-fase { text-align: center; padding: 2rem 1rem; color: var(--ink); }
.placeholder-fase > i { font-size: 2rem; color: #a3aca8; display: block; margin-bottom: .5rem; }

/* ---------- Formulários ---------- */
.form-section { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); font-weight: 700; margin-bottom: 1rem; }
.form-actions {
    display: flex; justify-content: flex-end; gap: .5rem;
    position: sticky; bottom: 0; padding: .75rem 0; background: var(--background);
}

/* ---------- Configurações ---------- */
.lista-cadastro { list-style: none; padding: 0; margin: 0; }
.lista-cadastro > li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--grid); }
.lista-cadastro > li.item-inativo input { color: var(--ink-muted); }

@media (max-width: 575.98px) {
    .imovel-header-foto { width: 100%; }
    .card-aba { padding: 1rem; }
    .resumo-lista { grid-template-columns: 1fr; gap: .1rem; }
    .resumo-lista dd { margin-bottom: .5rem; }
    .form-actions .btn { flex: 1; }
}

/* ---------- Anúncios ---------- */
.selo-anunciado { background: #ffffff; color: #14523a; border-color: #b9dfc9; }
.imovel-foto .selo-anunciado { left: auto; right: .6rem; }

/* Botão de WhatsApp: verde escuro (contraste 6,5:1 com texto branco). */
.btn-whatsapp {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1a6b4b;
    --bs-btn-border-color: #1a6b4b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #14523a;
    --bs-btn-hover-border-color: #14523a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0f3d2c;
    --bs-btn-active-border-color: #0f3d2c;
    font-weight: 600;
}

/* ---------- Página pública ---------- */
.previa-banner {
    background: #fdf0e3; color: #8a4310; border-bottom: 1px solid #f3d2b1;
    padding: .6rem 1rem; text-align: center; font-size: .9rem;
}
.pub-container { width: 100%; max-width: 1100px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.pub-topo { background: var(--brand-900); color: #fff; padding: .8rem 0; }
.pub-topo i { color: #9fd3b8; }
.pub-main { padding-top: 1.25rem; padding-bottom: 6rem; }

.pub-galeria .carousel { border-radius: .75rem; overflow: hidden; background: #1f2a26; }
.pub-galeria .carousel-item img { aspect-ratio: 16 / 9; object-fit: contain; background: #1f2a26; }
.pub-contador {
    position: absolute; right: .75rem; bottom: .75rem; z-index: 2;
    background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px;
}
.pub-thumbs { display: flex; gap: .5rem; overflow-x: auto; margin-top: .5rem; padding-bottom: .25rem; }
.pub-thumbs button { border: 2px solid transparent; padding: 0; border-radius: .4rem; overflow: hidden; flex-shrink: 0; background: none; opacity: .7; }
.pub-thumbs button.active, .pub-thumbs button:hover { border-color: var(--brand-600); opacity: 1; }
.pub-thumbs img { width: 84px; height: 60px; object-fit: cover; display: block; }
.pub-sem-foto {
    aspect-ratio: 16 / 7; border-radius: .75rem; background: #e9edeb; color: #8a948f;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; font-size: 2rem;
}
.pub-sem-foto span { font-size: .9rem; }

.pub-tipo { background: var(--brand-100); color: var(--brand-800); font-weight: 600; }
.pub-titulo { font-size: 1.6rem; font-weight: 700; margin: .5rem 0 .25rem; }
.pub-local { color: var(--ink-muted); margin-bottom: .75rem; }
.pub-local i { color: var(--brand-700); }
.pub-preco { font-size: 1.75rem; font-weight: 700; color: var(--brand-800); margin-bottom: .75rem; font-variant-numeric: tabular-nums; }
.pub-preco span { font-size: 1rem; font-weight: 400; color: var(--ink-muted); }

.pub-secao { background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.pub-secao h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.pub-caracteristicas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem 1rem; }
.pub-caracteristicas i { color: var(--brand-600); }
.pub-regras { list-style: none; padding: 0; margin: 0; }
.pub-regras li { padding: .5rem 0; border-bottom: 1px solid var(--grid); }
.pub-regras li:last-child { border-bottom: none; padding-bottom: 0; }

.pub-card { background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; padding: 1.25rem; position: sticky; top: 1rem; }
.pub-valores { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.pub-valores dt { font-weight: 400; color: var(--ink-muted); }
.pub-valores dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pub-valores .total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--grid); padding-top: .35rem; }
.pub-contato { margin-top: 1rem; display: grid; gap: .35rem; font-size: .92rem; }
.pub-contato i { color: var(--brand-700); width: 1.1rem; display: inline-block; }

.pub-barra-celular {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
}
.pub-rodape { border-top: 1px solid var(--border); color: var(--ink-muted); padding: 1.25rem 0 6rem; }
@media (min-width: 992px) { .pub-rodape { padding-bottom: 1.25rem; } }

/* ---------- Listas (contratos, inquilinos) ---------- */
.lista-contratos { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; }
.card-body .lista-contratos { border-radius: .5rem; }
.lista-contratos > li + li { border-top: 1px solid var(--grid); }
.lista-contratos > li.item-inativo { opacity: .65; }
.lista-contratos-link {
    display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem;
    color: var(--ink); text-decoration: none;
}
.lista-contratos-link:hover { background: #f6f9f7; color: var(--ink); }

.avatar {
    width: 2.4rem; height: 2.4rem; border-radius: 50%; flex-shrink: 0;
    background: var(--brand-100); color: var(--brand-800); font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.4rem; }

/* ---------- Financeiro ---------- */
:root {
    /* Tons escuros para texto de valores (contraste AA sobre branco); o sinal e o ícone também indicam o tipo. */
    --texto-receita: #14523a;
    --texto-despesa: #9a4a12;
}

.periodo-filtro { display: flex; flex-wrap: wrap; gap: .5rem; }
.periodo-filtro select { width: auto; }
.periodo-filtro input { width: auto; min-width: 9rem; }

.lista-lancamentos { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; }
.lista-lancamentos > li { display: flex; align-items: center; gap: .85rem; padding: .65rem .9rem; }
.lista-lancamentos > li + li { border-top: 1px solid var(--grid); }
.lista-lancamentos > li.cancelado { opacity: .55; }
.lista-lancamentos > li.cancelado .lanc-valor { text-decoration: line-through; }
.lanc-data { display: flex; flex-direction: column; align-items: center; width: 2.6rem; flex-shrink: 0; line-height: 1.1; }
.lanc-data .dia { font-weight: 700; font-size: 1.1rem; }
.lanc-data .mes { font-size: .72rem; text-transform: uppercase; color: var(--ink-muted); }
.lanc-valor { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lanc-valor.receita { color: var(--texto-receita); }
.lanc-valor.despesa { color: var(--texto-despesa); }
.lanc-valor i { font-size: .8rem; }

.lista-categorias { list-style: none; padding: 0; }
.lista-categorias li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--grid); font-size: .92rem; }
.lista-categorias li span { font-variant-numeric: tabular-nums; white-space: nowrap; }

.tabela-financeira td, .tabela-financeira th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela-financeira tfoot td { border-top: 2px solid var(--border); }

.tipo-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tipo-toggle .btn { font-weight: 600; padding: .6rem; }
.btn-outline-receita {
    --bs-btn-color: var(--texto-receita); --bs-btn-border-color: #b9dfc9;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
}
.btn-outline-despesa {
    --bs-btn-color: var(--texto-despesa); --bs-btn-border-color: #f3d2b1;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #9a4a12; --bs-btn-hover-border-color: #9a4a12;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #9a4a12; --bs-btn-active-border-color: #9a4a12;
}

/* ---------- Relatórios ---------- */
.relatorio-card { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.relatorio-card:hover { border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(15, 61, 44, .08); color: var(--ink); }
.relatorio-icone {
    width: 2.75rem; height: 2.75rem; border-radius: .6rem; flex-shrink: 0;
    background: var(--brand-100); color: var(--brand-700); font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
}
.tabela-relatorio th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-muted); white-space: nowrap; }
.tabela-relatorio td { font-variant-numeric: tabular-nums; }
.tabela-relatorio tfoot td { border-top: 2px solid var(--border); }
.so-impressao { display: none; }

/* Impressão / "Salvar como PDF": só o conteúdo do relatório. */
@media print {
    @page { margin: 1.2cm; }
    body, body.app { background: #fff !important; }
    .sidebar, .topbar, .no-print, .alert-dismissible, .dropdown, .form-actions { display: none !important; }
    .app-shell { display: block; }
    .content { padding: 0 !important; }
    .so-impressao { display: block; }
    .card, .stat-card { border-color: #ccc !important; box-shadow: none !important; }
    .bloco-relatorio, tr { break-inside: avoid; }
    .table-responsive { overflow: visible !important; }
    a { color: inherit !important; text-decoration: none !important; }
    .row > [class*="col-xl-"], .row > [class*="col-md-"] { flex: 0 0 auto; }
}

/* ---------- Auditoria ---------- */
.lista-auditoria { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; }
.lista-auditoria > li { padding: .75rem 1rem; }
.lista-auditoria > li + li { border-top: 1px solid var(--grid); }
.tabela-auditoria th { width: 30%; font-weight: 500; color: var(--ink-muted); font-size: .85rem; }
.tabela-auditoria td { font-size: .85rem; word-break: break-word; }

/* ---------- Notificações ---------- */
.sino { position: relative; color: #eef6f2; font-size: 1.2rem; text-decoration: none; line-height: 1; }
.sino:hover { color: #fff; }
.sino-contador {
    position: absolute; top: -.45rem; right: -.6rem;
    min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px;
    background: #c62828; color: #fff; font-size: .68rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--brand-900);
}
.sidebar-header { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 992px) { .sidebar .offcanvas-header { display: flex; } }

.sidebar-conta { display: flex; align-items: center; gap: .5rem; color: #eef6f2; text-decoration: none; border-radius: .4rem; padding: .25rem; }
.sidebar-conta:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-conta > i { font-size: 1.4rem; }
.sidebar-perfil { font-size: .72rem; color: #9fd3b8; }

.lista-alertas { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.lista-alertas-link {
    display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem;
    background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: .5rem;
    color: var(--ink); text-decoration: none;
}
.lista-alertas-link:hover { background: #f6f9f7; color: var(--ink); }
.alerta-icone { font-size: 1.25rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.alerta-nivel { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.alerta-critico .lista-alertas-link { border-left-color: #c62828; }
.alerta-critico .alerta-icone, .alerta-critico .alerta-nivel { color: #b71c1c; }
.alerta-atencao .lista-alertas-link { border-left-color: #d0661c; }
.alerta-atencao .alerta-icone, .alerta-atencao .alerta-nivel { color: #9a4a12; }
.alerta-info .lista-alertas-link { border-left-color: var(--brand-600); }
.alerta-info .alerta-icone, .alerta-info .alerta-nivel { color: var(--brand-700); }

/* ---------- Vitrine pública ---------- */
.pub-marca { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.pub-marca:hover { color: #fff; }
.pub-marca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-link-vitrine { color: #eef6f2; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.pub-link-vitrine:hover { color: #fff; text-decoration: underline; }

.vitrine-hero { background: linear-gradient(160deg, var(--brand-800) 0%, var(--brand-700) 100%); color: #fff; padding: 2rem 0 1.75rem; }
.vitrine-hero h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .35rem; }
.vitrine-hero p { color: #e3f2ea; }

.vitrine-filtros { display: flex; flex-wrap: wrap; gap: .5rem; }
.vitrine-filtros .form-select, .vitrine-filtros .form-control { width: auto; flex: 1 1 10rem; max-width: 16rem; }

.vitrine-card {
    display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: .75rem;
    overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.vitrine-card:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(15, 61, 44, .12); transform: translateY(-2px); }
.vitrine-card:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 2px; }
.vitrine-foto { position: relative; aspect-ratio: 4 / 3; background: #e9edeb; }
.vitrine-foto img { width: 100%; height: 100%; object-fit: cover; }
.vitrine-tipo, .vitrine-fotos {
    position: absolute; top: .6rem; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
}
.vitrine-tipo { left: .6rem; background: #fff; color: var(--brand-800); }
.vitrine-fotos { right: .6rem; background: rgba(0, 0, 0, .6); color: #fff; }
.vitrine-corpo { padding: .85rem 1rem 1rem; }
.vitrine-preco { font-size: 1.3rem; font-weight: 700; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.vitrine-preco span { font-size: .85rem; font-weight: 400; color: var(--ink-muted); }
.vitrine-titulo { font-size: 1rem; font-weight: 600; margin: .25rem 0; line-height: 1.3; }
.vitrine-destaques { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.vitrine-destaques span { font-size: .75rem; background: var(--brand-100); color: var(--brand-800); padding: .1rem .45rem; border-radius: .3rem; }
.vitrine-contato h2 { margin-bottom: .5rem; }

@media (max-width: 575.98px) {
    .vitrine-hero h1 { font-size: 1.4rem; }
    .vitrine-filtros .form-select, .vitrine-filtros .form-control { max-width: none; }
}

/* ---------- Seletor de imobiliária ---------- */
.seletor-imobiliaria { margin: .25rem 0 .5rem; }
.seletor-imobiliaria > .btn {
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(159, 211, 184, .35); color: #fff; padding: .5rem .65rem;
}
.seletor-imobiliaria > .btn:hover, .seletor-imobiliaria > .btn:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }
.seletor-rotulo { color: #9fd3b8; font-size: .72rem; }
.seletor-imobiliaria .dropdown-item.active { background: var(--brand-700); }
