/* DashAds design tokens. Source of truth: docs/diseno/sistema-de-diseno.md
   Copiar a app/.../static/css/tokens.css. Componentes usan roles, nunca hex. */

@font-face { font-family: "Fira Sans"; src: url("../fonts/FiraSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/FiraSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/FiraSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fira Code"; src: url("../fonts/FiraCode-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  color-scheme: light;
  /* superficies y texto */
  --bg: #f6f5f8;
  --surface: #fcfcfb;
  --surface-2: #f1eff4;
  --border: #e4e1ea;
  --text: #1f1d24;
  --text-2: #5b5866;
  --primary: #553886;
  --on-primary: #ffffff;
  --primary-soft: #ede7f6;
  --focus: #553886;
  /* estado (siempre con icono + texto) */
  --ok: #006300;      --ok-bg: #e6f4e6;
  --warn: #8a5a00;    --warn-bg: #fdf3dc;
  --danger: #b42318;  --danger-bg: #fdecea;
  /* series por entidad (dataviz, validado) */
  --s-meta: #2a78d6;
  --s-google: #eb6834;
  --s-tiktok: #1baf7a;
  --s-chatgpt: #eda100;
  --s-pinterest: #e87ba4;
  --s-organico: #008300;
  --s-directo: #6250d6;
  --s-otros: #8a8794;
  --grid: #ecebef;
  /* tipografia */
  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fira Code", ui-monospace, Consolas, monospace;
  --fs-12: .75rem; --fs-14: .875rem; --fs-16: 1rem; --fs-18: 1.125rem; --fs-24: 1.5rem; --fs-32: 2rem;
  /* espaciado 4pt */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px;
  /* forma y elevacion */
  --radius: 8px; --radius-sm: 4px;
  --shadow-1: 0 1px 2px rgb(20 19 23 / .06), 0 1px 3px rgb(20 19 23 / .08);
  --shadow-2: 0 4px 12px rgb(20 19 23 / .12);
  /* movimiento */
  --dur: 180ms; --ease-out: cubic-bezier(.2,.8,.2,1);
  /* capas */
  --z-sticky: 10; --z-nav: 20; --z-modal: 100; --z-toast: 1000;
  --sidebar-w: 232px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0f0e12; --surface: #141317; --surface-2: #1c1a21; --border: #2a2830;
    --text: #ece9f1; --text-2: #a8a4b3;
    --primary: #b9a3e3; --on-primary: #141317; --primary-soft: #2a2238; --focus: #b9a3e3;
    --ok: #7fd17f; --ok-bg: #12261a; --warn: #f5c46b; --warn-bg: #2b220f; --danger: #f3b4ae; --danger-bg: #2e1514;
    --s-meta: #3987e5; --s-google: #d95926; --s-tiktok: #199e70; --s-chatgpt: #c98500;
    --s-pinterest: #d55181; --s-organico: #0ca30c; --s-directo: #9085e9; --s-otros: #6f6c78;
    --grid: #26242b;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 4px 12px rgb(0 0 0 / .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0e12; --surface: #141317; --surface-2: #1c1a21; --border: #2a2830;
  --text: #ece9f1; --text-2: #a8a4b3;
  --primary: #b9a3e3; --on-primary: #141317; --primary-soft: #2a2238; --focus: #b9a3e3;
  --ok: #7fd17f; --ok-bg: #12261a; --warn: #f5c46b; --warn-bg: #2b220f; --danger: #f3b4ae; --danger-bg: #2e1514;
  --s-meta: #3987e5; --s-google: #d95926; --s-tiktok: #199e70; --s-chatgpt: #c98500;
  --s-pinterest: #d55181; --s-organico: #0ca30c; --s-directo: #9085e9; --s-otros: #6f6c78;
  --grid: #26242b;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 4px 12px rgb(0 0 0 / .5);
}

/* base */
html { font-family: var(--font); font-size: 100%; background: var(--bg); color: var(--text); }
body { margin: 0; font-size: var(--fs-14); line-height: 1.5; }
.num, table td.num, .kpi-value { font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a, button, [role="button"], summary, select { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
