/* CRM Encantare - tema "Vidro" (grafite + vidro fosco, estilo Apple). Injetado pelo Nginx; nao altera o codigo do Twenty.
   Camada 1 (estavel): variaveis --t-* do Twenty. Camada 2: classes geradas pelo build v2.50.0 (revisar ao atualizar o Twenty). */

/* ---------- Camada 1: variaveis do tema claro ---------- */
html.light {
  --t-font-family: 'Inter', -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif !important;

  --t-background-primary: #ffffff !important;
  --t-background-secondary: #f8f9fb !important;
  --t-background-tertiary: #eceef2 !important;
  --t-background-quaternary: #e3e6eb !important;

  --t-border-color-light: #0f172a0d !important;
  --t-border-color-medium: #0f172a14 !important;
  --t-border-color-strong: #0f172a24 !important;

  --t-font-color-primary: #0f1115 !important;
  --t-font-color-secondary: #565d6b !important;
  --t-font-color-tertiary: #8b92a0 !important;
  --t-font-color-light: #a9afba !important;

  --t-border-radius-sm: 8px !important;
  --t-border-radius-md: 12px !important;
  --t-border-radius-sm-round: 8px !important;
  --t-border-radius-md-round: 12px !important;
  --t-border-radius-lg: 20px !important;
  --t-border-radius-xl: 28px !important;

  --t-box-shadow-light: 0 1px 2px #10121605, 0 6px 20px #1012160d !important;
  --t-box-shadow-strong: 0 12px 40px #1012161f, 0 2px 8px #1012160f !important;

  /* acento: grafite (em vez do azul padrao) */
  --t-accent-accent1: #fbfbfc !important; --t-accent-accent2: #f5f6f8 !important; --t-accent-accent3: #eceef1 !important;
  --t-accent-accent4: #e3e6ea !important; --t-accent-accent5: #d9dde2 !important; --t-accent-accent6: #cdd2d8 !important;
  --t-accent-accent7: #b9bfc7 !important; --t-accent-accent8: #98a0ab !important; --t-accent-accent9: #15171c !important;
  --t-accent-accent10: #000000 !important; --t-accent-accent11: #15171c !important; --t-accent-accent12: #0b0c0f !important;
  --t-accent-primary: #e3e6ea !important; --t-accent-secondary: #e3e6ea !important;
  --t-accent-tertiary: #eceef1 !important; --t-accent-quaternary: #f5f6f8 !important;
  --t-border-color-blue: #b9bfc7 !important; --t-color-blue: #15171c !important;
}

