/* Neevax — troca a cor de marca do Chatwoot (azul #2781F6) pelo roxo #924FDA.
 *
 * O Chatwoot deriva TODA a cor de marca de uma escala `--blue-1..12`
 * (estilo Radix). `bg-n-brand`, `text-link` etc. resolvem pra `--blue-9`.
 * Redefinindo a escala, todo o azul do site (botoes, links, estados ativos,
 * badges, bordas) vira roxo de uma vez.
 *
 * `!important` em cada variavel = blindagem: garante que o roxo vence a cascata
 * independente da ordem de carregamento ou de updates futuros do Chatwoot.
 * Vive em arquivo montado por volume => nunca some ao reiniciar o container,
 * e nao toca em nada do banco (zero gatilho de feature paga). */

:root,
.light {
  --blue-1: 253 252 254 !important;
  --blue-2: 250 245 254 !important;
  --blue-3: 244 235 253 !important;
  --blue-4: 237 224 251 !important;
  --blue-5: 228 211 248 !important;
  --blue-6: 216 194 242 !important;
  --blue-7: 200 170 233 !important;
  --blue-8: 177 136 223 !important;
  --blue-9: 146 79 218 !important;   /* #924FDA — marca Neevax */
  --blue-10: 131 62 199 !important;  /* hover */
  --blue-11: 117 50 180 !important;  /* texto/links (contraste em fundo claro) */
  --blue-12: 51 24 92 !important;

  --solid-blue: 230 218 250 !important;
  --solid-blue-2: 252 250 254 !important;
  --text-blue: 40 18 70 !important;
  --border-blue: 146, 79, 218, .5 !important;
  --border-blue-strong: 70 33 130 !important;
}

/* No tema escuro mexe so nos tons saturados (acentos), preservando os
 * fundos escuros dos tints baixos pra nao "clarear" o layout. */
.dark {
  --blue-8: 177 136 223 !important;
  --blue-9: 146 79 218 !important;
  --blue-10: 131 62 199 !important;
  --blue-11: 167 122 232 !important;  /* link mais claro p/ contraste no escuro */
  --solid-blue: 60 40 110 !important;
  --border-blue: 146, 79, 218, .5 !important;
  --border-blue-strong: 120 80 200 !important;
}

/* anel de foco azul -> roxo */
:root {
  --tw-ring-color: rgb(146 79 218 / .5) !important;
}

/* Esconde a tela de onboarding/boas-vindas ("Boa tarde, <user>. Bem-vindo..."
 * com os cards Omnichannel / Teams / Canned responses / Labels).
 * E o OnboardingView.vue do Chatwoot. O container raiz nao tem id/classe
 * propria, entao ancoramos na combinacao unica de utilitarios Tailwind dele
 * (min-h-screen + grid-cols-2 + grid-rows arbitrario). So essa tela usa esse
 * trio junto => zero falso-positivo no resto do dashboard. */
div[class*="grid-rows-[auto_1fr_1fr]"][class*="grid-cols-2"][class*="min-h-screen"] {
  display: none !important;
}

/* ============ Neevax — REDESIGN da tela de login (split + pulso) ============
 * Cópia fiel do login do ClinicOS: divisão 1.12fr/1fr, painel de marca à
 * esquerda e form claro (flat, sem card) à direita. */
/* split ocupa a viewport inteira (position:fixed inset:0) igual ao ClinicOS.
 * Sem isso, o painel roxo estica junto com o form branco (mais alto), o que
 * empurra a animacao ECG pra baixo e desalinha o bloco de texto. */
.nvx-login .nvx-split {
  position: fixed !important; inset: 0 !important; z-index: 50 !important;
  height: 100vh !important;
  display: grid !important; grid-template-columns: 1.12fr 1fr !important;
}
.nvx-login #nvx-brand { height: 100vh !important; }
.nvx-login main {
  background: #fcfbf9 !important; height: 100vh !important; overflow-y: auto !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 40px !important;
}
/* esconde o header de logos do Chatwoot no painel branco (o ClinicOS não tem) */
.nvx-login main > section.max-w-5xl { display: none !important; }
/* tira o card (borda/sombra/fundo) => form flat como no ClinicOS */
.nvx-login main > section[class*="bg-white"] {
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
  margin: 0 auto !important; padding: 0 !important; max-width: 340px !important; width: 100% !important;
}
.nvx-welcome { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 600; font-size: 27px; letter-spacing: -.015em; color: #12222a; margin: 0; }
.nvx-welcome-sub { color: #5c6e75; font-size: 14px; margin: 7px 0 28px; }
@media (max-width: 860px) {
  .nvx-login .nvx-split { grid-template-columns: 1fr !important; grid-template-rows: minmax(280px, 40vh) 1fr; }
}

#nvx-brand {
  position: relative; overflow: hidden; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 46px 52px; color: #eef0fb; font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(1100px 420px at 12% -12%, rgba(146,79,218,0.30), transparent 62%),
    radial-gradient(900px 500px at 110% 120%, rgba(124,92,255,0.16), transparent 60%),
    linear-gradient(158deg, #2a184e 0%, #1a1030 58%, #120a24 100%);
}
#nvx-brand::before {
  content: ''; position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background-image: radial-gradient(rgba(180,160,255,0.10) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(#000, transparent 82%); mask-image: linear-gradient(#000, transparent 82%);
}
#nvx-brand > * { position: relative; z-index: 2; }
.nvx-brand-top { display: flex; align-items: center; gap: 9px; }
.nvx-brand-logo { width: 22px; height: 22px; object-fit: contain; }
.nvx-brand-name { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: #f3f8f7; }
.nvx-brand-mid { max-width: 470px; }
.nvx-vital { display: inline-flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #9a8fc9; }
.nvx-vital::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7c5cff; box-shadow: 0 0 10px #7c5cff; animation: nvxBlink 2.4s ease-in-out infinite; }
.nvx-hero { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 700; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.03; letter-spacing: -.022em; margin: 20px 0 16px; color: #f2f8f7; }
.nvx-hero em { font-style: normal; background: linear-gradient(92deg, #a06bff, #ff6fb0); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* min-height = 2 linhas: iguala a altura do bloco de texto ao do ClinicOS
 * (cujo sub quebra em 2 linhas), pra o vital/hero cairem na mesma altura */
.nvx-sub { color: #a99fce; font-size: 15px; line-height: 1.55; max-width: 400px; min-height: 47px; }
.nvx-brand-foot { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .26em; color: #6b5f92; }
/* especificidade com #nvx-brand p/ vencer `#nvx-brand > *` (senao o pulse cai no fluxo) */
#nvx-brand .nvx-pulse { position: absolute; left: 0; right: 0; bottom: 12%; height: 112px; z-index: 1; }
.nvx-pulse svg { width: 100%; height: 100%; display: block; overflow: visible; }
.nvx-ecg-b { fill: none; stroke: rgba(150,140,200,.20); stroke-width: 2; }
.nvx-ecg-l { fill: none; stroke: url(#nvxPulse); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 145 1000; stroke-dashoffset: 1145; filter: drop-shadow(0 0 7px rgba(160,107,255,.6)); animation: nvxSweep 3.4s linear infinite; }
@keyframes nvxSweep { to { stroke-dashoffset: 145; } }
@keyframes nvxBlink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .nvx-ecg-l { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: .9; } .nvx-vital::before { animation: none; } }
