/* ============================================================
   theme.imovelrx.css — aparência do ImóvelRX (repo: imovelrx)

   Valores de TODAS as variáveis do contrato rx-core (ver
   rx-core-site/css/tokens.css para a lista e o significado de cada uma).
   Carregar DEPOIS de tokens.css. rx-core não define aparência de nenhum
   produto — tudo o que é paleta, fontes e ruído de fundo do ImóvelRX
   vive aqui.

   Fase 3 da separação visual (Set 2026) — identidade própria:
   - Neutros "granito" (sem o preto azulado nem o creme de antes).
   - UMA cor de destaque: o âmbar da marca, só em acções e estados
     activos. Texto por cima do âmbar é escuro nos dois temas
     (--rx-accent-contrast); âmbar como cor de texto usa um tom mais
     escuro no tema claro (--rx-accent-text), por contraste.
   - Dados usam só as cores semânticas (positivo / atenção / negativo),
     nunca o âmbar.
   - Tipografia: Bricolage Grotesque (títulos), Geist (texto e números,
     algarismos de largura fixa), Geist Mono (referências).
   ============================================================ */

/* ── Fontes (subset latin, alojadas neste repo em /fonts) ────── */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tema escuro (por omissão) ── */
:root {
  --page-max-width: 980px;

  --rx-font-display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --rx-font-body:    'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rx-font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --rx-surface-0: #111214;
  --rx-surface-1: #1a1b1e;
  --rx-surface-2: #232428;
  --rx-surface-3: #2c2e32;

  --rx-text-1:  #eceae6;
  --rx-text-2:  #c9c7c2;
  --rx-text-3:  #9a9ca3;
  --rx-muted-1: #6d7076;
  --rx-muted-2: #8d9096;

  --rx-tint-1: #ffffff0a;
  --rx-tint-2: #ffffff14;
  --rx-tint-3: #ffffff24;
  --rx-border:        #2a2c30;
  --rx-border-strong: #3a3d42;

  --rx-accent:          #f5a623;
  --rx-accent-hover:    #f7bc57;
  --rx-accent-glow:     #f5a62322;
  --rx-accent-contrast: #1a1203;
  --rx-accent-text:     #f5b545;

  --rx-good: #4cc38a;
  --rx-bad:  #f07a6e;
  --rx-warn: #e7b54a;

  --rx-noise-opacity: 0;

  --rx-overlay-scrim:          rgba(0,0,0,0.6);
  --rx-overlay-solid-bg:       #111214;
  --rx-overlay-text:           #eceae6;
  --rx-overlay-text-sub:       #9a9ca3;
  --rx-overlay-brand:          #f5a623;
  --rx-overlay-spinner-track:  #ffffff14;
  --rx-overlay-spinner:        #f5a623;
  --rx-overlay-box-bg:         #1a1b1e;
  --rx-overlay-box-border:     #2a2c30;
}

/* ── Tema claro ── */
html.light {
  --rx-surface-0: #f4f4f2;
  --rx-surface-1: #ffffff;
  --rx-surface-2: #eeeeea;
  --rx-surface-3: #e3e3de;

  --rx-text-1:  #17181a;
  --rx-text-2:  #3a3c40;
  --rx-text-3:  #6b6e74;
  --rx-muted-1: #8b8e93;
  --rx-muted-2: #6b6e74;

  --rx-tint-1: #0000000a;
  --rx-tint-2: #00000012;
  --rx-tint-3: #0000001f;
  --rx-border:        #e3e3de;
  --rx-border-strong: #cfcfc8;

  --rx-accent:          #f2a01f;
  --rx-accent-hover:    #f6b340;
  --rx-accent-glow:     #f2a01f26;
  --rx-accent-contrast: #1a1203;
  --rx-accent-text:     #9a5a00;

  --rx-good: #16734a;
  --rx-bad:  #b0281e;
  --rx-warn: #8a5a00;

  --rx-noise-opacity: 0;

  --rx-overlay-scrim:          rgba(255,255,255,0.6);
  --rx-overlay-solid-bg:       #f4f4f2;
  --rx-overlay-text:           #17181a;
  --rx-overlay-text-sub:       #6b6e74;
  --rx-overlay-brand:          #9a5a00;
  --rx-overlay-spinner-track:  #0000001f;
  --rx-overlay-spinner:        #f2a01f;
  --rx-overlay-box-bg:         #ffffff;
  --rx-overlay-box-border:     #e3e3de;
}

/* ── Overlay com tema congelado (ver rx-core/overlay.css) ──
   Declarado no próprio elemento: vence o que vem herdado do html.light. */