/* ---------- fundo com manchas suaves de cor (a "profundidade" do vidro) ---------- */
html.light body, html.light #root {
  background:
    radial-gradient(820px 560px at 4% -6%, #ffffff 0%, #ffffff00 62%),
    radial-gradient(760px 520px at 100% -4%, #dff3b3b3 0%, #dff3b300 62%),
    radial-gradient(820px 600px at 88% 108%, #cfe0ffb3 0%, #cfe0ff00 62%),
    radial-gradient(640px 520px at -4% 104%, #eadcffaa 0%, #eadcff00 62%),
    #e7eaf0 !important;
  background-attachment: fixed !important;
}

/* ---------- Camada 2: paineis de vidro ---------- */
html.light .sxgdxmx { background: transparent !important; }                      /* fundo do app */

html.light .spqk3i9 {                                                              /* menu lateral */
  margin: 10px 0 10px 12px !important; width: 236px !important; padding: 0 8px !important;
  box-sizing: border-box !important; height: calc(100% - 20px) !important;
  border-radius: 26px !important; background: rgba(255,255,255,.48) !important;
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 14px 44px rgba(30,36,50,.08) !important;
}
html.light a.navigation-drawer-item { border-radius: 14px !important; width: auto !important; }
html.light a.navigation-drawer-item[aria-current="page"] { background: #15171c !important; box-shadow: 0 6px 16px rgba(21,23,28,.25) !important; }
html.light a.navigation-drawer-item[aria-current="page"] * { color: #ffffff !important; }
html.light a.navigation-drawer-item[aria-current="page"] svg { color: #ffffff !important; stroke: #ffffff !important; }

html.light .s9iz60d {                                                              /* painel principal */
  margin: 10px 12px 10px 4px !important; height: calc(100% - 20px) !important;
  border-radius: 26px !important; overflow: hidden !important;
  background: rgba(255,255,255,.74) !important;
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 60px rgba(30,36,50,.10), 0 2px 8px rgba(30,36,50,.05) !important;
}
html.light .skbu4f7 { background: transparent !important; border-bottom: 1px solid rgba(15,23,42,.06) !important; }  /* cabecalho */

html.light aside.s1kdkk32 {                                                        /* painel lateral do registro */
  background: rgba(255,255,255,.82) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border-radius: 26px !important; margin: 10px 12px 10px 0 !important; height: calc(100% - 20px) !important;
  border: 1px solid rgba(255,255,255,.9) !important; box-shadow: 0 18px 60px rgba(30,36,50,.16) !important;
}

/* botoes em pilula */
html.light button { border-radius: 999px !important; }

/* detalhes */
*::-webkit-scrollbar-thumb { background: #0f172a22 !important; border-radius: 8px !important; }
::selection { background: #dff3b3; color: #0f1115; }

/* ---------- cartoes do painel (indicadores e graficos) ---------- */
html.light .widget {
  background: #ffffff !important; border: 1px solid rgba(15,23,42,.05) !important; border-radius: 24px !important;
  box-shadow: 0 1px 2px rgba(16,18,22,.03), 0 10px 30px rgba(16,18,22,.06) !important;
}
html.light .widget-card-header { padding-top: 4px !important; }
html.light .widget-card-header * { color: #565d6b !important; font-weight: 500 !important; }
html.light .widget h2 { font-size: clamp(20px, 2vw, 32px) !important; white-space: nowrap !important; font-weight: 300 !important; letter-spacing: -0.03em !important; color: #0f1115 !important; line-height: 1.05 !important; }

/* menu: pilula do item ativo ocupa a largura toda */
html.light a.navigation-drawer-item { display: flex !important; width: 100% !important; box-sizing: border-box !important; }

/* ---------- graficos: linha grafite (SVG), textos discretos. As barras sao canvas: cor definida no widget (lime) ---------- */
html.light .widget svg path[fill="none"] { stroke: #15171c !important; stroke-width: 2.5px !important; stroke-linecap: round !important; }
html.light .widget svg circle { fill: #15171c !important; stroke: #ffffff !important; stroke-width: 2px !important; }
html.light .widget svg text { fill: #8b92a0 !important; font-size: 11px !important; }
html.light .widget canvas { filter: saturate(1.2) brightness(1.3) hue-rotate(-2deg) !important; }   /* barras: verde-oliva -> limao suave */

/* =====================================================================
   MODO ESCURO - "Vidro escuro" (grafite quase preto + limao). Mesmo molde do claro.
   ===================================================================== */
html.dark {
  --t-font-family: 'Inter', -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif !important;

  --t-background-primary: #15181d !important;
  --t-background-secondary: #181b21 !important;
  --t-background-tertiary: #1e222a !important;
  --t-background-quaternary: #262b35 !important;
  --t-background-transparent-light: #ffffff0d !important;
  --t-background-transparent-medium: #ffffff17 !important;
  --t-background-transparent-strong: #ffffff26 !important;

  --t-border-color-light: #ffffff0f !important;
  --t-border-color-medium: #ffffff17 !important;
  --t-border-color-strong: #ffffff2b !important;

  --t-font-color-primary: #f1f3f6 !important;
  --t-font-color-secondary: #aab0bc !important;
  --t-font-color-tertiary: #7b8290 !important;
  --t-font-color-light: #5f6673 !important;
  --t-font-color-on-accent: #0b0d11 !important;

  --t-border-radius-sm: 8px !important;
  --t-border-radius-md: 12px !important;
  --t-border-radius-sm-round: 8px !important;
  --t-border-radius-md-round: 12px !important;
  --t-border-radius-lg: 20px !important;
  --t-border-radius-xl: 28px !important;

  --t-box-shadow-light: 0 1px 2px #00000040, 0 6px 20px #00000059 !important;
  --t-box-shadow-strong: 0 12px 40px #0000008c, 0 2px 8px #00000059 !important;

  /* acento: limao */
  --t-accent-accent1: #11130d !important; --t-accent-accent2: #161910 !important; --t-accent-accent3: #1e2314 !important;
  --t-accent-accent4: #272e19 !important; --t-accent-accent5: #323b1f !important; --t-accent-accent6: #3f4b26 !important;
  --t-accent-accent7: #52622d !important; --t-accent-accent8: #6f8535 !important; --t-accent-accent9: #c3f04a !important;
  --t-accent-accent10: #d4f56e !important; --t-accent-accent11: #c3f04a !important; --t-accent-accent12: #ecffb5 !important;
  --t-accent-primary: #323b1f !important; --t-accent-secondary: #323b1f !important;
  --t-accent-tertiary: #1e2314 !important; --t-accent-quaternary: #161910 !important;
  --t-border-color-blue: #52622d !important; --t-color-blue: #c3f04a !important;
}

html.dark body, html.dark #root {
  background:
    radial-gradient(900px 600px at 4% -8%, #1f2535 0%, #1f253500 62%),
    radial-gradient(800px 560px at 100% -6%, #3b4c15aa 0%, #3b4c1500 60%),
    radial-gradient(900px 640px at 90% 110%, #14224acc 0%, #14224a00 62%),
    radial-gradient(700px 560px at -6% 106%, #2d1850aa 0%, #2d185000 62%),
    #090b0f !important;
  background-attachment: fixed !important;
}

html.dark .sxgdxmx { background: transparent !important; }

html.dark .spqk3i9 {
  margin: 10px 0 10px 12px !important; width: 236px !important; padding: 0 8px !important;
  box-sizing: border-box !important; height: calc(100% - 20px) !important;
  border-radius: 26px !important; background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 18px 50px rgba(0,0,0,.35) !important;
}
html.dark a.navigation-drawer-item { border-radius: 14px !important; display: flex !important; width: 100% !important; box-sizing: border-box !important; }
html.dark a.navigation-drawer-item[aria-current="page"] { background: #c3f04a !important; box-shadow: 0 6px 18px rgba(195,240,74,.25) !important; }
html.dark a.navigation-drawer-item[aria-current="page"] * { color: #0b0d11 !important; }
html.dark a.navigation-drawer-item[aria-current="page"] svg { color: #0b0d11 !important; stroke: #0b0d11 !important; }

html.dark .s9iz60d {
  margin: 10px 12px 10px 4px !important; height: calc(100% - 20px) !important;
  border-radius: 26px !important; overflow: hidden !important;
  background: rgba(21,24,29,.80) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 22px 70px rgba(0,0,0,.45) !important;
}
html.dark .skbu4f7 { background: transparent !important; border-bottom: 1px solid rgba(255,255,255,.07) !important; }

html.dark aside.s1kdkk32 {
  background: rgba(24,27,33,.90) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border-radius: 26px !important; margin: 10px 12px 10px 0 !important; height: calc(100% - 20px) !important;
  border: 1px solid rgba(255,255,255,.12) !important; box-shadow: 0 22px 70px rgba(0,0,0,.55) !important;
}

html.dark button { border-radius: 999px !important; }

/* cartoes e graficos do painel */
html.dark .widget {
  background: #181b21 !important; border: 1px solid rgba(255,255,255,.08) !important; border-radius: 24px !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 34px rgba(0,0,0,.35) !important;
}
html.dark .widget-card-header { padding-top: 4px !important; }
html.dark .widget-card-header * { color: #aab0bc !important; font-weight: 500 !important; }
html.dark .widget h2 { font-size: clamp(20px, 2vw, 32px) !important; white-space: nowrap !important; font-weight: 300 !important; letter-spacing: -0.03em !important; color: #f1f3f6 !important; line-height: 1.05 !important; }
html.dark .widget svg path[fill="none"] { stroke: #c3f04a !important; stroke-width: 2.5px !important; stroke-linecap: round !important; }
html.dark .widget svg circle { fill: #c3f04a !important; stroke: #15181d !important; stroke-width: 2px !important; }
html.dark .widget svg text { fill: #7b8290 !important; font-size: 11px !important; }
html.dark .widget svg line { stroke: #ffffff10 !important; }
html.dark .widget canvas { filter: saturate(1.15) brightness(1.15) !important; }

html.dark *::-webkit-scrollbar-thumb { background: #ffffff26 !important; border-radius: 8px !important; }
html.dark ::selection { background: #c3f04a; color: #0b0d11; }

/* escuro: texto escuro sobre botoes de acento (limao) */
html.dark button[data-variant="solid"][data-color="accent"],
html.dark button[data-variant="solid"][data-color="accent"] * { color: #0b0d11 !important; }
html.dark button[data-variant="solid"][data-color="accent"] svg { stroke: #0b0d11 !important; }
