/* ============================================================================
   Copiado verbatim de mesh-labs-suite, commit 7a9cf55dc669c958498793c020d7ddd47cf96442,
   frontend/.claude/skills/mesh-brandbook/references/tokens.css — ver docs/trust-boundaries.md.
   Não editar hex aqui sem atualizar a origem também.
   ============================================================================ */

/* ============================================================================
   Mesh Suite — Design Tokens (source of truth)
   Copy this :root / [data-theme="dark"] block verbatim into any new surface.
   Never hardcode hex values in components — always reference var(--token).
   These are the exact values used in `Mesh Suite.html`.
   ============================================================================ */

:root{
  /* Surfaces — warm paper, never cold grey. The whole product sits on #fafaf7. */
  --bg:#fafaf7;            /* app background — warm off-white "paper" */
  --surface:#ffffff;       /* cards, panels, inputs, the raised plane */
  --surface-2:#f4f3ee;     /* recessed fills: hover, table headers, insets */
  --surface-3:#ecebe4;     /* deepest fill: badges, skeleton lines, stripes */

  /* Lines — warm, low-contrast hairlines. 1px borders define structure. */
  --line:#e5e3d8;          /* default border */
  --line-2:#d8d6ca;        /* stronger border: hover, dividers, grid dots */

  /* Ink — warm near-black text scale. Everything is slightly warm, not #000. */
  --ink:#1a1a17;           /* primary text, headings, diagram strokes */
  --ink-2:#3a3a35;         /* body text, button labels */
  --ink-3:#6b6b62;         /* secondary text, labels, captions */
  --ink-4:#9a998e;         /* tertiary: placeholders, disabled, microcopy */

  /* Accent — Mesh red. The single decisive brand color. Use sparingly. */
  --accent:#e21a21;        /* primary actions, active nav, focus */
  --accent-deep:#b8141a;   /* hover/pressed, accent text on soft bg */
  --accent-soft:#fde6e7;   /* tinted accent background (active states, banners) */
  --accent-2:#f4a300;      /* secondary amber accent (rare) */

  /* Status — semantic only. Don't reuse these as decoration. */
  --ok:#3f8a4f;            /* green — conforme, validado, success */
  --warn:#f4a300;          /* amber — pendente, em revisão, attention */
  --crit:#c43816;          /* burnt red — error, subdimensionado, critical */
  --info:#3260c9;          /* blue — informational, also the Proteção tool */

  /* Radii */
  --radius:10px;           /* cards, buttons containers */
  --radius-sm:6px;         /* small chips, icon tiles */
  --radius-lg:14px;        /* modals, large containers */

  /* Shadows — warm-tinted (rgba 20,18,12), soft and low. Never harsh black. */
  --shadow-sm:0 1px 2px rgba(20,18,12,.04), 0 1px 0 rgba(20,18,12,.02);
  --shadow-md:0 4px 14px rgba(20,18,12,.06), 0 1px 2px rgba(20,18,12,.04);
  --shadow-lg:0 18px 40px rgba(20,18,12,.10), 0 2px 6px rgba(20,18,12,.04);

  /* Type */
  --font:"Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"]{
  --bg:#0f0f0d;
  --surface:#171714;
  --surface-2:#1d1d1a;
  --surface-3:#252521;
  --line:#2a2a26;
  --line-2:#35352f;
  --ink:#f0eee5;
  --ink-2:#cfcdc2;
  --ink-3:#9a988c;
  --ink-4:#6c6a60;
  --accent:#ff2a31;
  --accent-deep:#e21a21;
  --accent-soft:#3a1216;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 4px 14px rgba(0,0,0,.5);
  --shadow-lg:0 18px 40px rgba(0,0,0,.55);
}

/* ----------------------------------------------------------------------------
   Tool color system — each of the four engineering tools owns one hue.
   Used for chips (.tag.t-*), icon tiles, and accents on tool surfaces.
   ---------------------------------------------------------------------------- */

/* cc   — Curto-Circuito      red    #e21a21 (== --accent) */
/* prot — Estudos de Proteção blue   #3260c9 (== --info)   */
/* spda — SPDA                green  #3f8a4f (== --ok)      */
/* rele — Testes de Relés     purple #7a3fc0               */

.tag.t-cc{background:#fde6e7;color:var(--accent-deep);border-color:#f6c4c7}
.tag.t-prot{background:#e9eefb;color:#2949a0;border-color:#cdd7f1}
.tag.t-spda{background:#eaf5ed;color:#1f6f3b;border-color:#cfe7d6}
.tag.t-rele{background:#f4eaf7;color:#6b2c8a;border-color:#dfc6e7}

[data-theme="dark"] .tag.t-cc{background:rgba(226,26,33,.2);color:#ff7a80;border-color:transparent}
[data-theme="dark"] .tag.t-prot{background:rgba(50,96,201,.22);color:#7fa3e8;border-color:transparent}
[data-theme="dark"] .tag.t-spda{background:rgba(63,138,79,.18);color:#7fbf8f;border-color:transparent}
[data-theme="dark"] .tag.t-rele{background:rgba(122,63,192,.22);color:#c195e8;border-color:transparent}

/* ----------------------------------------------------------------------------
   Extensão local (2026-09-05, boards) — fim do bloco copiado verbatim acima.
   Duas tools do catálogo real ainda não tinham chip. As cores-base saem do
   próprio catálogo (frontend/src/data.jsx), nenhuma inventada, e as regras
   seguem a receita que o brandbook manda usar para uma tool nova: fundo suave
   (~10% da base sobre branco), texto saturado (base × 0.8), borda tingida
   (~25%), mais a variante dark. Ao portar de volta para o brandbook, levar
   estas quatro regras junto.

   teste-reles — Trip    (Teste de Relés)          blue   #2f6bd6
   insp        — Ensaia  (Inspeção de Equipamentos) orange #c2691c
   ---------------------------------------------------------------------------- */

.tag.t-teste-reles{background:#eaf0fb;color:#2555a9;border-color:#cbdaf5}
.tag.t-insp{background:#f9f0e8;color:#995316;border-color:#f0dac6}

[data-theme="dark"] .tag.t-teste-reles{background:rgba(47,107,214,.22);color:#82a6e6;border-color:transparent}
[data-theme="dark"] .tag.t-insp{background:rgba(194,105,28,.20);color:#daa577;border-color:transparent}