#transition-overlay.solid-dark {
  --rx-overlay-solid-bg:       #111214;
  --rx-overlay-text:           #eceae6;
  --rx-overlay-text-sub:       #9a9ca3;
  --rx-overlay-brand:          #f5a623;
  --rx-overlay-spinner-track:  #ffffff14;
  --rx-overlay-spinner:        #f5a623;
  --rx-overlay-box-bg:         #1a1b1e;
  --rx-overlay-box-border:     #2a2c30;
}
#transition-overlay.solid-light {
  --rx-overlay-solid-bg:       #f4f4f2;
  --rx-overlay-text:           #17181a;
  --rx-overlay-text-sub:       #6b6e74;
  --rx-overlay-brand:          #9a5a00;
  --rx-overlay-spinner-track:  #0000001f;
  --rx-overlay-spinner:        #f2a01f;
  --rx-overlay-box-bg:         #ffffff;
  --rx-overlay-box-border:     #e3e3de;
}

/* ============================================================
   RELATÓRIO (#app.report-view) — css/pages/report.css
   ============================================================
   Cada regra do relatório aparece uma vez em report.css e lê daqui o
   seu valor. Na fase 3 os papéis (--rp-*) passaram a derivar das
   variáveis globais acima, por isso só as escalas (--slate-*,
   --success-*...) precisam de valores por tema — e os cinzentos
   "frios" e "quentes" que o tema claro misturava ficaram unificados.
   ============================================================ */

/* Fundo do lightbox de fotos — o #lightbox fica fora do #app, por isso
   esta variável vive no :root e não no bloco do relatório. */
:root      { --rp-lightbox-bg: rgba(0,0,0,0.95); }
html.light { --rp-lightbox-bg: rgba(0,0,0,0.85); }

/* ── Relatório: escalas, tema escuro (por omissão) ── */
#app.report-view {
  /* Escalas usadas por report.css E por report-render.js em estilos
     inline (var(--slate-400), var(--danger-700)...) — não renomear. */
  --slate-50:  #232428;
  --slate-100: #1a1b1e;
  --slate-200: #2a2c30;
  --slate-300: #3a3d42;
  --slate-400: #7c7f86;
  --slate-500: #9a9ca3;
  --slate-600: #c9c7c2;
  --slate-700: #d8d6d1;
  --slate-800: #eceae6;
  --slate-900: #eceae6;
  --success-50:  rgba(76,195,138,0.10);
  --success-200: rgba(76,195,138,0.28);
  --success-500: #3aa874;
  --success-700: #4cc38a;
  --warning-50:  rgba(231,181,74,0.10);
  --warning-200: rgba(231,181,74,0.28);
  --warning-500: #d9a63c;
  --warning-700: #e7b54a;
  --danger-50:   rgba(240,122,110,0.10);
  --danger-200:  rgba(240,122,110,0.28);
  --danger-500:  #e0584b;
  --danger-700:  #f07a6e;
  --info-50:     rgba(143,176,245,0.10);
  --info-500:    #5b8def;
  --info-700:    #8fb0f5;
  --orange-50:   rgba(243,163,107,0.12);
  --orange-700:  #f3a36b;

  --rp-inset:       #151618;
  --rp-card-shadow: 0 1px 2px rgba(0,0,0,0.30);
}

/* ── Relatório: escalas, tema claro ── */
html.light #app.report-view {
  --slate-50:  #f9f9f7;
  --slate-100: #eeeeea;
  --slate-200: #e3e3de;
  --slate-300: #cfcfc8;
  --slate-400: #9a9ca0;
  --slate-500: #6b6e74;
  --slate-600: #4b4d52;
  --slate-700: #3a3c40;
  --slate-800: #26282b;
  --slate-900: #17181a;
  --success-50:  #edf6f0;
  --success-200: #cbe5d5;
  --success-500: #1f8a57;
  --success-700: #16734a;
  --warning-50:  #fbf5e6;
  --warning-200: #ecdcb2;
  --warning-500: #c28a17;
  --warning-700: #8a5a00;
  --danger-50:   #fcefed;
  --danger-200:  #f0c8c3;
  --danger-500:  #d23c2f;
  --danger-700:  #b0281e;
  --info-50:     #eef3fd;
  --info-500:    #3b6fd6;
  --info-700:    #2451a8;
  --orange-50:   #fdf1e8;
  --orange-700:  #b2511a;

  --rp-inset:       #f9f9f7;
  --rp-card-shadow: 0 1px 2px rgba(23,24,26,0.05), 0 1px 3px rgba(23,24,26,0.06);
}

