/* Painel do site — visual de painel administrativo (redesenho 01/10/2026).
   Navegação: barra lateral fixa no computador (>= 64rem) e barra inferior no celular/tablet, com os MESMOS botões [data-tab].
   Cores só por variável. Contraste: texto >= 4,5:1, bordas de campo >= 3:1. Sem fonte nem script externo (CSP estrita). */
:root {
  --ink:#14221e; --muted:#566863; --paper:#fff; --bg:#f1f5f3; --surface-2:#f6f9f8;
  --brand:#176b52; --brand-dark:#0f5441; --brand-soft:#e5f3ed; --brand-line:#b4d8c9;
  --line:#e0e8e5; --line-strong:#7f968e; --soft-line:#cfdcd7;
  --danger:#b42318; --danger-soft:#fdeceb; --warn-ink:#7a4300; --warn-soft:#fdecd0; --info-ink:#1b4a73; --info-soft:#e0edf9;
  --focus:#0b5cad; --focus-dark:#ffd166;
  --side:#0f2d26; --side-ink:#c5dcd3; --side-line:#ffffff1f;
  /* Identidade visual por cliente (app.js, applyBrand): estes tokens derivados mudam com as cores do cliente.
     --brand-ink é a cor da marca legível como TEXTO sobre fundo claro; --on-brand, o texto sobre a cor principal. */
  --brand-ink:var(--brand-dark); --on-brand:#fff; --accent:#5fd4a8; --accent-light:#8fd3b9; --login-hero-2:var(--brand);
  --radius:.8rem; --shadow:0 1px 2px #10282210, 0 6px 18px #1028220a;
  --nav-h:4.25rem; --side-w:15.5rem;
  --chart-h:12rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color:var(--ink); background:var(--bg); color-scheme:light;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; min-height:100vh; background:var(--bg); line-height:1.45; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.sprite { position:absolute; width:0; height:0; overflow:hidden; }
.icon { width:1.15em; height:1.15em; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible,.file-button:focus-within { outline:3px solid var(--focus); outline-offset:2px; }
.sidebar button:focus-visible,.side-brand a:focus-visible,.tabs button:focus-visible { outline-color:var(--focus-dark); }
.skip-link { position:fixed; left:1rem; top:-5rem; z-index:40; background:#fff; color:#000; padding:.7rem; border-radius:.5rem; }
.skip-link:focus { top:1rem; }
h1,h2,h3,h4,p { margin-top:0; }
h1 { font-size:clamp(1.8rem,7vw,2.75rem); line-height:1.08; }
h2 { font-size:1.5rem; line-height:1.2; letter-spacing:-.01em; }
h3 { font-size:1.05rem; line-height:1.3; }
h4 { font-size:.9rem; margin-bottom:.6rem; }
.eyebrow { margin:0 0 .3rem; color:var(--brand-ink); text-transform:uppercase; font-size:.72rem; font-weight:800; letter-spacing:.1em; }
.muted { color:var(--muted); }
.card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:1.1rem; box-shadow:var(--shadow); }
.stack { display:grid; gap:1rem; }
label { display:grid; gap:.35rem; font-weight:650; color:#23403a; font-size:.92rem; }
label small { font-weight:400; }
input,select,textarea { width:100%; min-width:0; min-height:2.75rem; padding:.62rem .75rem; border:1px solid var(--line-strong); border-radius:.6rem; color:var(--ink); background:#fff; font-weight:400; }
input::placeholder,textarea::placeholder { color:#62756f; }
input:focus,select:focus,textarea:focus { border-color:var(--focus); }
textarea { resize:vertical; }
progress { width:100%; height:.6rem; accent-color:var(--brand); }

/* Botões */
.primary,.secondary,.ghost,.danger,.file-button { min-height:2.75rem; border-radius:.6rem; border:1px solid transparent; padding:.6rem 1.05rem; font-weight:700; font-size:.95rem; display:inline-flex; align-items:center; justify-content:center; gap:.5rem; text-decoration:none; line-height:1.2; text-align:center; }
.primary { background:var(--brand); color:var(--on-brand); box-shadow:0 1px 2px #0f544133; }
.primary:hover { background:var(--brand-dark); }
.secondary { background:var(--brand-soft); color:var(--brand-ink); border-color:var(--brand-line); }
.secondary:hover { background:#d6ece2; }
.ghost { background:#fff; color:var(--ink); border-color:var(--soft-line); }
.ghost:hover { background:var(--surface-2); border-color:var(--line-strong); }
.danger { background:#fff; color:var(--danger); border-color:#efb3ad; }
.danger:hover { background:var(--danger-soft); }
.compact { min-height:2.5rem; padding:.4rem .75rem; font-size:.88rem; }
.compact .icon { width:1.05em; height:1.05em; }
button:disabled { opacity:.55; cursor:not-allowed; }
a.primary,a.secondary { text-decoration:none; }
.card-actions a.primary { color:var(--on-brand); }
.error { color:#7a1a12; background:var(--danger-soft); border-left:4px solid var(--danger); border-radius:.4rem; padding:.75rem .9rem; margin:0; }
.error:focus { outline:3px solid var(--focus); outline-offset:2px; }
.feedback { margin:.25rem 0 1rem; font-size:.9rem; }
.feedback:empty { display:none; }
details { color:var(--muted); } summary { cursor:pointer; font-weight:700; }

/* Login */
.login-shell { min-height:100vh; display:grid; align-content:start; }
.login-hero { background:linear-gradient(160deg,var(--side),var(--login-hero-2)); color:#fff; padding:2rem 1.25rem 4.25rem; }
.login-hero .eyebrow { color:var(--accent-light); margin-top:.9rem; }
.login-hero h1 { margin-bottom:.4rem; font-size:clamp(1.7rem,6vw,2.4rem); }
.login-lead { margin:0; color:var(--side-ink); }
.login-points { display:none; list-style:none; padding:0; margin:2rem 0 0; gap:.85rem; }
.login-points li { display:flex; gap:.65rem; align-items:flex-start; color:#e5f3ed; }
.login-points .icon { margin-top:.15rem; color:var(--accent-light); width:1.3em; height:1.3em; }
.login-credit { margin:1.6rem 0 0; font-size:.78rem; color:var(--side-ink); }
.login-card { width:calc(100% - 2rem); max-width:26rem; margin:-2.5rem auto 2rem; padding:1.4rem; box-shadow:0 12px 40px #0f2d2626; }
.login-card-title { margin:0; font-size:1.25rem; }
.brand-mark { width:3.25rem; height:3.25rem; display:grid; place-items:center; border-radius:.85rem; background:var(--brand); color:var(--on-brand); font-weight:900; flex:none; overflow:hidden; }
.brand-mark img { width:100%; height:100%; object-fit:contain; display:block; }
.brand-mark.has-logo { background:#fff; border:1px solid var(--line); }
.login-hero .brand-mark { background:#ffffff26; border:1px solid #ffffff40; }
.login-hero .brand-mark.has-logo { background:#ffffffe6; }
@media (min-width:56rem) {
  .login-shell { grid-template-columns:1fr 1fr; align-content:stretch; }
  .login-hero { padding:4rem clamp(2rem,6vw,5rem); display:flex; flex-direction:column; justify-content:center; }
  .login-hero h1 { font-size:2.6rem; }
  .login-points { display:grid; }
  .login-card { margin:auto; align-self:center; padding:2rem; }
}

/* Estrutura: barra lateral (desktop) / barra inferior (celular e tablet) */
.shell { min-height:100vh; padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.sidebar { display:contents; }
.side-brand { position:sticky; top:0; z-index:15; height:3.5rem; display:flex; align-items:center; gap:.65rem; padding:0 6.2rem 0 1rem; background:var(--side); color:#fff; min-width:0; }
.side-brand .brand-mark { width:2.25rem; height:2.25rem; font-size:.85rem; border-radius:.6rem; }
.side-brand-text { min-width:0; }
.side-brand .eyebrow { margin:0; color:var(--accent-light); font-size:.62rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-brand h1 { margin:0; font-size:.98rem; line-height:1.2; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-user { position:fixed; top:0; right:0; z-index:16; height:3.5rem; display:flex; align-items:center; padding-right:.75rem; }
.side-user-info { display:none; }
.side-user .ghost { background:transparent; color:#fff; border-color:#ffffff59; min-height:2.75rem; }
.side-user .ghost:hover { background:#ffffff1a; border-color:#fff; }
.user-line { margin:0; font-size:.8rem; color:var(--side-ink); overflow-wrap:anywhere; }
.avatar { width:2.5rem; height:2.5rem; flex:none; border-radius:50%; display:grid; place-items:center; background:var(--brand-soft); color:var(--brand-ink); font-weight:800; font-size:.95rem; }
.tabs { position:fixed; left:0; right:0; bottom:0; z-index:20; display:flex; overflow-x:auto; scrollbar-width:none; background:#fff; border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom); box-shadow:0 -6px 20px #10282212; }
.tabs::-webkit-scrollbar { display:none; }
.tabs button { flex:1 0 3.3rem; min-width:0; min-height:var(--nav-h); padding:.4rem .1rem .3rem; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.2rem; background:transparent; border:0; border-radius:0; color:var(--muted); font-weight:650; font-size:.66rem; line-height:1.1; }
.tabs button[aria-current="page"] { color:var(--brand-ink); font-weight:800; }
.tabs button[aria-current="page"] .nav-icon { background:var(--brand-soft); }
.nav-icon { position:relative; width:2.9rem; height:1.7rem; display:grid; place-items:center; border-radius:1rem; }
.nav-icon .icon { width:1.3rem; height:1.3rem; }
.nav-short { display:block; }
.nav-short + .nav-text { display:none; }
.badge { position:absolute; top:-.3rem; right:.15rem; display:inline-block; min-width:1.15rem; padding:0 .3rem; border-radius:1rem; background:#b45309; color:#fff; font-size:.68rem; font-weight:800; line-height:1.15rem; text-align:center; }
.main-area { min-width:0; }
.panel { width:100%; max-width:74rem; margin:0 auto; padding:1.25rem 1rem 2rem; }
.panel.narrow { max-width:46rem; }
.section-title { display:flex; justify-content:space-between; gap:.75rem 1rem; align-items:flex-start; flex-wrap:wrap; margin-bottom:1rem; }
.section-title h2,.section-title .eyebrow { margin-bottom:0; }
.section-title .eyebrow { margin-bottom:.25rem; }
.section-title > .actions { flex-wrap:nowrap; }
.page-note { max-width:46rem; }
@media (min-width:64rem) {
  .shell { display:grid; grid-template-columns:var(--side-w) minmax(0,1fr); padding-bottom:0; background:linear-gradient(to right,var(--side) var(--side-w),var(--bg) var(--side-w)); }
  .sidebar { display:flex; flex-direction:column; gap:1.1rem; position:sticky; top:0; height:100vh; overflow-y:auto; padding:1.1rem .8rem; background:var(--side); color:#fff; }
  .side-brand { position:static; height:auto; padding:.2rem .45rem .9rem; border-bottom:1px solid var(--side-line); gap:.75rem; background:transparent; }
  .side-brand .brand-mark { width:2.6rem; height:2.6rem; font-size:.95rem; }
  .side-brand .eyebrow { font-size:.66rem; }
  .side-brand h1 { font-size:1.02rem; white-space:normal; }
  .tabs { position:static; flex:1; display:grid; align-content:start; gap:.2rem; overflow:visible; background:transparent; border:0; padding:0; box-shadow:none; }
  .tabs button { flex:none; flex-direction:row; justify-content:flex-start; gap:.8rem; min-height:2.75rem; padding:.5rem .7rem; border-radius:.65rem; color:var(--side-ink); font-size:.95rem; font-weight:600; text-align:left; line-height:1.2; }
  .tabs button:hover { background:#ffffff14; color:#fff; }
  .tabs button[aria-current="page"] { background:#ffffff1f; color:#fff; box-shadow:inset 3px 0 0 var(--accent-light); }
  .tabs button[aria-current="page"] .nav-icon { background:transparent; }
  .nav-icon { width:1.5rem; height:1.5rem; border-radius:0; }
  .nav-icon .icon { width:1.25rem; height:1.25rem; }
  .nav-short { display:none; }
  .nav-short + .nav-text { display:inline; }
  .badge { top:-.45rem; right:-.6rem; }
  .side-user { position:static; height:auto; display:grid; gap:.75rem; padding:.9rem .45rem 0; border-top:1px solid var(--side-line); }
  .side-user-info { display:flex; align-items:center; gap:.65rem; }
  .side-user .avatar { background:var(--brand); color:var(--on-brand); }
  .side-user .ghost { width:100%; }
  .panel { padding:2rem 2.25rem 3rem; }
}

/* Cabeçalho de seção dentro de cartões */
.card-head { display:flex; justify-content:space-between; align-items:center; gap:.75rem; margin-bottom:.9rem; }
.card-head h3 { margin:0; }
.toolbar { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:.85rem; box-shadow:var(--shadow); margin:0 0 1rem; }
.filters { display:grid; gap:.7rem; }
.filters > label > span:first-child { font-size:.8rem; color:var(--muted); font-weight:700; }
.filters button { width:100%; }
.input-icon { position:relative; display:block; }
.input-icon .icon { position:absolute; left:.8rem; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.input-icon input { padding-left:2.5rem; }
.period-form { display:flex; flex-wrap:wrap; gap:.7rem; align-items:end; }
.period-form label { min-width:9rem; flex:1 1 9rem; }
.period-form label > * { font-weight:400; }
.period-form input,.period-form select { min-height:2.75rem; }
.period-form button { flex:0 0 auto; }
@media (min-width:48rem) {
  .filters { grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto; align-items:end; }
  .filters.two { grid-template-columns:minmax(0,16rem) max-content; justify-content:start; }
  .filters button { width:auto; }
  .period-form label { flex:0 0 11rem; }
}

/* Estados: vazio, erro e carregando */
.empty-state { grid-column:1/-1; display:grid; justify-items:center; text-align:center; gap:.5rem; padding:2.5rem 1rem; background:#fff; border:1px dashed var(--soft-line); border-radius:var(--radius); }
.empty-state h3 { margin:.3rem 0 0; font-size:1.1rem; }
.empty-state p { margin:0; max-width:28rem; color:var(--muted); }
.empty-state .actions { justify-content:center; margin-top:.6rem; }
.empty-icon { width:3.6rem; height:3.6rem; display:grid; place-items:center; border-radius:50%; background:var(--brand-soft); color:var(--brand-ink); }
.empty-icon .icon { width:1.7rem; height:1.7rem; }
.empty-state.is-error { border-style:solid; border-color:#efb3ad; }
.empty-state.is-error .empty-icon { background:var(--danger-soft); color:var(--danger); }
.empty-inline { display:flex; align-items:center; gap:.6rem; padding:1.5rem 0; color:var(--muted); }
.skeleton-card { height:7.2rem; grid-column:auto; border-radius:var(--radius); background:linear-gradient(90deg,#e6edea 25%,#f2f6f4 40%,#e6edea 60%); background-size:300% 100%; border:1px solid var(--line); }
@media (prefers-reduced-motion:no-preference) { .skeleton-card { animation:shimmer 1.4s ease-in-out infinite; } }
@keyframes shimmer { 0% { background-position:100% 0; } 100% { background-position:0 0; } }

/* Indicadores */
.metric-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin:0 0 1rem; }
.metric-card { --tone:var(--brand); --tone-soft:var(--brand-soft); position:relative; display:grid; gap:.7rem; align-content:start; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:.95rem; box-shadow:var(--shadow); min-width:0; }
.metric-card:last-child:nth-child(odd) { grid-column:1/-1; }
.metric-card.tone-blue { --tone:#1d5f8f; --tone-soft:#e1edf7; }
.metric-card.tone-amber { --tone:#8a4a00; --tone-soft:#fdecd0; }
.metric-card.tone-violet { --tone:#5b3fa0; --tone-soft:#ece8f8; }
.metric-card.tone-teal { --tone:#0b6b6b; --tone-soft:#dcf1f1; }
.metric-icon { width:2.5rem; height:2.5rem; display:grid; place-items:center; border-radius:.7rem; background:var(--tone-soft); color:var(--tone); }
.metric-icon .icon { width:1.3rem; height:1.3rem; }
.metric-body { display:grid; gap:.15rem; min-width:0; overflow-wrap:anywhere; }
.metric-body p { margin:0; color:var(--muted); font-size:.82rem; font-weight:600; }
.metric-body strong { display:block; font-size:1.7rem; line-height:1.1; letter-spacing:-.02em; }
.variation { display:inline-flex; align-items:center; gap:.25rem; font-size:.76rem; font-weight:650; color:var(--muted); line-height:1.3; }
.variation .icon { width:.95em; height:.95em; stroke-width:2.5; }
.variation.positive { color:#0f6b4a; }
.variation.negative { color:var(--danger); }
@media (min-width:48rem) {
  .metric-cards { grid-template-columns:repeat(auto-fit,minmax(11rem,1fr)); gap:1rem; }
  .metric-card:last-child:nth-child(odd) { grid-column:auto; }
}

/* Cartões do painel e gráfico */
.dashboard-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:1.1rem; margin:0 0 1rem; box-shadow:var(--shadow); }
.dashboard-two { display:grid; gap:1rem; margin-bottom:1rem; }
.dashboard-two > .dashboard-card { margin:0; }
.chart { overflow:hidden; }
.chart-legend { list-style:none; display:flex; flex-wrap:wrap; gap:.3rem 1.1rem; margin:0 0 .8rem; padding:0; font-size:.85rem; color:var(--muted); }
.chart-legend li::before { content:""; display:inline-block; width:.7rem; height:.7rem; border-radius:50%; margin-right:.4rem; background:#9aaba6; }
.chart-legend .lg-views::before { background:#176b52; }.chart-legend .lg-uniqueVisitors::before { background:#2d73a5; }.chart-legend .lg-contacts::before { background:#d17a22; }
.chart-plot { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:.6rem; }
.chart-y { display:flex; flex-direction:column; justify-content:space-between; height:var(--chart-h); font-size:.72rem; line-height:1; color:var(--muted); text-align:right; font-variant-numeric:tabular-nums; }
.chart-plot svg { display:block; width:100%; height:var(--chart-h); }
.chart-grid { stroke:#e1e9e6; stroke-width:1; }
.chart-base { stroke:#aebeb8; stroke-width:1; }
.chart-hit:hover { fill:#176b5214; }
.chart-x { grid-column:2; display:flex; justify-content:space-between; margin-top:.4rem; font-size:.72rem; color:var(--muted); }
.data-details { margin-top:.9rem; border-top:1px solid var(--line); padding-top:.7rem; }
.data-details summary { font-size:.88rem; color:var(--brand-ink); }
.data-details .table-scroll { margin-top:.6rem; max-height:18rem; overflow:auto; }
.table-scroll { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.86rem; }
th,td { padding:.55rem .6rem; text-align:left; border-bottom:1px solid var(--line); }
th { font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; background:var(--surface-2); position:sticky; top:0; }
tbody tr:hover td { background:var(--surface-2); }

/* Ranking */
.ranking-grid { display:grid; gap:1rem; align-items:start; }
.rank-block summary { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.55rem .75rem; margin-bottom:.6rem; background:var(--surface-2); border:1px solid var(--line); border-radius:.6rem; color:var(--ink); font-size:.92rem; list-style:none; }
.rank-block summary::-webkit-details-marker { display:none; }
.rank-block summary::after { content:""; width:.55rem; height:.55rem; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); margin-right:.2rem; }
.rank-block[open] summary::after { transform:rotate(-135deg); }
@media (min-width:48rem) { .rank-block summary { background:transparent; border:0; padding:0; pointer-events:none; } .rank-block summary::after { display:none; } }
.ranking { list-style:none; margin:0; padding:0; counter-reset:rank; display:grid; gap:.5rem; }
.ranking li { counter-increment:rank; }
.ranking li.muted { padding:1rem; text-align:center; background:var(--surface-2); border-radius:.6rem; }
.ranking button { width:100%; display:grid; grid-template-columns:1.7rem 3.2rem minmax(0,1fr); column-gap:.65rem; row-gap:.1rem; align-items:center; text-align:left; border:1px solid var(--line); border-radius:.7rem; background:#fff; padding:.55rem .65rem .55rem .55rem; color:var(--ink); }
.ranking button:hover { background:var(--surface-2); border-color:var(--soft-line); }
.ranking button::before { content:counter(rank); grid-row:1/3; grid-column:1; width:1.6rem; height:1.6rem; display:grid; place-items:center; border-radius:50%; background:var(--brand-soft); color:var(--brand-ink); font-size:.75rem; font-weight:800; }
.ranking-thumb { grid-row:1/3; grid-column:2; width:3.2rem; height:3.2rem; border-radius:.5rem; object-fit:cover; background:#dfe9e5; display:grid; place-items:center; color:var(--muted); font-size:.75rem; font-weight:800; }
.ranking button > span { grid-column:3; min-width:0; overflow-wrap:anywhere; }
.ranking button strong,.ranking button small { display:block; }
.ranking button small { color:var(--muted); font-size:.8rem; white-space:normal; line-height:1.3; }
.ranking button > span:last-child { margin-top:.15rem; }
.ranking button > span:last-child strong { display:inline; font-size:1.05rem; }
.ranking button > span:last-child .unit { font-size:.78rem; color:var(--muted); }
.ranking button > span:last-child small { display:block; }
.link-button { border:0; padding:0; background:none; color:var(--ink); text-align:left; cursor:pointer; }
.link-button:hover { text-decoration:underline; }

/* Buscas do público e alertas */
.insight-grid { display:grid; gap:1.2rem; }
.wide-insight { grid-column:1/-1; }
.insight-list { list-style:none; padding:0; margin:0; }
.insight-list li { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.45rem 0; border-bottom:1px solid var(--line); font-size:.9rem; }
.insight-list li:last-child { border-bottom:0; }
.insight-list strong { min-width:1.8rem; padding:.05rem .5rem; border-radius:1rem; background:var(--brand-soft); color:var(--brand-ink); text-align:center; font-size:.8rem; }
.alerts { list-style:none; padding:0; margin:0; display:grid; gap:.5rem; }
.alerts li { display:flex; gap:.65rem; align-items:flex-start; padding:.65rem .75rem; background:#fffaf0; border:1px solid #f1dcb0; border-left:4px solid #c47a12; border-radius:.55rem; font-size:.9rem; }
.alerts li.muted { background:var(--surface-2); border:1px solid var(--line); border-left-width:1px; }
.alerts .icon { margin-top:.15rem; color:#8a4a00; }
.alerts .link-button strong { color:var(--ink); }

/* Lista de imóveis, contatos e equipe */
.property-list { display:grid; gap:.75rem; }
.property-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:.9rem; display:grid; gap:.7rem; box-shadow:var(--shadow); min-width:0; }
.property-card:hover { border-color:var(--soft-line); }
.listing { grid-template-columns:min(5.5rem,26vw) minmax(0,1fr); grid-template-areas:"thumb head" "thumb meta" "last last" "actions actions"; column-gap:.85rem; row-gap:.45rem; align-items:start; }
.listing .property-body { display:contents; }
.listing .property-thumb { grid-area:thumb; }
.listing .property-head { grid-area:head; }
.listing .meta { grid-area:meta; }
.listing .last-change { grid-area:last; }
.listing .card-actions { grid-area:actions; margin-top:.2rem; }
.property-thumb { width:100%; height:5.5rem; object-fit:cover; border-radius:.6rem; background:var(--line); display:block; }
.property-thumb.empty { display:grid; place-items:center; color:var(--muted); font-size:.72rem; font-weight:700; text-align:center; background:var(--surface-2); border:1px dashed var(--soft-line); }
.property-head { display:flex; justify-content:space-between; gap:.6rem; align-items:flex-start; min-width:0; }
.property-head h3 { margin:0; font-size:1rem; overflow-wrap:anywhere; }
.property-title { min-width:0; }
.listing .property-head h3 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.code-row { display:flex; align-items:center; flex-wrap:wrap; gap:.15rem .5rem; margin-bottom:.15rem; }
.code { color:var(--brand-ink); font-size:.78rem; font-weight:800; letter-spacing:.02em; }
.status { display:inline-flex; align-items:center; gap:.35rem; width:max-content; padding:.18rem .6rem; border-radius:2rem; background:#dff3ea; color:#0f5c43; font-size:.72rem; font-weight:700; white-space:nowrap; }
.status::before { content:""; width:.45rem; height:.45rem; border-radius:50%; background:currentColor; }
.status.vendido,.status.alugado,.status.novo { background:var(--warn-soft); color:var(--warn-ink); }
.status.oculto,.status.arquivado { background:#e9eceb; color:#44504c; }
.status.respondido { background:var(--info-soft); color:var(--info-ink); }
.meta { display:flex; flex-wrap:wrap; gap:.3rem 1rem; color:var(--muted); font-size:.85rem; min-width:0; }
.meta > span { display:inline-flex; align-items:center; gap:.35rem; min-width:0; overflow-wrap:anywhere; }
.meta .icon { width:1em; height:1em; }
.meta .price { overflow-wrap:anywhere; color:var(--ink); font-size:1.02rem; font-weight:800; }
.last-change { margin:0; font-size:.78rem; }
.card-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.card-actions > * { flex:1 1 auto; }
.more-properties { grid-column:1/-1; }
.contact-card,.team-card { gap:.75rem; }
.person { display:flex; gap:.7rem; align-items:center; min-width:0; }
.person h3 { margin:0; overflow-wrap:anywhere; }
.contact-message { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; padding:.7rem .85rem; background:var(--surface-2); border-radius:.6rem; border-left:3px solid var(--brand-line); }
.stat-list { margin:0; }
.stat-list div { display:flex; justify-content:space-between; gap:1rem; padding:.45rem 0; border-bottom:1px solid var(--line); font-size:.9rem; }
.stat-list div:last-child { border-bottom:0; }
.stat-list dt { color:var(--muted); }
.stat-list dd { margin:0; font-weight:700; text-align:right; overflow-wrap:anywhere; }
.team-layout { display:grid; gap:1rem; align-items:start; margin-bottom:1rem; }
.activity-list { list-style:none; margin:0 0 1rem; padding:0; }
.activity-list li { position:relative; display:grid; gap:.1rem; padding:.2rem 0 .85rem 1.3rem; border-left:2px solid var(--line); margin-left:.35rem; font-size:.9rem; }
.activity-list li::before { content:""; position:absolute; left:-.4rem; top:.35rem; width:.65rem; height:.65rem; border-radius:50%; background:var(--brand); border:2px solid #fff; box-shadow:0 0 0 1px var(--brand-line); }
.activity-list small { color:var(--muted); }
@media (min-width:36rem) {
  .listing { grid-template-columns:min(7.5rem,26vw) minmax(0,1fr); }
  .property-thumb { width:100%; height:5.6rem; }
}
@media (min-width:48rem) {
  .property-card { padding:1rem; }
  .listing { grid-template-columns:7.5rem minmax(0,1fr) auto; grid-template-areas:"thumb head actions" "thumb meta actions" "thumb last actions"; }
  .listing .card-actions { flex-direction:column; align-self:center; margin:0; min-width:7rem; }
}
@media (min-width:64rem) {
  .property-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-two { grid-template-columns:1.3fr 1fr; }
  .team-layout { grid-template-columns:minmax(0,1fr) minmax(0,26rem); }
  .team-layout .property-list { grid-template-columns:1fr; }
}
@media (min-width:48rem) {
  .ranking-grid { grid-template-columns:repeat(auto-fit,minmax(17rem,1fr)); }
  .insight-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:63.99rem) { .insight-grid { grid-template-columns:1fr; } }
@media (max-width:47.99rem) {
  .compact { min-height:2.75rem; }
  .section-title > .actions { flex-wrap:wrap; }
}

/* Formulário de imóvel */
.form-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:1rem; }
.form-grid.cols-3 { grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); }
.wide { grid-column:1/-1; }
.form-grid > label { align-content:start; }
.check { grid-template-columns:auto 1fr; align-items:center; justify-content:start; min-height:2.75rem; gap:.65rem; font-weight:600; }
.check input { width:1.3rem; min-height:1.3rem; height:1.3rem; accent-color:var(--brand); }
.form-layout { display:block; }
.form-cols,.form-main,.form-side { display:grid; gap:1rem; align-content:start; min-width:0; }
.form-section { display:grid; gap:1rem; align-content:start; }
.form-section-head h3 { margin:0; }
.form-section-head p { margin:.15rem 0 0; font-size:.88rem; }
fieldset { border:1px solid var(--line); border-radius:.7rem; padding:.9rem; min-width:0; margin:0; }
legend { font-weight:700; padding:0 .4rem; font-size:.92rem; }
.checks { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap:.55rem; }
.checks label { display:flex; align-items:center; gap:.6rem; min-height:2.75rem; padding:.45rem .7rem; border:1px solid var(--soft-line); border-radius:.6rem; font-weight:600; background:#fff; }
.checks label:has(input:checked) { background:var(--brand-soft); border-color:var(--brand); }
.checks input { width:1.2rem; min-height:1.2rem; height:1.2rem; accent-color:var(--brand); flex:none; }
.form-error { margin-top:1rem; }
.form-error button { margin-left:.4rem; }
.form-actions { position:sticky; bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + .6rem); z-index:10; margin-top:1rem; padding:.65rem; background:#fffffff2; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 28px #10282222; }
.form-actions > * { flex:1 1 auto; }
.actions { display:flex; gap:.7rem; flex-wrap:wrap; }
@media (min-width:48rem) {
  .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .form-grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  form.card.form-grid { padding:1.3rem; }
  .form-actions { justify-content:flex-end; }
  .form-actions > * { flex:0 0 auto; min-width:9rem; }
}
@media (min-width:64rem) {
  .form-cols { grid-template-columns:minmax(0,1fr) 20rem; align-items:start; }
  .form-side { position:sticky; top:1.25rem; }
  .form-actions { bottom:1rem; }
}

/* Fotos */
.file-button { position:relative; width:100%; flex-direction:column; gap:.4rem; padding:1.25rem 1rem; background:var(--brand-soft); color:var(--brand-ink); border:2px dashed var(--brand); cursor:pointer; font-size:1rem; }
.file-button:hover { background:#d6ece2; }
.file-button .icon { width:1.8rem; height:1.8rem; }
.file-button input { position:absolute; width:1px; height:1px; min-height:0; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); }
.photo-list { list-style:none; margin:.25rem 0 0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,10rem),1fr)); gap:.75rem; }
.photo-list:empty { display:none; }
.photo-item { position:relative; display:grid; align-content:start; border:1px solid var(--line); border-radius:.75rem; background:#fff; overflow:hidden; box-shadow:var(--shadow); }
.photo-item[draggable="true"] { cursor:grab; }
.photo-item img { width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; display:block; background:var(--line); }
.photo-item.pending { border-style:dashed; border-color:var(--brand); }
.photo-buttons { display:grid; grid-template-columns:1fr 1fr; gap:.4rem; padding:.55rem; }
.photo-buttons strong { position:absolute; top:.5rem; left:.5rem; padding:.15rem .55rem; border-radius:2rem; background:#0f2d26e6; color:#fff; font-size:.72rem; font-weight:700; }
.photo-buttons span { grid-column:1/-1; font-size:.8rem; }
.photo-buttons button { min-height:2.75rem; padding:.25rem .5rem; font-size:.85rem; }
.photo-buttons button[data-photo-up],.photo-buttons button[data-photo-down] { font-size:1.1rem; }
.photo-buttons .secondary,.photo-buttons .danger { grid-column:1/-1; min-height:2.5rem; }

/* Toast */
.toast { position:fixed; left:1rem; right:1rem; bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + .8rem); z-index:30; max-width:38rem; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:.75rem; background:var(--side); color:#fff; border-radius:.75rem; padding:.85rem 1rem; box-shadow:0 10px 30px #00000040; }
.toast button { flex:none; margin-left:auto; color:#fff; background:transparent; border:1px solid #ffffffb3; border-radius:.45rem; padding:.4rem .75rem; min-height:2.5rem; font-weight:700; }
.toast button:hover { background:#ffffff26; }
@media (min-width:64rem) { .toast { bottom:1.25rem; left:calc(var(--side-w) + 1rem); } }

/* Relatório do anúncio e mapa de calor */
.report-brand { display:grid; grid-template-columns:minmax(0,8rem) 1fr; gap:1rem; align-items:center; margin:0 0 1rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:1rem; box-shadow:var(--shadow); }
.report-brand > img, .report-brand > div > img:not(.brand-mark img) { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:.7rem; }
.report-brand .brand-mark { width:4.5rem; height:4.5rem; }

/* Identidade visual (Dados da empresa) */
.brand-fields { display:grid; gap:1rem; }
.brand-help { margin:0; font-size:.88rem; }
.logo-row { display:grid; gap:.75rem; justify-items:start; }
.logo-preview { width:6rem; height:6rem; object-fit:contain; border:1px solid var(--line); border-radius:.75rem; background:#fff; padding:.35rem; }
.logo-button { padding:.9rem 1rem; }
.logo-button .icon { width:1.4rem; height:1.4rem; }
.report-brand h2,.report-brand h3 { margin-bottom:.3rem; }
.report-brand p { margin-bottom:.2rem; }
.funnel,.tips { padding-left:1.25rem; margin:0; }
.funnel li,.tips li { margin:.65rem 0; }
.funnel span { display:block; color:var(--muted); }
.heatmap table { font-size:.75rem; }
.heatmap th,.heatmap td { padding:.3rem; }
.heatmap th { text-transform:none; letter-spacing:0; }
.heatmap td { text-align:center; min-width:2rem; border-bottom:0; }
.heatmap td.heat-0 { background:color-mix(in srgb, var(--brand) 0%, white); }.heatmap td.heat-1 { background:color-mix(in srgb, var(--brand) 8.5%, white); }.heatmap td.heat-2 { background:color-mix(in srgb, var(--brand) 17%, white); }.heatmap td.heat-3 { background:color-mix(in srgb, var(--brand) 25.5%, white); }.heatmap td.heat-4 { background:color-mix(in srgb, var(--brand) 34%, white); }.heatmap td.heat-5 { background:color-mix(in srgb, var(--brand) 42.5%, white); }.heatmap td.heat-6 { background:color-mix(in srgb, var(--brand) 51%, white); }.heatmap td.heat-7 { background:color-mix(in srgb, var(--brand) 59.5%, white); color:#fff; }.heatmap td.heat-8 { background:color-mix(in srgb, var(--brand) 68%, white); color:#fff; }.heatmap td.heat-9 { background:color-mix(in srgb, var(--brand) 76.5%, white); color:#fff; }.heatmap td.heat-10 { background:color-mix(in srgb, var(--brand) 85%, white); color:#fff; }
.performance-grid { display:grid; gap:1rem; margin-bottom:1rem; }
.performance-grid > .dashboard-card { margin:0; }
.print-only { display:none; }
@media (min-width:64rem) { .performance-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }

@media print {
  body { background:#fff; }
  .sidebar,.side-brand,.side-user,.tabs,.no-print,.period-form,.toolbar,.print-button,.toast { display:none !important; }
  .print-only { display:grid !important; }
  .shell { display:block; padding:0; }
  .panel { max-width:none; padding:0; }
  .dashboard-card,.metric-card { break-inside:avoid; box-shadow:none; }
  .metric-card { border:1px solid #333; }
  .data-details .table-scroll { max-height:none; overflow:visible; }
}
@media (prefers-reduced-motion:no-preference) {
  button,.primary,.secondary,.ghost,.danger,.property-card,.file-button { transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s; }
  button:active { transform:translateY(1px); }
}
