/* ====================================================================
   escolha em localStorage d3_theme). Paleta: fundo #F6F3FF · texto
   #171130 · superfícies brancas · sombras violeta suaves. KILL-SWITCH:
   Fontes: varrimento 3 agentes (index+agenda / pulso / módulos)
   ==================================================================== */

/* ── 1. VARIÁVEIS GLOBAIS ── */
html.th-landing{
  --accent-grad:linear-gradient(135deg,#6D28D9 0%,#8B5CF6 100%);
  --bg-base:#EFEAF9;
  --txt-1:#171130; --txt-2:rgba(23,17,48,.68); --txt-3:rgba(23,17,48,.52);
  --glass-bg:rgba(255,255,255,.88); --glass-border:rgba(23,17,48,.11);
  --field-bg:#FFFFFF; --field-border:rgba(23,17,48,.14);
  color-scheme:light; background:#EFEAF9;
}
html.th-landing body{ background:#EFEAF9; color:#171130; }

/* ── 2. RAIZ DO VÉU ESCURO: névoa dos temas de acento + brilhos da landing ── */
html.th-landing .d1-bg, html.th-landing .d1-bg-ov{ display:none !important; }
/* [24/7] SEM efeito névoa/glow no modo claro → fundo lavanda LISO */
html.th-landing .overlay{ background:#EFEAF9; }
html.th-landing .overlay::before{ background:none !important; }
/* o fundo ANIMADO dos temas de acento pinta os overlays de escuro com !important (linha 4864 do index)
   → no claro, vencemos com especificidade superior (html.th-landing body.…) */
html.th-landing body.theme-animated .overlay{ background:#EFEAF9 !important; }

/* ── 3. CHROME PARTILHADO (complementos à secção do index) ── */
html.th-landing .overlay-title{ color:#171130; }
html.th-landing .overlay-back{ color:var(--accent); }
html.th-landing .d3-chev{ stroke:rgba(23,17,48,.3); }
html.th-landing .edit-field-label{ color:rgba(23,17,48,.55); }
html.th-landing :is(.bk-st-sub,.bk-ts,.ntf-ts,.d3-card-lbl){ color:rgba(23,17,48,.5); }
html.th-landing :is(.bk-st-title,.bk-url,.bk-tt,.ntf-tt,.cnt-today-r .tt,.pls-stat-num,.pls-card-title,.pls-goal-t,.pls-goal-v,.nd-date,.nd-occrow b,.pls-hl-tit){ color:#171130; }
html.th-landing :is(.bk-act,.nd-act,.bk-link-copy){ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:#171130; }
html.th-landing :is(.bk-act.accent,.nd-act.nd-primary){ background:var(--accent); color:#fff; border:none; }
html.th-landing .bk-sw, html.th-landing .ntf-sw{ background:rgba(23,17,48,.16); }
html.th-landing .bk-sw.on, html.th-landing .ntf-sw.on{ background:#30D158; }
html.th-landing .pls-stat-lbl{ color:rgba(23,17,48,.5); }
html.th-landing .nd-dow{ color:rgba(23,17,48,.45); }
html.th-landing .nd-date span{ color:rgba(23,17,48,.45); }
html.th-landing .nd-tag{ background:rgba(23,17,48,.06); color:rgba(23,17,48,.65); }
html.th-landing .nd-bar{ background:rgba(23,17,48,.08); } html.th-landing .nd-bar s{ background:rgba(23,17,48,.35); }
html.th-landing .nd-badge{ background:rgba(23,17,48,.08); color:#171130; }
html.th-landing .nd-b-today{ background:var(--accent); color:#fff; }
html.th-landing .nd-closedtxt{ color:rgba(23,17,48,.4); }
html.th-landing .nd-hint{ color:rgba(23,17,48,.4); } html.th-landing .nd-avgtxt{ color:rgba(23,17,48,.35); }
html.th-landing .pls-ndcard{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 8px 24px rgba(109,40,217,.07); }
html.th-landing .cnt-chip{ background:#FFFFFF; color:#171130; }
html.th-landing .cnt-recency{ color:rgba(23,17,48,.4); }
html.th-landing .cnt-avatar{ color:#fff; }

/* ── 4. AGENDA: popup rápido, modal de detalhes, editor, almoço (agenda-original.css) ── */
html.th-landing body.is-pinching .advanced-agenda .corner-cell{ background:#EFEAFB !important; }
html.th-landing #agenda-overlay .advanced-agenda .appointment:not(.apt-lunch):not(.apt-blocked){
  color:#1c1633 !important; text-shadow:none;
  border:1px solid rgba(23,17,48,.22); box-shadow:0 2px 8px rgba(23,17,48,.10);
}
html.th-landing #agenda-overlay .advanced-agenda .appointment:not(.apt-lunch):not(.apt-blocked) *{ color:#1c1633 !important; text-shadow:none; }
/* [24/7] cartões OPACOS no tema claro (cor 15% SOBRE branco, não sobre transparente) → as linhas da grelha
   deixam de se ver através dos cartões. Aspeto idêntico (a grelha é branca), só que o cartão passa a tapar. */
html.th-landing #agenda-overlay .advanced-agenda .apt-booked{ background:color-mix(in srgb, var(--agenda-color-manual, #ffff10) 15%, #fff) !important; }
html.th-landing #agenda-overlay .advanced-agenda .apt-app-chat{ background:color-mix(in srgb, var(--agenda-color-app, #ffffff) 15%, #fff) !important; }
html.th-landing #agenda-overlay .advanced-agenda .apt-public-chat{ background:color-mix(in srgb, var(--agenda-color-public, #ff1181) 15%, #fff) !important; }
html.th-landing #agenda-overlay .advanced-agenda .apt-whatsapp{ background:color-mix(in srgb, var(--agenda-color-whatsapp, #00ff00) 15%, #fff) !important; }
html.th-landing #agenda-overlay .advanced-agenda .gcal-event{ background:color-mix(in srgb, var(--agenda-color-google, #00ffff) 20%, #fff) !important; }
/* [24/7] TEMA ESCURO: cartões opacos (cor SOBRE o fundo escuro da grelha #060510) → linhas da grelha não se veem através deles */
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda .apt-booked{ background:color-mix(in srgb, var(--agenda-color-manual, #ffff10) 15%, var(--bg-color, #060510)) !important; }
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda .apt-app-chat{ background:color-mix(in srgb, var(--agenda-color-app, #ffffff) 15%, var(--bg-color, #060510)) !important; }
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda .apt-public-chat{ background:color-mix(in srgb, var(--agenda-color-public, #ff1181) 15%, var(--bg-color, #060510)) !important; }
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda .apt-whatsapp{ background:color-mix(in srgb, var(--agenda-color-whatsapp, #00ff00) 15%, var(--bg-color, #060510)) !important; }
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda .gcal-event{ background:color-mix(in srgb, var(--agenda-color-google, #00ffff) 20%, var(--bg-color, #060510)) !important; }
/* [24/7] TEMA ESCURO: blocos INDISPONÍVEL (bloqueado/almoço) também opacos */
html:not(.th-landing):not(.th-dim) #agenda-overlay .advanced-agenda :is(.apt-blocked,.apt-lunch,.appointment.apt-blocked,.appointment.apt-lunch){ background:color-mix(in srgb, var(--agenda-color-deadhours, var(--accent)) 12%, #201f26) !important; }
html.th-landing .appointment-details-modal{ background:rgba(23,17,48,.35); }
html.th-landing .apt-field-display{ color:#171130; background:#FFFFFF; }
html.th-landing .apt-field-display:active{ border-color:rgba(23,17,48,.3); }
html.th-landing .apt-field-input{ color:#171130; background:#FFFFFF; }
/* [27/7] BORDA de volta aos campos do popup de marcações. O fundo branco foi
   decisão desta manhã (commit 1f493bf) e MANTÉM-SE — mas aí só se trocou a
   variável --field-border, e estes campos não a usam: a borda deles vem da regra
   base, rgba(255,255,255,.12), que sobre o cartão BRANCO fica invisível. Resultado:
   caixas e seletores sem contorno nenhum, texto a flutuar. Aqui herdam a borda do
   tema (a mesma variável), para o fundo branco continuar a ler-se como campo. */
html.th-landing :is(.apt-field-input,.apt-field-display,.quick-apt-field input,.quick-apt-field select,.quick-apt-field textarea){ border:1px solid var(--field-border,rgba(23,17,48,.14)); }
html.th-landing #apt-modal{ background:#FFFFFF; }
html.th-landing #apt-modal .apt-modal-header{ background:#F6F3FF; }
html.th-landing #apt-modal .apt-modal-title{ color:#171130; }
html.th-landing #apt-modal .apt-modal-close:active{ color:#171130; }
html.th-landing #apt-modal :is(.apt-modal-input-wrapper input,.apt-modal-select,.apt-modal-price-display,.apt-modal-type){ background:#FFFFFF; color:#171130; }
html.th-landing #apt-modal .apt-modal-input-wrapper input:focus{ background:#FFFFFF; }
html.th-landing .agenda-color-float-panel{ background:rgba(255,255,255,.97); box-shadow:0 16px 44px rgba(23,17,48,.18); }
html.th-landing .advanced-agenda .selection-client-input{ background:#FFFFFF; color:#171130; }
html.th-landing .quick-apt-backdrop{ background:rgba(23,17,48,.3); }
html.th-landing .quick-apt-card{
  /* opaco e SEM desfoque: com 96% + backdrop-filter, o conteúdo escuro por trás
     transparecia no topo do cartão (mancha cinzenta no iOS) [27/7] */
  background:#FFFFFF;
  backdrop-filter:none; -webkit-backdrop-filter:none;
  border-color:rgba(23,17,48,.08);
  box-shadow:0 20px 60px rgba(109,40,217,.16), 0 0 0 .5px rgba(23,17,48,.04) inset;
}
html.th-landing .quick-apt-field label{ color:rgba(23,17,48,.5); }
html.th-landing .quick-apt-field textarea{ color:#171130; }
html.th-landing .quick-apt-confirm{ color:rgba(23,17,48,.6); }
html.th-landing .ios-toggle input:checked + .ios-toggle-track::before{ background:#fff; }
html.th-landing .lunch-popup-card{ background:rgba(255,255,255,.97); }
html.th-landing .lunch-popup-header{ color:#171130; }
html.th-landing .lunch-popup-label{ color:rgba(23,17,48,.8); }
html.th-landing :is(.lunch-popup-autolock-row.expanded,.lunch-popup-pinned-row.expanded){ border-top-color:rgba(23,17,48,.08); }
html.th-landing .lunch-popup-value{ color:rgba(23,17,48,.6); }
html.th-landing .lunch-popup-select{ color:#171130; background:#FFFFFF; }
html.th-landing .lunch-popup-btn.done{ color:rgba(23,17,48,.8); background:#FFFFFF; }

/* ── 5. INLINE-STYLES espalhados (regras [style*] cirúrgicas) ── */
html.th-landing #contactos-overlay [style*="border-top:1px solid rgba(255,255,255,.05)"]{ border-top-color:rgba(23,17,48,.08) !important; }
html.th-landing #horarios-overlay [style*="color:#fff"]{ color:#171130 !important; }
html.th-landing #horarios-overlay input[type=date]{ color:#171130 !important; color-scheme:light; }
html.th-landing :is(#horarios-overlay,#equipa-edit-overlay) [style*="border-top:1px solid rgba(255,255,255,.06)"]{ border-top-color:rgba(23,17,48,.08) !important; }
html.th-landing [style*="color:#cdbcff"]{ color:var(--accent) !important; }
html.th-landing [style*="color:#c9b8ff"]{ color:var(--accent) !important; }
html.th-landing [style*="color:#a78bfa"]{ color:var(--accent) !important; }
html.th-landing [style*="color:#30d158"]{ color:#1E8E3E !important; }
html.th-landing [style*="rgba(30,27,46"]{ background:#FFFFFF !important; color:#171130; }

/* ── 6. (o botão redondo do tema foi substituído pelo painel «Aparência»
      construído em d3-theme-landing.js — 27/7. CSS antigo removido.) ── */

/* ═══ 7. INDEX + AGENDA (varrimento agente 1) ═══ */
/* ============================================================
   trocadas — abaixo só o que está HARDCODED escuro nos ficheiros:
   ============================================================ */

/* ── GLOBAL (index.html <style> base: html{background:#000;color-scheme:dark}) ── */
html.th-landing{ background:#F6F3FF; color-scheme:light; }

/* ── index.html · <style> base — campos, selects, cartões (color:#fff hardcoded) ── */
html.th-landing :is(input[type=text],input[type=tel],input[type=number],input[type=url],input[type=email],input[type=date],input[type=datetime-local],input[type=search],input[type=password],textarea){ color:#171130; }
html.th-landing select{ color:#171130; }
html.th-landing select option{ background:#FFFFFF; color:#171130; }
html.th-landing .card{ box-shadow:0 8px 24px rgba(109,40,217,.07); }
html.th-landing .card::before{ background:linear-gradient(90deg,transparent,rgba(23,17,48,.06),transparent); }
html.th-landing .contacts-search{ color:#171130; }
html.th-landing .mem-btn{ color:#171130; }
html.th-landing .mem-btn:active{ background:rgba(23,17,48,.10); }
html.th-landing .toggle-row{ border-top-color:rgba(23,17,48,.07); }
html.th-landing .ios-track{ background:rgba(23,17,48,.15); }   /* checked #30D158 mantém-se */
html.th-landing .kb-entry-btn{ color:#171130; }
html.th-landing .kb-entry-btn:active{ background:rgba(23,17,48,.06); }
html.th-landing .inv-item{ border-bottom-color:rgba(23,17,48,.07); }

/* ── index.html · modal de veículo ── */
html.th-landing .veh-modal{ background:rgba(255,255,255,.96); box-shadow:0 -8px 40px rgba(109,40,217,.14); }
html.th-landing .veh-modal-header{ border-bottom-color:rgba(23,17,48,.08); }
html.th-landing .veh-modal-body{ color:rgba(23,17,48,.8); }
html.th-landing .veh-modal-close{ background:rgba(23,17,48,.06); color:#171130; }

/* ── index.html · chrome dos overlays (nav, voltar, +, ✓, pesquisa) ── */
/* [27/7] Header SÓLIDO. A 65% translúcido + backdrop-filter:blur(22px) a barra não
   tinha cor própria: mostrava, desfocado, o que estava por baixo — cartões no Pulso,
   lista nos Contactos, hub nas Definições — e o tom saía diferente em cada secção
   (mesma causa do problema da caixa de texto). Com o painel de respostas aberto
   mudava outra vez, porque a barra sobe para cima do véu e passa a desfocá-lo.
   Sólido = mesmo tom sempre. O desfoque é desligado aqui porque sem transparência
   não faz nada e só custa GPU. No tema escuro o vidro MANTÉM-SE (regra base). */
html.th-landing .overlay-nav{ background:#F7F5FC; backdrop-filter:none; -webkit-backdrop-filter:none; }   /* borda accent .4 mantém-se */
html.th-landing .overlay-back::before{ border-left-color:#171130; border-bottom-color:#171130; }
html.th-landing .ov-add,
html.th-landing .ov-check{ color:#171130; }   /* chip rgba(120,120,128,.22) funciona nos dois temas */
html.th-landing .kb-search{ background-color:rgba(23,17,48,.06); color:#171130; }
html.th-landing .kb-search::placeholder{ color:rgba(23,17,48,.45); }
html.th-landing .kb-search-ic{ stroke:rgba(23,17,48,.45); }
/* [27/7] ATIVA (a escrever) → LUZ, não branco puro. O branco total era um salto
   grande demais; agora clareia só um pouco e ganha um brilho suave de acento —
   lê-se como "está ligada" sem chamar mais atenção que o próprio texto.
   O brilho vale nos DOIS temas (regra sem prefixo); o clarear é só no claro.
   Aplica-se às 4 caixas .kb-search: pergunta rápida nos 3 headers + pesquisa da
   Base de Conhecimento. */
/* [27/7] "ATIVA" em TRÊS gatilhos, porque só o :focus não chegava:
   1) :focus — o caso simples (Contactos, onde o clique só põe o cursor a piscar);
   2) o wrap com foco dentro — o ✕ dentro da caixa também conta;
   3) o PAINEL ABERTO — no Pulso e nas Definições o clique abre o painel de
      respostas e o foco sai da caixa; sem este gatilho a caixa voltava ao normal
      logo depois de tocar, e a luz só se via nos Contactos.
   (:has() é suportado no Safari 15.4+; o iPhone SE alvo é 15.6.) */
/* [27/7, 2ª volta] Cor SÓLIDA quando ativa. A translúcida deixava passar o que
   está por trás da barra — que difere por secção (véu/conteúdo) — e a caixa
   parecia mais escura no Pulso/Definições do que nos Contactos com o MESMO CSS.
   Sólida = idêntica nas três, garantido. */
.kb-search:focus,
.kb-search-wrap:focus-within .kb-search,
.overlay:has(.pls-ask-pop.open) .kb-search{ background-color:#4A4A54; box-shadow:0 0 0 1px rgba(124,92,252,.30), 0 0 13px rgba(124,92,252,.20); }
html.th-landing .kb-search:focus,
html.th-landing .kb-search-wrap:focus-within .kb-search,
html.th-landing .overlay:has(.pls-ask-pop.open) .kb-search{ background-color:#FBFAFE; box-shadow:0 0 0 1px rgba(109,40,217,.26), 0 0 13px rgba(109,40,217,.16); }

/* ── index.html · brand lockup ">_ Nome" (gradiente branco→lavanda ilegível em claro) ── */
html.th-landing #settings-overlay .overlay-title .ot-name{
  background:none; -webkit-text-fill-color:#171130; color:#171130;
  filter:drop-shadow(0 0 7px rgba(124,92,252,.18));
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  html.th-landing #settings-overlay .overlay-title .ot-name{ -webkit-text-fill-color:#171130; color:#171130; }
}

/* ── index.html · popup Pro-preview ── */
html.th-landing .pro-preview-cta .ppc-card{ background:#FFFFFF; border-color:rgba(124,92,252,.35); box-shadow:0 18px 50px rgba(109,40,217,.18); }
html.th-landing .pro-preview-cta .ppc-title{ color:#171130; }
html.th-landing .pro-preview-cta .ppc-sub{ color:rgba(23,17,48,.6); }

/* ── index.html · lista de contextos + card de info (i) ── */
html.th-landing .context-item:active{ background:#FFFFFF; }
html.th-landing .ctx-radio{ border-color:rgba(23,17,48,.22); }
html.th-landing .ctx-edit:active{ background:rgba(23,17,48,.10); }
html.th-landing .d3-info-card{ background:#FFFFFF; border-color:rgba(23,17,48,.08); box-shadow:0 20px 60px rgba(109,40,217,.16); }
html.th-landing .d3-info-card h4{ color:#171130; }
html.th-landing .d3-info-card p{ color:rgba(23,17,48,.74); }

/* ── index.html · toast ── */
html.th-landing .toast{ background:rgba(255,255,255,.95); border-color:rgba(23,17,48,.10); box-shadow:0 8px 30px rgba(109,40,217,.16); }

/* ── index.html · DOCK (.d2dock vidro escuro + ícones lavanda-claro) ── */
html.th-landing .d2dock{ background:rgba(255,255,255,.72); }   /* border-top accent .4 mantém-se */
html.th-landing .d2item{ color:rgba(124,92,252,.85); }         /* ativo continua gradiente url(#dockGrad) */

/* ── index.html · hub de Definições (.d3-*) + stat cards ── */
html.th-landing .d3-h1{ color:#171130; }
html.th-landing .d3-card-val{ color:#171130; }
html.th-landing .d3-card-title{ color:#171130; }
html.th-landing :is(.d3-row + .d3-row, .d3-trow + .d3-trow){ border-top-color:rgba(23,17,48,.07); }
html.th-landing .d3-row:active{ background:rgba(23,17,48,.04); }
html.th-landing .d3-row-ic{ background:#FFFFFF; }
html.th-landing .d3-row-title{ color:#171130; }
html.th-landing .d3-chip.on{ color:#6D28D9; }
html.th-landing #set-search-results .d3-row-ic{ color:#171130; }
/* sombra das subpáginas que deslizam (era rgba(0,0,0,.5)) */
html.th-landing :is(#ctx-edit-overlay.open,#prod-edit-overlay.open,#assistant-overlay.open,#whatsapp-overlay.open,#conta-overlay.open,#inventory-overlay.open){ box-shadow:-14px 0 40px rgba(23,17,48,.12); }

/* ── index.html · modal OTP/identidade (#id-modal, CSS-in-JS) ── */
html.th-landing #id-modal .idm-card{ background:#FFFFFF; box-shadow:0 20px 60px rgba(109,40,217,.18); }
html.th-landing #id-modal .idm-title{ color:#171130; }
html.th-landing #id-modal .idm-sub{ color:rgba(23,17,48,.6); }
html.th-landing #id-modal .idm-sub b{ color:#6D28D9; }
html.th-landing #id-modal .idm-input,
html.th-landing #id-modal .idm-otp input{ background:#FFFFFF; border-color:rgba(23,17,48,.14); color:#171130; }
html.th-landing #id-modal .idm-flabel{ color:rgba(23,17,48,.55); }
html.th-landing #id-modal .idm-paste{ color:#6D28D9; }
html.th-landing #id-modal .idm-msg.ok{ color:#148F44; }
html.th-landing #id-modal .idm-btn.cancel{ background:rgba(23,17,48,.06); color:#171130; }
html.th-landing #id-modal .idm-resend{ color:#6D28D9; }

/* ── index.html · overlay WhatsApp (estilos inline no markup → !important) ── */
html.th-landing #whatsapp-overlay [style*="color:rgba(255,255,255,0.35)"]{ color:rgba(23,17,48,.45) !important; }   /* #connected-phone, #enabled-sub, #contacts-sub, subs dos cfg-boxes */
html.th-landing #whatsapp-overlay [style*="color:rgba(255,255,255,.35)"]{ color:rgba(23,17,48,.45) !important; }
html.th-landing #whatsapp-overlay [style*="color:rgba(255,255,255,.4)"]{ color:rgba(23,17,48,.5) !important; }      /* título AI Contact Control, #wa-ac-hint, seta → do horário */
html.th-landing #whatsapp-overlay [style*="color:rgba(255,255,255,.3)"]{ color:rgba(23,17,48,.4) !important; }      /* lista vazia #wa-ac-list */
html.th-landing #whatsapp-overlay [style*="border-top:1px solid rgba(255,255,255,0.06)"]{ border-top-color:rgba(23,17,48,.07) !important; }
html.th-landing #whatsapp-overlay #sync-btn,
html.th-landing #whatsapp-overlay button[onclick="openContactsList()"]{ background:#FFFFFF !important; border-color:rgba(23,17,48,.12) !important; color:#171130 !important; }
html.th-landing :is(#wa-cfg-charlimit,#wa-cfg-memory,#wa-sched-start,#wa-sched-end){ color:#171130 !important; }    /* d3-whatsapp.js inline color:#fff (bg/borda já via var) */
html.th-landing #wa-ac-input{ color:#171130 !important; }

/* ── index.html · overlay Contactos (inline) ── */
html.th-landing #contacts-overlay button[onclick="toggleAddContactForm()"]{ background:#FFFFFF !important; border-color:rgba(23,17,48,.12) !important; color:#171130 !important; }
html.th-landing #add-contact-form{ background:rgba(23,17,48,.04) !important; border-color:rgba(23,17,48,.10) !important; }
html.th-landing :is(#add-contact-name,#add-contact-phone){ background:#FFFFFF !important; border-color:rgba(23,17,48,.12) !important; color:#171130 !important; }

/* ── index.html · cartão "Ficar com a conta" (#conta-claim) + fim de demo (#demo-end-card) ── */
html.th-landing #conta-claim [style*="color:rgba(255,255,255,.72)"]{ color:rgba(23,17,48,.72) !important; }
html.th-landing :is(#claim-email,#claim-pw){ background:#FFFFFF !important; border-color:rgba(23,17,48,.14) !important; color:#171130 !important; }
html.th-landing #demo-end-card [style*="color:rgba(255,255,255,.72)"]{ color:rgba(23,17,48,.72) !important; }
html.th-landing #demo-end-card [style*="color:rgba(255,255,255,.55)"]{ color:rgba(23,17,48,.55) !important; }
html.th-landing :is(#demo-end-email,#demo-end-pw){ background:#FFFFFF !important; border-color:rgba(23,17,48,.15) !important; color:#171130 !important; }

/* ── index.html · sheet criar/editar marcação (#ag-edit-modal, inline background:#0d0d14) ── */
html.th-landing #ag-edit-modal > div{ background:#FFFFFF !important; border-color:rgba(23,17,48,.08) !important; }
/* A "pega" existe só no sheet ANTIGO. O popup NOVO (d3-newapt, .na-card) partilha o id e o
   seu primeiro filho é o bloco do CLIENTE — esta regra pintava-o de cinzento com !important
   e especificidade de id, imune a tudo o que se tentasse do outro lado. [27/7] */
html.th-landing #ag-edit-modal > div:not(.na-card) > div:first-child{ background:rgba(23,17,48,.18) !important; }   /* pega/handle */
html.th-landing #ag-edit-modal [style*="font-size:18px"]{ color:#171130 !important; }                 /* título do sheet */

/* ── index.html · popup de confirmação de apagar (delete-article, CSS-in-JS inline) ── */
html.th-landing .delete-article-popup{ background:rgba(255,255,255,.96) !important; border-color:rgba(23,17,48,.08) !important; box-shadow:0 20px 60px rgba(109,40,217,.18) !important; }
html.th-landing .delete-article-popup h3{ color:#171130 !important; }
html.th-landing .delete-article-popup p{ color:rgba(23,17,48,.6) !important; }
html.th-landing .delete-article-popup .dac-cancel{ background:rgba(23,17,48,.06) !important; border-color:rgba(23,17,48,.12) !important; color:#171130 !important; }
/* .dac-confirm vermelho #FF453A mantém-se */

/* ── index.html · botão voltar do Booking Flow + snapshot-cover PWA ── */
html.th-landing #bfe-back-btn{ background:rgba(255,255,255,.85) !important; border-color:rgba(23,17,48,.12) !important; color:#171130 !important; }
html.th-landing #snap-cover{ background:#F6F3FF !important; }   /* cobertura preta ao ir p/ background (era #000) */

/* ============================================================
   ============================================================ */
html.th-landing #agenda-overlay .advanced-agenda{
  --bg-color:#EFEAF9; --bg-surface:#EFEAF9; --bg-deep:#EFEAF9;
  --bg-header:rgba(224,218,235,.97);
  --line-color:rgba(23,17,48,.15);
  --text:#171130; --text-main:#171130; --text-muted:rgba(23,17,48,.55);
  background:radial-gradient(130% 55% at 50% 0%, rgba(var(--accent-rgb),.10), transparent 58%), #EFEAF9 !important;
}
/* [24/7] horário ABERTO → fundo BRANCO; horas MORTAS → cor do fundo geral (lavanda, sem tinta) → fundem-se */
html.th-landing #agenda-overlay .advanced-agenda .grid-column:not(.outside-business-hours){ background-color:#FFFFFF !important; }
html.th-landing #agenda-overlay .advanced-agenda .grid-column.outside-business-hours{ background-color:#F5F2FB !important; }
/* barra dos dias */
html.th-landing #agenda-overlay .advanced-agenda .header-cell{ background:rgba(224,218,235,.97) !important; }
/* [24/7] cartões da meteorologia (.agwx) BRANCOS no tema claro */
html.th-landing #agenda-overlay .advanced-agenda .header-cell .agwx{ background:#fff !important; color:#171130 !important; border:1px solid rgba(23,17,48,.07) !important; box-shadow:0 1px 3px rgba(23,17,48,.08) !important; }
html.th-landing #agenda-overlay .advanced-agenda .header-cell .day-name{ color:rgba(23,17,48,.5) !important; }
html.th-landing #agenda-overlay .advanced-agenda .header-cell .day-number{ color:#171130 !important; }
/* current-day mantém var(--accent) */
/* coluna das horas + canto */
html.th-landing #agenda-overlay .advanced-agenda .time-column-wrapper,
html.th-landing #agenda-overlay .advanced-agenda .corner-cell{ background:rgba(224,218,235,.97) !important; }
html.th-landing #agenda-overlay .advanced-agenda .time-cell,
html.th-landing #agenda-overlay .advanced-agenda .time-cell span{ color:rgba(23,17,48,.6) !important; }
/* almoço + bloqueado */
/* [24/7] blocos INDISPONÍVEL (bloqueado/almoço) OPACOS no tema claro (antes translúcidos → linhas da grelha viam-se através) */
html.th-landing #agenda-overlay .advanced-agenda :is(.apt-blocked,.apt-lunch,.appointment.apt-blocked,.appointment.apt-lunch){ background:#E3E0EC !important; color:rgba(23,17,48,.62) !important; border:1px solid rgba(23,17,48,.22) !important; }
/* linha vermelha da hora atual mantém-se; pills mantêm cores por-colaborador */
/* botões flutuantes: switcher de agenda + «+» */
html.th-landing #agenda-overlay .teams-agenda-switcher,
html.th-landing #agenda-overlay .teams-agenda-create-btn{
  background:rgba(255,255,255,.85) !important;
  border-color:rgba(23,17,48,.12) !important;
  color:#171130 !important;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.8), 0 4px 15px rgba(109,40,217,.14) !important;
}

/* ── advanced-agenda.js · CSS injetado + inline ── */
html.th-landing .apt-noshow-btn{ color:#B45309; }                 /* âmbar #ffb340 ilegível em claro; bg .12 mantém-se */
html.th-landing .apt-noshow-btn.is-noshow{ color:#1F9D4D; }       /* verde #5fd47f idem */
html.th-landing .gcal-source-tag{ color:rgba(23,17,48,.45) !important; }
html.th-landing .apt-invoice-btn{ color:#6D28D9 !important; }     /* var(--accent-light) é tint claro afinado p/ escuro */
html.th-landing .apt-invoice-status a{ color:#6D28D9 !important; }

/* ── Fallback Safari 15 (sem color-mix) — espelha o bloco @supports do index.html ── */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  html.th-landing .advanced-agenda .apt-lunch,
  html.th-landing .advanced-agenda .apt-lunch-exception,
  html.th-landing .advanced-agenda .appointment.apt-lunch,
  html.th-landing .advanced-agenda .apt-blocked,
  html.th-landing .advanced-agenda .appointment.apt-blocked,
  html.th-landing body.dead-hours-active .advanced-agenda .apt-lunch,
  html.th-landing body.dead-hours-active .advanced-agenda .appointment.apt-lunch,
  html.th-landing body.dead-hours-active .advanced-agenda .apt-blocked,
  html.th-landing #agenda-overlay .advanced-agenda .appointment.apt-lunch,
  html.th-landing #agenda-overlay .advanced-agenda .appointment.apt-blocked{
    background-color:#E3E0EC !important;   /* opaco = rgba(23,17,48,.10) sobre #F6F3FF */
    background-image:none !important;
  }
  html.th-landing .advanced-agenda .apt-app-chat{ background:rgba(23,17,48,.08) !important; }   /* era branco .15 → invisível em claro */
}

/* ── index.html · agenda #ag do design3 (LEGADO — markup removido em prod; incluído por completude) ── */
html.th-landing .ag{ background:#F6F3FF; }
html.th-landing .ag-head{ background:rgba(239,234,251,.9); border-bottom-color:rgba(23,17,48,.08); }
html.th-landing .ag-corner{ background:rgba(239,234,251,.9); }
html.th-landing .ag-dh{ border-left-color:rgba(23,17,48,.10); }
html.th-landing .ag-dh span{ color:rgba(23,17,48,.5); }
html.th-landing .ag-dh b{ color:#171130; }
html.th-landing .ag-timecol{ background:#EFEAFB; }
html.th-landing .ag-t{ color:rgba(23,17,48,.6); }
html.th-landing .ag-col{
  border-left-color:rgba(23,17,48,.10);
  background-image:
}
html.th-landing .ag-apt{ border-bottom-color:#F6F3FF; }
html.th-landing .ag-apt.manual{ color:#7A6A00; }
html.th-landing .ag-apt.whatsapp{ color:#0B7A2B; }
html.th-landing .ag-apt.app{ color:#171130; }
html.th-landing .ag-apt.public{ color:#B01E64; }
html.th-landing .ag-apt.blocked{ background:rgba(23,17,48,.10); color:rgba(23,17,48,.55); }
html.th-landing .ag-lunch{ background:rgba(23,17,48,.10); color:rgba(23,17,48,.55); border-bottom-color:#F6F3FF; }
html.th-landing .ag-gcal{ color:#1D4FA0; }
html.th-landing .ag-sel{ border-color:rgba(23,17,48,.8); }
html.th-landing .ag-sel-form input{ background:#FFFFFF; color:#171130; }
html.th-landing .ag-sel-btns{ background:rgba(255,255,255,.85); }
html.th-landing .ag-switch,
html.th-landing .ag-fab{ color:#171130; }

/* ── d3-extras.js · Armazenamento + Suporte ── */
html.th-landing :is(#armazenamento-overlay.open,#suporte-overlay.open,#suporte-thread-overlay.open){ box-shadow:-14px 0 40px rgba(23,17,48,.12); }
html.th-landing .d3x-st-total{ color:#171130; }
html.th-landing .d3x-bar{ background:rgba(23,17,48,.08); }
html.th-landing .d3x-krow{ border-bottom-color:rgba(23,17,48,.07); }
html.th-landing .d3x-krow .v{ color:#171130; }
html.th-landing .d3x-chip.on{ color:#6D28D9; }
html.th-landing .d3x-badge.amber{ color:#B45309; }   /* #FFB340 ilegível em claro */
html.th-landing .d3x-faq + .d3x-faq .d3x-faq-q{ border-top-color:rgba(23,17,48,.07); }
html.th-landing .d3x-faq-qt{ color:#171130; }
html.th-landing .d3x-bub.me{ color:#171130; }
html.th-landing .d3x-bub.them{ background:#FFFFFF; border-color:rgba(23,17,48,.10); }

/* ── d3-whatsapp.js · AI Contact Control ── */
html.th-landing #wa-ac-modes .wa-ac-chip{ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:rgba(23,17,48,.6); }
html.th-landing #wa-ac-modes .wa-ac-chip.on{ color:#6D28D9; }   /* bg accent .18 mantém-se */
html.th-landing .wa-ac-row{ border-bottom-color:rgba(23,17,48,.07); color:#171130; }
/* .wa-ac-del vermelho mantém-se; #wa-ac-add / #wa-ac-sync são accent — mantêm-se */

/* JS-INLINE / NOTAS (não resolúvel só com CSS ou fora dos ficheiros varridos):
      O TEXTO dos pills vem de agenda-original.css (ficheiro NÃO incluído neste sweep): se em claro
      houver texto branco sobre pill amarelo/claro, é lá que precisa de override (ex.: .appointment{color}).
   3. index.html:789 #snap-cover background:#000 via cssText — coberto acima com !important.
   4. index.html:1593+ admin-panel-overlay (#08080C, texto branco) — EXCLUÍDO (admin).
   5. index.html:737 barra touchdebug (rgba(0,0,0,.9)/#39ff14) — ferramenta de debug, deixada escura.
      bloco d3-bgtheme — excluídos por instrução. */
/* ═══ 8. PULSO (varrimento agente 2) ═══ */
/* ============================================================
   Source: scratchpad/prod/d3-pulse.js styleEl (lines ~740-1037)
   ============================================================ */

/* ── ask bar (search pill ✕ + send arrow) ── */
html.th-landing .pls-askclear svg{ stroke:rgba(23,17,48,.7); }               /* overrides stroke attr rgba(255,255,255,.75) */
html.th-landing .pls-asksend{ background:rgba(23,17,48,.08); color:#171130; }
html.th-landing .pls-asksend svg polygon{ fill:#171130; }                    /* overrides fill="#fff" attr */

/* ── ask popup («Pergunta o que quiseres») ── */
html.th-landing #pls-ask-bd{ background:rgba(23,17,48,.28); }
html.th-landing .pls-ask-pop{ background:#FFFFFF; box-shadow:0 20px 55px rgba(23,17,48,.18); } /* accent border kept */
html.th-landing .pls-ask-fmt button{ background:#FFFFFF; color:#171130; }
html.th-landing .pls-ask-fmt button.on{ background:rgba(124,92,252,.16); color:#6D28D9; }
html.th-landing .pls-ask-a{ color:#171130; }
html.th-landing .pls-ask-chart{ background:#EFEAFB; border-color:rgba(23,17,48,.07); }
html.th-landing .pls-ask-err{ color:#DC2626; }
html.th-landing .pls-ask-actions button{ background:#FFFFFF; color:#171130; }
html.th-landing .pls-ask-actions button.acc{ background:var(--accent,#7C5CFC); color:#fff; } /* restore white on accent */

/* ── Radar (cartões proativos, d3-pulse.js) — o dark rgba(28,28,30,.8) fica ilegível no claro ── */
html.th-landing .pls-radar-card{ background:rgba(255,255,255,.88); border-color:rgba(23,17,48,.11); }
html.th-landing .pls-radar-tt{ color:#171130; }
html.th-landing .pls-radar-x{ background:rgba(23,17,48,.07); color:rgba(23,17,48,.5); }

/* ── search results ── */
html.th-landing .pls-res-row{ border-bottom-color:rgba(23,17,48,.07); }
html.th-landing .pls-res-row:active{ background:rgba(23,17,48,.04); }
html.th-landing .pls-res-name{ color:#171130; }

/* ── stats / occupancy bar / goal bar ── */
html.th-landing :is(.pls-occbar,.pls-goalbar){ background:rgba(23,17,48,.08); }
html.th-landing .pls-goal-done .pls-goal-t{ color:#199E70; }                 /* was #5fe0a0, illegible on light */

/* ── cards (.pls-card / buttons / chips / mini / more) ── */
html.th-landing .pls-card-btn{ color:#171130; }                              /* accent border kept */
html.th-landing .pls-card-btn.ghost{ background:#FFFFFF; color:#171130; }
html.th-landing .pls-card.pls-tap:active{ background:rgba(23,17,48,.04); }
html.th-landing .pls-install .pls-card.pls-tap:active{ background:rgba(23,17,48,.03); }
html.th-landing .pls-chip{ background:rgba(124,92,252,.14); color:#6D28D9; } /* was #c9b8ff */
html.th-landing .pls-more{ background:#FFFFFF; }
html.th-landing .pls-more:active{ background:rgba(23,17,48,.08); }

/* ── destaque (highlight) ── */
html.th-landing .pls-hl-badge{ color:#1A9E50; background:rgba(48,209,88,.14); } /* darker green text for contrast */

/* ── destaque help popup ── */
html.th-landing .pls-hlp-ov{ background:rgba(23,17,48,.3); }
html.th-landing .pls-hlp-card{ background:#FFFFFF; border-color:rgba(23,17,48,.08); color:#171130; box-shadow:0 24px 64px rgba(23,17,48,.2); }
html.th-landing .pls-hlp-x{ background:rgba(23,17,48,.06); color:#171130; }

/* ── quick actions row ── */
html.th-landing .pls-act{ color:#171130; }                                   /* accent svg stroke kept */
html.th-landing .pls-act:active{ background:#FFFFFF; }

/* ── preview banner ── */
html.th-landing .pls-preview-banner{ color:#6D28D9; }                        /* purple bg/border kept; text was #c9b8ff */

/* ── Análise: cards, table, badge ── */
html.th-landing :is(.pls-an-title,.pls-anx-title){ color:#171130; }
html.th-landing .pls-an-tbl td{ border-top-color:rgba(23,17,48,.07); }
html.th-landing .pls-an-tbl td.name{ color:#171130; }
html.th-landing .pls-an-badge{ background:rgba(230,103,103,.14); color:#C94B43; } /* was #ff9a93 */

/* ── Análise: period dropdown ── */
html.th-landing .pls-anp-menu{ background:#FFFFFF; border-color:rgba(23,17,48,.1); box-shadow:0 16px 44px rgba(23,17,48,.18); }
html.th-landing .pls-anp-opt:active{ background:#FFFFFF; }

/* ── Análise: mini-card grid + expansion ── */
html.th-landing .pls-anmini{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 8px 24px rgba(109,40,217,.07); }
html.th-landing .pls-anmini:active{ background:#F1EDFB; }
html.th-landing .pls-anmini.pls-expanded:active{ background:#FFFFFF; }
html.th-landing .pls-anmini.d3p-drag{ box-shadow:0 12px 32px rgba(23,17,48,.25); }
html.th-landing .pls-anmini .num{ color:#171130; }
html.th-landing .pls-anx-close{ background:rgba(23,17,48,.06); color:#171130; }

/* deltas / status text (darkened for legibility on light) */
html.th-landing :is(.pls-anmini .delta.up,.pls-exp-num .d.up){ color:#1F9D55; }
html.th-landing :is(.pls-anmini .delta.down,.pls-exp-num .d.down){ color:#D14B4B; }

/* ── Explorador (.pls-exp) ── */
html.th-landing .pls-exp{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 8px 24px rgba(109,40,217,.07); }
html.th-landing .pls-exp-num .v{ color:#171130; }
html.th-landing .pls-exp-sel select{ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:#171130; }
html.th-landing .pls-exp-fmt button{ background:#FFFFFF; color:#171130; }
html.th-landing .pls-exp-fmt button.on{ background:rgba(124,92,252,.16); color:#6D28D9; }
html.th-landing .pls-exp-pin{ color:#171130; }                               /* accent border kept */
html.th-landing .pls-exp-pin.ok{ background:rgba(48,209,88,.16); color:#178A4C; }

/* ── Consulta rápida (.pls-xf) ── */
html.th-landing .pls-xf{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 8px 24px rgba(109,40,217,.07); }
html.th-landing :is(.pls-xf-f select,.pls-xf-f input){ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:#171130; }
html.th-landing .pls-xf-reset{ background:#FFFFFF; }
html.th-landing .pls-xf-reset:active{ background:rgba(23,17,48,.08); }
html.th-landing .pls-xf-stat{ background:#EFEAFB; border-color:rgba(23,17,48,.07); }
html.th-landing .pls-xf-stat .v{ color:#171130; }
html.th-landing .pls-xf-row{ border-bottom-color:rgba(23,17,48,.07); }
html.th-landing .pls-xf-row:active{ background:rgba(23,17,48,.04); }
html.th-landing .pls-xf-row .dt{ color:#6D28D9; }                            /* var(--accent-light,#b9a8ff) too pale on light */
html.th-landing .pls-xf-row .cl{ color:#171130; }

/* ── bottom sheet (#pls-sheet) ── */
html.th-landing #pls-sheet{ background:rgba(23,17,48,.3); }
html.th-landing #pls-sheet .pls-sheet-card{ background:#FFFFFF; border-color:rgba(23,17,48,.08); }
html.th-landing #pls-sheet .pls-sheet-grab{ background:rgba(23,17,48,.18); }
html.th-landing #pls-sheet .pls-sheet-title{ color:#171130; }
html.th-landing :is(#pls-sheet input,#pls-sheet select){ color:#171130; }    /* bg/border use --field vars */
html.th-landing #pls-sheet .pls-sheet-row{ color:#171130; border-bottom-color:rgba(23,17,48,.07); }
html.th-landing #pls-sheet .pls-sheet-row:active{ background:rgba(23,17,48,.04); }
/* inline style="color:#fff" in sheet markup — !important is the only CSS path over element styles */
html.th-landing #pls-sheet .pls-toggle-row span{ color:#171130 !important; }
html.th-landing #pls-sheet .pls-sheet-card div[style*="color:#fff"]{ color:#171130 !important; }

/* ── SVG charts (colors set as ATTRIBUTES by JS → CSS wins) ── */
html.th-landing :is(#pulse-overlay,.pls-ask-pop,#pls-sheet) svg text[fill="#f2f1f7"]{ fill:#171130; }             /* AN_INK: donut total */
html.th-landing :is(#pulse-overlay,.pls-ask-pop,#pls-sheet) svg text[fill="#b6b4c4"]{ fill:rgba(23,17,48,.6); }   /* AN_INK2: value labels */
html.th-landing :is(#pulse-overlay,.pls-ask-pop,#pls-sheet) svg text[fill="#807e90"]{ fill:rgba(23,17,48,.45); }  /* AN_MUTED: axis labels */
html.th-landing :is(#pulse-overlay,.pls-ask-pop,#pls-sheet) svg line[stroke="rgba(255,255,255,.10)"]{ stroke:rgba(23,17,48,.1); } /* AN_GRID baseline */

/* JS-INLINE — colors hardcoded in d3-pulse.js (prod copy line numbers)
   Handled above via CSS (set as SVG/HTML ATTRIBUTES, CSS overrides them):
   - L2359: AN_INK '#f2f1f7', AN_INK2 '#b6b4c4', AN_MUTED '#807e90', AN_GRID 'rgba(255,255,255,.10)'
   - L1047: clear ✕ button svg stroke="rgba(255,255,255,.75)" (attribute) → covered (.pls-askclear svg).
   - L1049: send arrow polygon fill="#fff" (attribute) → covered (.pls-asksend svg polygon).
   Inline element styles (style="…" beats normal CSS; covered here with scoped !important — move to JS if !important is unwanted):
   - L4171: block-time sheet "Dia inteiro" label — style="font-size:14px;color:#fff" → covered by .pls-toggle-row span rule.
   - L4303: contact sheet client name — style="color:#fff;font-size:17px;font-weight:700" → covered by div[style*="color:#fff"] rule.
   Toasts use the global window.showToast (styled outside this file — not covered here). */
/* ═══ 9. MÓDULOS (varrimento agente 3) ═══ */


/* ══════════════════════════════════════════════════════════════════
   Sweep: d3-contactos, d3-booking, d3-notificacoes, d3-newapt,
   Skipped: rules on overridden vars (--glass-*, --field-*, --txt-*)
   ══════════════════════════════════════════════════════════════════ */

/* ── shared: slide-in overlay shadows (all modules use rgba(0,0,0,.5)) ── */
html.th-landing :is(#contacto-det-overlay,#cnt-wa-overlay,#booking-overlay,#notificacoes-overlay,#lembretes-overlay,#schedule-overlay,#gcal-overlay,#moloni-overlay,#subscricao-overlay,#horarios-overlay,#equipa-overlay,#equipa-edit-overlay).open{ box-shadow:-14px 0 40px rgba(23,17,48,.16); }

/* ── d3-contactos.js / list, chips, badges ── */
html.th-landing .cnt-count-num{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-badge.b-red{ color:#D93025; }
html.th-landing .cnt-badge.b-amber{ color:#B45309; }
html.th-landing .cnt-badge.b-accent{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-badge.b-green{ color:#1E8E3E; }
html.th-landing .cnt-bar{ background:rgba(23,17,48,.08); }
html.th-landing .cnt-today{ background:linear-gradient(135deg,rgba(124,92,252,.10),rgba(124,92,252,.02)); border-color:rgba(124,92,252,.22); }
html.th-landing .cnt-today-r .tt{ color:#171130; }
html.th-landing .cnt-chip.cnt-chip-drag{ box-shadow:0 8px 22px rgba(23,17,48,.18); }
html.th-landing .cnt-chip .cl{ color:#171130; }
html.th-landing .cnt-chip.on .cl{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-blocked{ color:#D93025; }

/* ── d3-contactos.js / empty-states, hero, leads ── */
html.th-landing .cnt-hero-title{ color:#171130; }
html.th-landing .cnt-example-badge{ color:#B45309; }
html.th-landing .cnt-celebrate{ color:#171130; }
html.th-landing .cnt-lead-av{ background:rgba(30,142,62,.12); color:#1E8E3E; }
html.th-landing .cnt-lead-name{ color:#171130; }
html.th-landing .cnt-invite{ color:var(--accent,#7C5CFC); }

/* ── d3-contactos.js / detail header, stats, sources ── */
html.th-landing .cnt-det-name{ color:#171130; }
html.th-landing .cnt-stat-num{ color:#171130; }
html.th-landing .cnt-appt-date{ color:#171130; }
html.th-landing .cnt-src.manual{ color:#8A7500; }
html.th-landing .cnt-src.manual .cnt-src-dot{ background:#C9A800; }
html.th-landing .cnt-src.whatsapp{ color:#1E8E3E; }
html.th-landing .cnt-src.public{ color:#C2185B; }
html.th-landing .cnt-src.app{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-src.other{ background:#FFFFFF; }
html.th-landing .cnt-src.other .cnt-src-dot{ background:rgba(23,17,48,.35); }
html.th-landing .cnt-act{ color:#171130; }
html.th-landing .cnt-act:active{ background:rgba(23,17,48,.06); }
html.th-landing .cnt-act.wa{ color:#25D366; } /* re-assert: base override above outranks it */
html.th-landing .cnt-flags{ color:#C2570A; }
html.th-landing .cnt-appt-canctag{ color:#D93025; }
html.th-landing .cnt-appt-nstag{ color:#B45309; }

/* ── d3-contactos.js / ficha redesenhada (d2) ── */
html.th-landing .cnt-d2-idinfo h1{ color:#171130; }
html.th-landing .cnt-d2-ic{ background:#FFFFFF; }
html.th-landing .cnt-d2-ic:active{ background:rgba(23,17,48,.10); }
html.th-landing .cnt-d2-ic svg{ stroke:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-ic.wa svg{ stroke:none; } /* re-assert WA fill icon */
html.th-landing .cnt-d2-tag.rec{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-tag.ok{ color:#1E8E3E; }
html.th-landing .cnt-d2-tag.warn{ color:#B45309; }
html.th-landing .cnt-d2-btn.pri{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-btn.sec{ color:#171130; }
html.th-landing .cnt-d2-btn.sec:active{ background:rgba(23,17,48,.06); }

/* timeline */
html.th-landing .cnt-d2-dot{ border-color:#FFFFFF; }
html.th-landing .cnt-d2-lab .d{ color:rgba(23,17,48,.62); }
html.th-landing .cnt-d2-lab .iv.over{ color:#D93025; }
html.th-landing .cnt-d2-reg.hi{ color:#1E8E3E; }
html.th-landing .cnt-d2-reg.mid{ color:#B45309; }
html.th-landing .cnt-d2-reg.irr{ background:#FFFFFF; }

/* WhatsApp thread + tones */
html.th-landing .cnt-d2-wa-open{ color:#1E8E3E; }
html.th-landing .cnt-d2-wmsg{ color:#171130; }
html.th-landing .cnt-d2-wmsg.in{ background:#FFFFFF; }
html.th-landing .cnt-d2-tone{ background:#FFFFFF; border-color:rgba(23,17,48,.12); }
html.th-landing .cnt-d2-tone.on{ color:var(--accent,#7C5CFC); background:rgba(124,92,252,.14); border-color:rgba(124,92,252,.55); }

/* metrics + assiduidade + reactivate */
html.th-landing .cnt-d2-metric .v{ color:#171130; }
html.th-landing .cnt-d2-metric .v.accent{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-atile.ok .n{ color:#1E8E3E; }
html.th-landing .cnt-d2-atile.warn .n{ color:#B45309; }
html.th-landing .cnt-d2-atile .al{ color:#171130; }
html.th-landing .cnt-d2-react .tx b{ color:#171130; }
html.th-landing .cnt-d2-react .pill{ color:#1E8E3E; }

/* ai-bg, textareas, prefs, srows */
html.th-landing .cnt-d2-aibg .h{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-aibg p b{ color:#171130; }
html.th-landing .cnt-d2-ta{ background:#FFFFFF; color:#171130; }
html.th-landing .cnt-d2-pref{ background:rgba(23,17,48,.04); }
html.th-landing .cnt-d2-pref .pv{ color:#171130; }
html.th-landing .cnt-d2-srow{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .cnt-d2-srow .sl{ color:#171130; }
html.th-landing .cnt-d2-srow input[type=date],
html.th-landing .cnt-d2-srow select{ background-color:rgba(23,17,48,.05); color:#171130; }

/* history + danger */
html.th-landing .cnt-d2-hitem{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .cnt-d2-hdate .dd{ color:#171130; }
html.th-landing .cnt-d2-hbody .svc{ color:#171130; }
html.th-landing .cnt-d2-hright .pr{ color:#171130; }
html.th-landing .cnt-d2-stb.ok{ color:#1E8E3E; }
html.th-landing .cnt-d2-stb.cx{ color:#D93025; }
html.th-landing .cnt-d2-stb.ns{ color:#B45309; }
html.th-landing .cnt-d2-more{ color:var(--accent,#7C5CFC); }
html.th-landing .cnt-d2-drow .dl .t{ color:#171130; }

/* ── d3-booking.js ── */
html.th-landing .bk-ic{ background:#FFFFFF; }
html.th-landing .bk-dot.off{ background:rgba(23,17,48,.25); }
html.th-landing .bk-link-url{ color:#171130; }
html.th-landing .bk-link-copy{ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:#171130; }
html.th-landing .bk-btn.ghost{ color:#171130; }
html.th-landing .bk-txt:active{ background:#FFFFFF; }
html.th-landing .bk-logo-btn{ color:var(--accent,#7C5CFC); }
html.th-landing .bk-trow{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .bk-foot button:active{ background:#FFFFFF; }
html.th-landing .bk-langic{ background:#FFFFFF; }
html.th-landing .bk-langsel{ color:#171130; }
html.th-landing .bk-logoprev{ background:#FFFFFF; }
html.th-landing .bk-qrbox{ box-shadow:0 8px 24px rgba(109,40,217,.12); }

/* ── d3-notificacoes.js ── */
html.th-landing .ntf-sub{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .ntf-state.on{ color:#1E8E3E; }

/* ── d3-newapt.js — bottom-sheet «Nova marcação»
   NOTE: d3-newapt.js:114 carries a prod comment "sheets escuras mantêm-se
   dark sheets are to be kept on the light theme. ── */
html.th-landing .na-sheet{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 -8px 24px rgba(109,40,217,.07); }
html.th-landing .na-handle{ background:rgba(23,17,48,.18); }
html.th-landing .na-title{ color:#171130; }
html.th-landing .na-sheet input,
html.th-landing .na-sheet textarea,
html.th-landing .na-sheet select{ background:#FFFFFF; border-color:rgba(23,17,48,.12); color:#171130; }
html.th-landing .na-clear{ background:rgba(23,17,48,.08); color:rgba(23,17,48,.60); }
html.th-landing .na-sug{ background:rgba(23,17,48,.04); border-color:rgba(23,17,48,.12); }
html.th-landing .na-sug-row{ border-bottom-color:rgba(23,17,48,.07); }
html.th-landing .na-sug-row:active{ background:rgba(23,17,48,.06); }
@supports not (background:color-mix(in srgb,red 10%,blue)){
  html.th-landing .na-sug-av{ background:rgba(23,17,48,.08); }
}
html.th-landing .na-sug-nm{ color:#171130; }
html.th-landing .na-sug-mt{ color:rgba(23,17,48,.45); }
html.th-landing .na-sug-new{ color:rgba(23,17,48,.60); }
html.th-landing .na-chip{ border-color:rgba(23,17,48,.12); background:#FFFFFF; color:#171130; }
html.th-landing .na-chip.sel{ background:var(--accent,#7C5CFC); border-color:var(--accent,#7C5CFC); color:#fff; }
html.th-landing .na-slots .sg-gh{ color:rgba(23,17,48,.45); }
html.th-landing .na-slots .sg-chip{ border-color:rgba(23,17,48,.12); background:#FFFFFF; color:#171130; }
html.th-landing .na-slots .sg-chip.sel{ background:var(--accent,#7C5CFC); border-color:var(--accent,#7C5CFC); color:#fff; }
html.th-landing .na-slots-msg{ color:rgba(23,17,48,.60); }

/* ── d3-slotgrid.js — grelha M/T/N no popup rápido ── */
html.th-landing .sg-chip{ border-color:rgba(23,17,48,.12); background:#FFFFFF; color:#171130; }
html.th-landing .sg-chip.sel{ background:var(--accent,#7C5CFC); border-color:var(--accent,#7C5CFC); color:#fff; }

/* ── d3-horarios.js ── */
html.th-landing #horarios-overlay .hor-day-row+.hor-day-row{ border-top-color:rgba(23,17,48,.08); }
html.th-landing #horarios-overlay .hor-day-name{ color:#171130; }
html.th-landing #horarios-overlay .hor-times select,
html.th-landing #horarios-overlay .hor-num-input{ color:#171130; }
html.th-landing #horarios-overlay .hor-applyall:active{ background:rgba(23,17,48,.06); }
html.th-landing #horarios-overlay .hor-num-row+.hor-num-row{ border-top-color:rgba(23,17,48,.08); }
html.th-landing #horarios-overlay .hor-num-title{ color:#171130; }

/* ── d3-equipa.js ── */
html.th-landing #equipa-edit-confirm{ color:#171130; }
html.th-landing .eq-day+.eq-day{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .eq-day-lbl{ color:#171130; }
html.th-landing .eq-day-times select{ color:#171130; }
html.th-landing .eq-active-sel{ border-color:rgba(23,17,48,.28); }
html.th-landing .eq-active-sel.eq-on{ border-color:var(--accent); } /* re-assert */
html.th-landing .eq-tag-active{ color:#1E8E3E; }
html.th-landing .eq-abs+.eq-abs{ border-top-color:rgba(23,17,48,.08); }
html.th-landing .eq-lunch-sel{ color:#171130; }
/* modal eliminar agenda */
html.th-landing .eq-modal-card{ background:#FFFFFF; border-color:rgba(23,17,48,.07); box-shadow:0 20px 60px rgba(23,17,48,.18); }
html.th-landing .eq-modal-title{ color:#171130; }
html.th-landing .eq-opt{ border-color:rgba(23,17,48,.12); background:#FFFFFF; }
html.th-landing .eq-opt:active{ background:rgba(23,17,48,.08); }
html.th-landing .eq-opt.danger{ border-color:rgba(255,69,58,.35); } /* re-assert */
html.th-landing .eq-opt.ghost{ background:transparent; border:none; } /* re-assert */
html.th-landing .eq-opt .eq-opt-t{ color:#171130; }
html.th-landing .eq-opt.danger .eq-opt-t{ color:#FF453A; } /* re-assert */
html.th-landing .eq-opt .eq-opt-warn{ color:#C2570A; }
html.th-landing .eq-aff-row{ background:rgba(23,17,48,.04); border-color:rgba(23,17,48,.08); }
html.th-landing .eq-aff-name{ color:#171130; }
html.th-landing .eq-aff-tag.moved{ color:#1E8E3E; }
html.th-landing .eq-aff-wa{ color:#1E8E3E; }

/* ── d3-lembretes.js ── */
html.th-landing .lb-info-row b{ color:#171130; }
html.th-landing .lb-msg textarea{ color:#171130; }
html.th-landing .lb-vars code{ color:var(--accent,#7C5CFC); }
html.th-landing .lb-num-row input{ color:#171130; }

/* ── d3-schedule.js ── */
html.th-landing .sch-item-msg{ color:#171130; }
html.th-landing .sch-badge.rem{ color:var(--accent,#7C5CFC); }
html.th-landing .sch-badge.rev{ color:#1E8E3E; }
html.th-landing .sch-badge.msg{ background:rgba(23,17,48,.06); }

/* ── d3-subscricao.js ── */
html.th-landing #sub-usage .sub-uval{ color:#171130; }
html.th-landing #sub-usage .sub-uval.over{ color:var(--red,#ef4444); } /* re-assert */
html.th-landing .sub-badge{ background:rgba(30,142,62,.12); color:#1E8E3E; }
html.th-landing #sub-usage .sub-ubar{ background:rgba(23,17,48,.08); }
html.th-landing .sub-hero-price{ color:#171130; }
html.th-landing .sub-hero-meta-row > span:last-child{ color:#171130; }
html.th-landing #sub-plans .sub-pname{ color:#171130; }
html.th-landing #sub-manage .sub-manage-title{ color:#171130; }
html.th-landing #sub-pop .sub-pop-card{ box-shadow:0 24px 60px rgba(23,17,48,.18); }
html.th-landing #sub-pop .sub-pop-t{ color:#171130; }
html.th-landing #sub-pop input{ color:#171130; }
html.th-landing #sub-pop .sub-pop-cancel{ background:rgba(23,17,48,.06); color:#171130; }

/* ── d3-gcal.js ── */
html.th-landing .gc-ic{ background:#FFFFFF; }
html.th-landing .gc-st-title{ color:#171130; }
html.th-landing .gc-dot.off{ background:rgba(23,17,48,.25); }
html.th-landing .gc-ev-title{ color:#171130; }

/* ── d3-moloni.js ── */
html.th-landing .mol-ic{ background:#FFFFFF; }
html.th-landing .mol-st-title{ color:#171130; }
html.th-landing .mol-dot.off{ background:rgba(23,17,48,.25); }
html.th-landing .mol-search{ color:#171130; }
html.th-landing .mol-apt-name{ color:#171130; }

/* ── d3-onboard.js — iOS header fix injeta fundo escuro opaco com !important
   (d3-onboard.js:269); !important obrigatório para o vencer ── */
html.th-landing #agenda-overlay .advanced-agenda .header-cell,
html.th-landing #agenda-overlay .advanced-agenda .corner-cell{ background:rgba(224,218,235,.97)!important; }

/* ── d3-trial-banner.js ── */
html.th-landing #d3-plan-banner .pb-title{ color:#171130; }
html.th-landing #d3-plan-banner .pb-sub{ color:rgba(23,17,48,.62); }

/* ══════════════════════════════════════════════════════════════════

   d3-contactos.js:640   .d3-row-ic inline "background:rgba(124,92,252,.18);
                         color:#c9b8ff" → color:var(--accent,#7C5CFC)
   d3-contactos.js:1111  inline "border-top:1px solid rgba(255,255,255,.05)"
   d3-contactos.js:1121  same as 1111
   d3-newapt.js:624,630,633  drag-dismiss backdrop rgba(0,0,0,…) — dim over
   d3-horarios.js:212,214  #hor-cl-from/#hor-cl-to inline "color:#fff;
                         color-scheme:dark" → color:#171130; color-scheme:light
   d3-horarios.js:316    closed-day row: inline border-top rgba(255,255,255,.06)
                         → rgba(23,17,48,.08); span "color:#fff" → #171130;
                         .hor-cl-x "color:#ff6b6b" → #D93025
   d3-equipa.js:637      #equipa-edit-sched-body inline "border-top:1px solid
   d3-subscricao.js:373  inline "color:#cdbcff" (gift label) → var(--accent)
   d3-subscricao.js:462  .sub-launch inline "color:#cdbcff" → var(--accent)
   d3-moloni.js:253      btn.style.color='#30D158' (✓ saved) → #1E8E3E
   d3-onboard.js:111     done badge inline "color:#30d158" → #1E8E3E
   d3-onboard.js:112     pending badge inline "color:#a78bfa" → var(--accent)
   d3-onboard.js:114     done chip inline "color:#30d158" → #1E8E3E
   d3-onboard.js:128     celebration backdrop rgba(0,0,0,.6) — keep
   d3-onboard.js:130     celebration card inline "background:linear-gradient(
                         box-shadow:…rgba(0,0,0,.5)" → background:#FFFFFF;
                         box-shadow:0 0 40px rgba(124,92,246,.25),
   d3-onboard.js:132     inline "color:#fff" (title) → #171130
   d3-onboard.js:133     inline "color:rgba(255,255,255,.68)" (body)
   d3-onboard.js:159     checklist group inline "box-shadow:…0 4px 18px
   ══════════════════════════════════════════════════════════════════ */
/* ====================================================================
   TEMA "DIM" (html.th-dim) — o tema ESCURO igual, mas com fundos
   CINZENTOS em vez de preto puro (texto branco e roxo mantêm-se).
   Adicionado 2026-07-23. KILL-SWITCH: remover este bloco.
   ==================================================================== */
html.th-dim{
  --bg-base:#26262F;
  --glass-bg:rgba(255,255,255,.075);
  --glass-border:rgba(255,255,255,.11);
  --field-bg:rgba(255,255,255,.06);
  --field-border:rgba(255,255,255,.14);
  color-scheme:dark; background:#26262F;
}
html.th-dim body{ background:#26262F; }
/* base sólida escura dos overlays (o tema animado pinta #08080c com !important → vencemos c/ especificidade) */
html.th-dim body.theme-animated .overlay{ background:#26262F !important; }
html.th-dim .overlay{ background:#26262F; }
html.th-dim .d1-bg, html.th-dim .d1-bg-ov{ background:#26262F !important; }
/* agenda: overlay + container acompanham o cinza; a grelha é transparente por cima */
html.th-dim #agenda-overlay{ background:#26262F; }
html.th-dim #agenda-overlay .advanced-agenda{ background:#26262F !important; }
/* dock um tom acima do fundo */
html.th-dim .d2dock{ background:rgba(46,46,58,.82) !important; }
/* remapear os pretos/quase-pretos sólidos mais comuns → cinza coerente */
html.th-dim :is(.overlay,.overlay-body,.overlay-nav){ background-color:transparent; }
html.th-dim .card, html.th-dim .d3-group, html.th-dim .glass{ background:rgba(255,255,255,.055); }
/* Pulso (dim): cartões com fundo escuro fixo → cinza coerente */
html.th-dim :is(.pls-radar-card,.pls-anmini,.pls-exp,.pls-xf,.pls-anp-menu,.pls-hlp-card,.pls-ask-pop,.pls-install){ background:#33333F !important; }
html.th-dim .pls-sheet-card{ background:#2C2C36 !important; }
html.th-dim :is(.pls-stat,.pls-card,.pls-an-card,.pls-goal,.pls-hl,.pls-ndcard){ background:rgba(255,255,255,.075) !important; }
/* ── [dim] TODAS as linhas brancas: bordas de cartões + divisórias + grelha da agenda + HEADER + DOCK ── */
html.th-dim{ --glass-border:rgba(255,255,255,.9); --field-border:rgba(255,255,255,.9); }
html.th-dim :is(.card,.d3-group,.glass,.files-list .d3-group,.veh-modal,.pls-stat,.pls-card,.pls-an-card,.pls-radar-card,.pls-goal,.pls-hl,.pls-ndcard){ border-color:rgba(255,255,255,.9) !important; }
html.th-dim :is(.d3-row+.d3-row,.d3-trow+.d3-trow){ border-top-color:rgba(255,255,255,.9) !important; }
/* linhas horizontais do HEADER (.overlay-nav) e da DOCK (.d2dock) → brancas (antes: accent roxo) */
html.th-dim .overlay-nav{ border-bottom-color:rgba(255,255,255,.9) !important; }
html.th-dim .d2dock{ border-top-color:rgba(255,255,255,.9) !important; }
/* GRELHA DA AGENDA VIVA (.advanced-agenda): linhas das colunas (var --line-color) + linhas horizontais das horas → brancas */
html.th-dim .advanced-agenda{ --line-color:rgba(255,255,255,.85); }
html.th-dim .advanced-agenda .grid-column{ background-image:
  linear-gradient(to bottom,transparent 16.17%,rgba(255,255,255,.34) 16.67%,transparent 17.17%),
  linear-gradient(to bottom,transparent 32.83%,rgba(255,255,255,.34) 33.33%,transparent 33.83%),
  linear-gradient(to bottom,transparent 49%,rgba(255,255,255,.85) 50%,transparent 51%),
  linear-gradient(to bottom,transparent 66.17%,rgba(255,255,255,.34) 66.67%,transparent 67.17%),
  linear-gradient(to bottom,transparent 82.83%,rgba(255,255,255,.34) 83.33%,transparent 83.83%) !important; }
/* ── [landing] CHAT da app (d3-aichat) adaptado ao tema CLARO: fade do topo, caixa de texto e
   cartões das mensagens da IA (antes: escuros/texto branco → ilegíveis no fundo lavanda). ── */
html.th-landing #aichat-overlay .aic-topfade{ background:linear-gradient(to bottom,#EFEAF9 0%,rgba(239,234,249,.96) 52%,rgba(239,234,249,.58) 78%,rgba(239,234,249,0) 100%) !important; }
html.th-landing #aichat-overlay .aic-field{ background:rgba(255,255,255,.94) !important; border-color:rgba(23,17,48,.14) !important; box-shadow:0 6px 20px rgba(23,17,48,.12) !important; }
html.th-landing #aichat-overlay .aic-ta{ color:#171130 !important; }
html.th-landing #aichat-overlay .aic-ta::placeholder{ color:rgba(23,17,48,.4) !important; }
html.th-landing #aichat-overlay .aic-ai{ background:rgba(255,255,255,.9) !important; border-color:rgba(23,17,48,.1) !important; color:#171130 !important; }
html.th-landing #aichat-overlay .aic-user{ background:rgba(109,40,217,.16) !important; border-color:rgba(109,40,217,.32) !important; color:#241a4a !important; }
html.th-landing #aichat-overlay .aic-status{ background:rgba(255,255,255,.72) !important; border-color:rgba(23,17,48,.1) !important; color:rgba(23,17,48,.6) !important; }
/* botão de enviar = fundo/bordas da bolha do utilizador (ícone segue a cor → escuro no claro) */
html.th-landing #aichat-overlay .aic-send{ background:rgba(109,40,217,.16) !important; border-color:rgba(109,40,217,.32) !important; color:#241a4a !important; }
/* [24/7] dica "Desliza para falar comigo" — texto PRETO no tema claro (era roxo claro, ilegível) */
html.th-landing #aic-swipehint .aic-hint-card{ color:#171130 !important; }
/* [24/7] estado VAZIO do chat do assistente — texto preto no tema claro (era branco ténue) */
html.th-landing #aichat-overlay .aic-empty{ color:#171130 !important; }
/* ── [landing] MESMO design no CHAT DE PROGRAMAÇÃO (d3-devchat) — copiado do assistente (botão enviar
   fica VERMELHO, identidade do dev chat). Só adiciona; não altera o resto. ── */
html.th-landing #devchat-overlay .dvc-topfade{ background:linear-gradient(to bottom,#EFEAF9 0%,rgba(239,234,249,.96) 52%,rgba(239,234,249,.58) 78%,rgba(239,234,249,0) 100%) !important; }
html.th-landing #devchat-overlay .dvc-field{ background:rgba(255,255,255,.94) !important; border-color:rgba(23,17,48,.14) !important; box-shadow:0 6px 20px rgba(23,17,48,.12) !important; }
html.th-landing #devchat-overlay .dvc-ta{ color:#171130 !important; }
html.th-landing #devchat-overlay .dvc-ta::placeholder{ color:rgba(23,17,48,.4) !important; }
html.th-landing #devchat-overlay .dvc-ai{ background:rgba(255,255,255,.9) !important; border-color:rgba(23,17,48,.1) !important; color:#171130 !important; }
html.th-landing #devchat-overlay .dvc-user{ background:rgba(109,40,217,.16) !important; border-color:rgba(109,40,217,.32) !important; color:#241a4a !important; }
html.th-landing #devchat-overlay .dvc-status{ background:rgba(255,255,255,.72) !important; border-color:rgba(23,17,48,.1) !important; color:rgba(23,17,48,.6) !important; }
/* ── [landing] Contactos: chips de filtro + cartão "Para fazer hoje" com fundo BRANCO (texto escuro) ── */
html.th-landing .cnt-chip{ background:rgba(255,255,255,.94) !important; border-color:rgba(23,17,48,.12) !important; }
html.th-landing .cnt-chip .cl{ color:#171130 !important; }
html.th-landing .cnt-chip.on{ background:#f5f2ff !important; border-color:rgba(109,40,217,.5) !important; }
html.th-landing .cnt-chip.on .cl{ color:#4c1d95 !important; }
html.th-landing .cnt-today{ background:#fff !important; border-color:rgba(23,17,48,.1) !important; }
html.th-landing .cnt-today-r .tt{ color:#171130 !important; }
/* [FIX 2026-07-23] o <html> tem background:#000 INLINE (estático no index) que vence os temas
   sem !important → fundo PRETO nas Definições/chat (overlays transparentes). Forçar a cor certa. */
html.th-landing{ background:#EFEAF9 !important; }
html.th-landing body{ background:#EFEAF9 !important; }
html.th-dim{ background:#26262F !important; }
html.th-dim body{ background:#26262F !important; }
/* [FIX 2026-07-23] #dvc-fogwall (névoa de fundo do chat de programação, #08080c, ecrã inteiro,
   sempre presente) não seguia os temas → camada escura por cima no claro/dim. Colorir p/ o tema. */
html.th-landing #dvc-fogwall{ background:#EFEAF9 !important; }
html.th-dim #dvc-fogwall{ background:#26262F !important; }

/* ── [landing] PAINEL CONFIG do chat de programação (#devcfg-overlay) ── */
html.th-landing #devcfg-overlay .dvg-top{ background:rgba(255,255,255,.72) !important; color:#171130 !important; }
html.th-landing #devcfg-overlay .dvg-card{ background:rgba(255,255,255,.8) !important; border-color:rgba(23,17,48,.1) !important; }
html.th-landing #devcfg-overlay .dvg-h{ color:rgba(23,17,48,.5) !important; }
html.th-landing #devcfg-overlay .dvg-segb{ background:#FFFFFF !important; border-color:rgba(23,17,48,.14) !important; color:rgba(23,17,48,.6) !important; }
html.th-landing #devcfg-overlay .dvg-segb.sel{ background:rgba(124,92,252,.18) !important; border-color:var(--accent,#7C5CFC) !important; color:#4c1d95 !important; }
html.th-landing #devcfg-overlay .dvg-opt{ color:#171130 !important; border-bottom-color:rgba(23,17,48,.08) !important; }
html.th-landing #devcfg-overlay .dvg-opt .sub{ color:rgba(23,17,48,.5) !important; }
html.th-landing #devcfg-overlay .dvg-sw{ background:rgba(23,17,48,.12) !important; }
html.th-landing #devcfg-overlay .dvg-sw.on{ background:var(--accent,#7C5CFC) !important; }
html.th-landing #devcfg-overlay .dvg-undo{ background:rgba(124,92,252,.12) !important; color:#4c1d95 !important; border-color:rgba(124,92,252,.35) !important; }
html.th-landing #devcfg-overlay .dvg-vt .t1{ color:#171130 !important; }
html.th-landing #devcfg-overlay .dvg-vt .t2{ color:rgba(23,17,48,.45) !important; }
html.th-landing #devcfg-overlay .dvg-v{ border-bottom-color:rgba(23,17,48,.08) !important; }
html.th-landing #devcfg-overlay .dvg-note{ color:rgba(23,17,48,.45) !important; }
html.th-landing #devcfg-overlay .dvg-go{ color:#4c1d95 !important; border-color:rgba(124,92,252,.4) !important; background:rgba(124,92,252,.08) !important; }
/* folha de confirmação */
html.th-landing #dvg-sheet .sh{ background:rgba(255,255,255,.97) !important; border-color:rgba(23,17,48,.12) !important; }
html.th-landing #dvg-sheet .sh .q{ color:#171130 !important; }
html.th-landing #dvg-sheet .sh .e{ color:rgba(23,17,48,.6) !important; }
html.th-landing #dvg-sheet .sh button{ background:rgba(23,17,48,.06) !important; border-color:rgba(23,17,48,.14) !important; color:#171130 !important; }
html.th-landing #dvg-sheet .sh button.ok{ background:var(--accent,#7C5CFC) !important; border-color:var(--accent,#7C5CFC) !important; color:#fff !important; }

/* ── [landing] PAINEL CONTEXTO do chat de programação (#devctx-overlay) ── */
html.th-landing #devctx-overlay .dvg-top{ background:rgba(255,255,255,.72) !important; color:#171130 !important; }
html.th-landing #devctx-overlay select{ background:#FFFFFF !important; border-color:rgba(23,17,48,.14) !important; color:#171130 !important; }
html.th-landing #devctx-overlay textarea{ background:rgba(23,17,48,.04) !important; border-color:rgba(23,17,48,.14) !important; color:#171130 !important; }

/* ── [landing] checklist + estado vazio do chat de programação ── */
html.th-landing #devchat-overlay .dvc-todos{ background:rgba(255,255,255,.85) !important; border-color:rgba(23,17,48,.12) !important; }
html.th-landing #devchat-overlay .dvc-todo{ color:rgba(23,17,48,.72) !important; }
html.th-landing #devchat-overlay .dvc-todo.now{ color:#171130 !important; }
html.th-landing #devchat-overlay .dvc-todo.done{ color:rgba(23,17,48,.55) !important; }
html.th-landing #devchat-overlay .dvc-box{ border-color:rgba(23,17,48,.35) !important; }
html.th-landing #devchat-overlay .dvc-todo.done .dvc-box{ background:var(--accent,#7C5CFC) !important; border-color:var(--accent,#7C5CFC) !important; }
html.th-landing #devchat-overlay .dvc-empty{ color:rgba(23,17,48,.5) !important; }

/* ── [landing] SECÇÃO FICHEIROS (#files-overlay, .fdet) ── */
html.th-landing .files-intro{ background:rgba(255,255,255,.8) !important; border-color:rgba(23,17,48,.1) !important; }
html.th-landing .files-intro-t{ color:#171130 !important; }
html.th-landing .files-intro-b{ color:rgba(23,17,48,.65) !important; }
html.th-landing .files-tabs{ background:#FFFFFF !important; border-color:rgba(23,17,48,.1) !important; }
html.th-landing .files-tab.on{ background:rgba(124,92,252,.22) !important; color:#4c1d95 !important; }
html.th-landing .files-drop b{ color:#171130 !important; }
html.th-landing .files-drop span{ color:rgba(23,17,48,.45) !important; }
html.th-landing .files-empty{ color:rgba(23,17,48,.45) !important; }
html.th-landing .files-answer{ background:rgba(255,255,255,.97) !important; border-color:rgba(23,17,48,.12) !important; }
html.th-landing .files-answer .fa-q{ color:rgba(23,17,48,.55) !important; }
html.th-landing .files-toast{ background:rgba(255,255,255,.97) !important; color:#171130 !important; border-color:rgba(23,17,48,.12) !important; }
html.th-landing .files-list .d3-group{ background:rgba(255,255,255,.8) !important; border-color:rgba(23,17,48,.1) !important; }
html.th-landing .files-nm{ color:#171130 !important; }
html.th-landing .files-sub{ color:rgba(23,17,48,.45) !important; }
html.th-landing .files-tab{ color:rgba(23,17,48,.55) !important; }
html.th-landing .files-tab.on{ color:#4c1d95 !important; }
html.th-landing .files-area-sub{ color:rgba(23,17,48,.48) !important; }
html.th-landing .files-badge.off{ color:rgba(23,17,48,.5) !important; }
html.th-landing .files-sc-pill{ color:rgba(23,17,48,.7) !important; }
html.th-landing .files-sc-pill.on{ color:#fff !important; }
html.th-landing .files-empty-sm{ background:rgba(23,17,48,.04) !important; color:rgba(23,17,48,.42) !important; }
html.th-landing .files-addrow b{ color:#171130 !important; }
html.th-landing .files-del{ color:rgba(23,17,48,.55) !important; }
html.th-landing .files-store-bar{ background:rgba(23,17,48,.08) !important; }
html.th-landing .files-store-top > span:first-child{ color:rgba(23,17,48,.55) !important; }
html.th-landing .files-store-top #files-store-txt{ color:rgba(23,17,48,.75) !important; }
html.th-landing .files-name{ color:#171130 !important; }
html.th-landing .files-summary{ color:rgba(23,17,48,.55) !important; }
html.th-landing .files-summary.pending{ color:rgba(23,17,48,.35) !important; }
/* ficha do ficheiro */
html.th-landing .fdet{ background:#EFEAF9 !important; }
html.th-landing .fdet-name{ color:#171130 !important; }
html.th-landing .fdet-ic{ color:#171130 !important; }
html.th-landing .fdet-meta{ color:rgba(23,17,48,.55) !important; }
html.th-landing .fdet-sum{ background:rgba(255,255,255,.8) !important; border-color:rgba(23,17,48,.1) !important; color:#171130 !important; }
html.th-landing .fdet-lbl{ color:rgba(23,17,48,.45) !important; }
html.th-landing .fdet-askin{ background:#FFFFFF !important; border-color:rgba(23,17,48,.14) !important; color:#171130 !important; }
html.th-landing .fdet-askin::placeholder{ color:rgba(23,17,48,.4) !important; }
html.th-landing .fdet-ans{ color:#171130 !important; }
html.th-landing .fdet-ans.load{ color:rgba(23,17,48,.5) !important; }
html.th-landing .fdet-scope{ background:rgba(255,255,255,.8) !important; border-color:rgba(23,17,48,.12) !important; color:rgba(23,17,48,.7) !important; }