/* ── Relatório: papéis (iguais nos dois temas — derivam das escalas e
   das variáveis globais, que já mudam com o tema) ── */
#app.report-view {
  --rp-font-body: var(--rx-font-body);
  /* Números (preços, áreas, pontuações) em Geist com algarismos de
     largura fixa — a classe .mono do relatório já aplica "tnum". A
     Geist Mono fica só para referências (IDs, datas técnicas). */
  --rp-font-mono: var(--rx-font-body);

  --rp-text:          var(--rx-text-1);
  --rp-section-label: var(--rx-text-3);

  --rp-card-bg:             var(--rx-surface-1);
  --rp-card-border:         var(--rx-border);
  --rp-card-danger-bg:      var(--danger-50);
  --rp-card-danger-border:  var(--danger-200);
  --rp-card-warning-bg:     var(--warning-50);
  --rp-card-warning-border: var(--warning-200);
  --rp-card-info-bg:        var(--rp-inset);
  --rp-card-info-border:    var(--rx-border);

  --rp-feat-label: var(--rx-text-3);
  --rp-feat-value: var(--rx-text-1);

  --rp-bar-track:  var(--rx-border);
  --rp-divider:    var(--rx-border);
  --rp-row-border: var(--rx-border);

  --rp-pill-good-bg: var(--success-50);  --rp-pill-good-fg: var(--success-700);
  --rp-pill-okay-bg: var(--warning-50);  --rp-pill-okay-fg: var(--warning-700);
  --rp-pill-bad-bg:  var(--danger-50);   --rp-pill-bad-fg:  var(--danger-700);
  --rp-pill-warn-bg: var(--orange-50);   --rp-pill-warn-fg: var(--orange-700);

  --rp-ghost-bg:           var(--rx-surface-1);
  --rp-ghost-border:       var(--rx-border-strong);
  --rp-ghost-fg:           var(--rx-text-2);
  --rp-ghost-hover-bg:     var(--rx-surface-2);
  --rp-ghost-hover-border: var(--rx-border-strong);
  --rp-ghost-hover-fg:     var(--rx-text-1);

  --rp-iconlink-bg:           var(--rx-surface-1);
  --rp-iconlink-border:       var(--rx-border-strong);
  --rp-iconlink-fg:           var(--rx-accent-text);
  --rp-iconlink-hover-bg:     var(--rx-surface-2);
  --rp-iconlink-hover-border: var(--rx-accent);

  --rp-link:       var(--rx-text-3);
  --rp-link-line:  var(--rx-border-strong);
  --rp-link-hover: var(--rx-text-1);

  --rp-poi-subhead: var(--rx-text-3);

  /* Classes utilitárias do Tailwind usadas no HTML do relatório
     (text-slate-*, bg-slate-*, border-slate-*) — seguem a escala. */
  --rp-tw-text-400: var(--slate-400);
  --rp-tw-text-500: var(--slate-500);
  --rp-tw-text-600: var(--slate-600);
  --rp-tw-text-700: var(--slate-700);
  --rp-tw-text-800: var(--slate-800);
  --rp-tw-text-900: var(--slate-900);
  --rp-tw-bg-50:    var(--slate-50);
  --rp-tw-bg-100:   var(--slate-100);
  --rp-tw-bg-white: var(--rx-surface-1);
  --rp-tw-border-100: var(--rx-border);
  --rp-tw-border-200: var(--rx-border-strong);

  --rp-scroll-track:       var(--rx-surface-0);
  --rp-scroll-thumb:       var(--rx-border-strong);
  --rp-scroll-thumb-hover: var(--rx-text-3);

  /* Menu de âncoras sticky (rx-core/report-anchor-nav.css) */
  --nav-bg: var(--rx-surface-0);
  --nav-pill-bg: var(--rx-surface-1);
  --nav-pill-bg-stuck: var(--rx-surface-1);
  --nav-pill-border: var(--rx-border);
  --nav-pill-border-stuck: color-mix(in srgb, var(--rx-accent) 45%, var(--rx-border));
  --nav-pill-shadow-stuck: 0 1px 2px rgba(0,0,0,0.06), 0 10px 28px rgba(0,0,0,0.10);
  --nav-text: var(--rx-text-3);
  --nav-text-hover: var(--rx-text-1);
  --nav-hover-bg: var(--rx-tint-2);
  --nav-active-bg: var(--rx-accent);
  --nav-active-text: var(--rx-accent-contrast);
  --nav-focus-ring: var(--rx-accent);
}
