/* =====================================================================
   DOVYR UI 4.0 — FUNDAÇÃO
   Fontes empacotadas, tokens do Design System e base global.
   Carregado DEPOIS de todos os estilos legados. Não altera dados.
   Tokens: mesmos nomes do Design System DOVYR (tokens.json).
   ===================================================================== */

/* Inter 4.0 e Inter Display 4.0 — SIL Open Font License 1.1 (fonts/OFL.txt).
   A família "Inter" aqui sobrepõe uma Inter instalada no sistema, para que
   o app tenha a mesma tipografia em qualquer Mac. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 100 449; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 450 549; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff") format("woff"); font-weight: 550 649; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff") format("woff"); font-weight: 650 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Medium.woff") format("woff"); font-weight: 100 549; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 550 649; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Bold.woff") format("woff"); font-weight: 650 1000; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* superfícies */
  --ink: #050608;
  --canvas: #080a0c;
  --shell: #0c1012;
  --raised: #111316;
  --raised-2: #15191b;
  --field: #13191b;
  --panel: rgba(8, 12, 15, .84);
  --panel2: rgba(10, 15, 19, .94);

  /* linhas */
  --hairline: rgba(255, 255, 255, .06);
  --line2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .24);

  /* texto */
  --bone: #f2f0e9;
  --steel: #9da3aa;
  --bone-dim: rgba(242, 240, 233, .62);
  --label: #7d858b;
  --faint: rgba(242, 240, 233, .34);

  /* sinal */
  --acid: #d8ff3e;
  --on-acid: #050608;
  --acid-wash: rgba(216, 255, 62, .07);
  --acid-wash-2: rgba(216, 255, 62, .12);
  --acid-line: rgba(216, 255, 62, .28);
  --gain: #68df84;
  --gain-wash: rgba(104, 223, 132, .08);
  --gain-line: rgba(104, 223, 132, .32);
  --loss: #ff626e;
  --loss-wash: rgba(255, 98, 110, .08);
  --loss-line: rgba(255, 98, 110, .32);
  --caution: #f1c66b;
  --caution-wash: #222016;
  --caution-line: #755f24;
  --neural-dim: #acda2e;
  --neural-hot: #f2ffbe;

  /* tipografia */
  --font-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "Inter Display", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;

  /* espaço e forma */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-xs: 6px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-xl: 22px; --radius-pill: 999px;
  --shadow-float: 0 24px 70px rgba(0, 0, 0, .44);
  --shadow-composer: 0 18px 50px rgba(0, 0, 0, .38);

  /* movimento */
  --motion-fast: 140ms; --motion-base: 240ms; --motion-slow: 420ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* moldura do app */
  --dvx-sidebar: 236px;
  --dvx-gutter: 32px;
  --dvx-top: 28px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: rgba(242, 240, 233, .16) transparent;
}
html, body { background: var(--ink); }

::selection { background: rgba(216, 255, 62, .26); color: #fff; }

/* Foco visível único (teclado) em todo o app. */
#app :is(button, a, [role="button"], summary, [tabindex]:not([tabindex="-1"])):focus-visible,
body > :is(.dovyr-profile-menu, .dovyr-mp-modal) :is(button, a):focus-visible {
  outline: 2px solid var(--acid) !important;
  outline-offset: 2px !important;
}

/* Números comparáveis sempre tabulares. */
.dv-num, #app :is(.dx3-primary-amount, .dx3-metrics strong, .pl2-kpi strong, .ops2-date-amount, .ops2-overview strong, .pm2-kpi strong) {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  #app *, #app *::before, #app *::after { scroll-behavior: auto !important; }
}
