/* Design tokens. A estrutura (neutros, raios, sombras) vem do kit Lukana; as CORES DE MARCA e
   a TIPOGRAFIA vêm do manual de normas da Diaplant (Modal Brands & Digital, 2023 — a cópia está
   em `Clientes/Diaplant/marca/MANUAL DA MARCA.pdf`):
     Verde Escuro  Pantone 349   #006B35   — o acento da interface (texto branco por cima)
     Verde Claro   Pantone 2299  #A1CE5A   — só em doses pequenas (realces, tintas de fundo)
     Tipografia corporativa: Bw Modelica (Light, Regular, Bold)
   O lima #9FE870 do kit saiu a 18/11/2026: cansava no uso diário (reunião de 16/11).
   Tema claro = principal; tema escuro via .dark no <html>. */

@font-face { font-family: "Bw Modelica"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/BwModelica-Light.af1464c70a27.otf") format("opentype"); }
@font-face { font-family: "Bw Modelica"; font-weight: 400 500; font-style: normal; font-display: swap;
  src: url("../fonts/BwModelica-Regular.e5f82277b40b.otf") format("opentype"); }
@font-face { font-family: "Bw Modelica"; font-weight: 600 800; font-style: normal; font-display: swap;
  src: url("../fonts/BwModelica-Bold.98ae7d119716.otf") format("opentype"); }

:root {
  /* Nomes curtos que vários estilos usavam sem estarem definidos (18/11/2026). */
  --accent: var(--accent-primary);
  --border: var(--border-strong);

  /* Fundo (Lukana: página #f7f7f7, cards brancos, cinzas #f5f5f5/#fafafa) */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --sidebar-bg: #ffffff;
  --bg-tertiary: #f5f5f5;
  --bg-quaternary: #f0f0f0;
  --bg-hover: rgba(0, 0, 0, 0.03);
  --bg-hover-medium: rgba(0, 0, 0, 0.06);
  --bg-danger: rgba(248, 100, 50, 0.10);

  /* Texto. Os três cinzentos passam 4,5:1 sobre branco e sobre o fundo #f5f5f5
     (medido no browser a 18/11/2026: os antigos #7b7b7b e #a3a3a3 davam 4,2 e 2,5). */
  --text-primary: #000000;
  --text-secondary: #5c5c5c;
  --text-tertiary: #646464;
  --text-light: #6b6b6b;
  --text-extralight: #c6c6c6;
  --text-inverted: #ffffff;
  --text-danger: #f86432;

  /* Bordas (Lukana: #eeeeee dominante, #e5e5e5 forte, #f2f2f2 suave) */
  --border-strong: #e5e5e5;
  --border-medium: #eeeeee;
  --border-light: #f2f2f2;
  --border-blue: #006b35;

  /* Acento — o Verde Escuro da marca, com texto branco por cima (contraste 6,6:1).
     --blue mantém o nome por compatibilidade com o resto do CSS. */
  --brand-dark: #006b35;      /* Verde Escuro, Pantone 349 */
  --brand-light: #a1ce5a;     /* Verde Claro, Pantone 2299 */
  --blue: #006b35;
  --blue-hover: #005a2c;      /* derivado: o Verde Escuro escurecido */
  --blue-pressed: #004a24;
  --on-accent: #ffffff;       /* texto sobre o acento */
  --accent-primary: #006b35;
  --accent-tertiary: rgba(0, 107, 53, 0.09);
  --accent-text: #006b35;
  --accent-dark: #04482a;     /* superfícies escuras de destaque (hero cards, login) */

  /* COINEST (referência do Cláudio, 2026-07-21) — verde-floresta profundo p/ o
     card-herói + mentas suaves p/ cartões e badges. Convivem com o lima (accent). */
  --forest: #006b35;          /* fundo do card-herói do painel: o Verde Escuro da marca */
  --forest-deep: #04482a;     /* fim do gradiente / variante mais escura */
  --on-forest: #ffffff;       /* texto sobre o verde */
  --mint-soft: #edf5df;       /* Verde Claro a ~20% sobre branco — chips/realces */
  --mint-tint: #d9eabd;       /* Verde Claro a ~45% — bordas/realces dos cartões suaves */
  --mint-line: #eef5e3;       /* Verde Claro ténue — linha de contorno dos KPI */
  --forest-glow: rgba(0, 107, 53, 0.22);  /* sombra própria do herói */

  /* Semânticas (do censo real do kit) */
  --green: #00853a;
  --red: #f86432;
  --orange: #f86432;
  --amber: #ffbd4c;
  --purple: #5f41b4;
  --pink: #95122b;
  --turquoise: #287f6e;
  --info: #0a53c0;

  /* Raio (Lukana: 8 base, 10 inputs, 16 cards, 20 icon-btns, 100 pills, 50 badges) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Sombras — o kit é quase flat; a tabela usa a dupla real do .fig:
     0 0 0 1 #e5e5e5 + 0 4 8 -5 rgba(0,0,0,.15) */
  --shadow-light: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-card: 0 0 0 1px #e5e5e5, 0 4px 8px -5px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 0 8px 0 rgba(0, 0, 0, 0.08), 0 16px 48px -12px rgba(0, 0, 0, 0.24);
  --focus-ring: 0 0 0 3px rgba(0, 107, 53, 0.28);

  --font: "Bw Modelica", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Tags (bg = cor a 10%, texto = cor cheia — badges pill do kit, ex.: #009f42@0.10) */
  --tag-bg-blue: rgba(10, 83, 192, 0.10);   --tag-text-blue: #0a53c0;
  --tag-bg-green: rgba(0, 107, 53, 0.10);   --tag-text-green: #006b35;
  --tag-bg-red: rgba(248, 100, 50, 0.10);   --tag-text-red: #b93a0b;
  --tag-bg-orange: rgba(248, 100, 50, 0.10);--tag-text-orange: #b93a0b;
  --tag-bg-purple: #f4f0ff;                 --tag-text-purple: #5f41b4;
  --tag-bg-amber: rgba(255, 189, 76, 0.16); --tag-text-amber: #855400;
  --tag-bg-teal: #effefa;                   --tag-text-teal: #287f6e;
  --tag-bg-gray: #f5f5f5;                   --tag-text-gray: #5f5f5f;
}

.dark {
  /* Neutros escuros do kit (Gray/13 #0f0e0e, Gray/12 #21201f, Gray/11 #2a2726) */
  --bg-primary: #1a1a19;
  --bg-secondary: #0f0e0e;
  --sidebar-bg: #1a1a19;
  --bg-tertiary: #21201f;
  --bg-quaternary: #2a2726;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-hover-medium: rgba(255, 255, 255, 0.08);
  --bg-danger: rgba(248, 100, 50, 0.16);

  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-tertiary: #a3a3a3;
  --text-light: #8f8f8f;
  --text-extralight: #555555;
  --text-inverted: #0f0e0e;

  --border-strong: #3a3836;
  --border-medium: #2a2726;
  --border-light: #21201f;

  --blue: #a1ce5a;            /* no escuro o acento é o Verde Claro, com texto escuro por cima */
  --blue-hover: #b3d977;
  --blue-pressed: #8fbf45;
  --on-accent: #0c2a17;
  --border-blue: #a1ce5a;
  --accent-primary: #a1ce5a;
  --accent-tertiary: rgba(161, 206, 90, 0.12);
  --accent-text: #a1ce5a;
  --accent-dark: #04482a;

  /* COINEST em tema escuro — o herói mantém o verde-floresta; as mentas passam a
     véus translúcidos (não fundos claros) para não «furar» o fundo escuro. */
  --forest: #006b35;
  --forest-deep: #04482a;
  --on-forest: #ffffff;
  --mint-soft: rgba(161, 206, 90, 0.10);
  --mint-tint: rgba(161, 206, 90, 0.22);
  --mint-line: rgba(161, 206, 90, 0.14);
  --forest-glow: rgba(0, 0, 0, 0.45);

  --shadow-light: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-card: 0 0 0 1px #2a2726, 0 4px 8px -5px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 4px 16px 0 rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 0 8px 0 rgba(0, 0, 0, 0.5), 0 16px 48px -12px rgba(0, 0, 0, 0.7);
  --focus-ring: 0 0 0 3px rgba(161, 206, 90, 0.30);

  --tag-bg-blue: rgba(10, 83, 192, 0.25);   --tag-text-blue: #7aa7ff;
  --tag-bg-green: rgba(0, 159, 66, 0.18);   --tag-text-green: #4cd47f;
  --tag-bg-red: rgba(248, 100, 50, 0.18);   --tag-text-red: #ff8a63;
  --tag-bg-orange: rgba(248, 100, 50, 0.18);--tag-text-orange: #ff8a63;
  --tag-bg-purple: rgba(95, 65, 180, 0.25); --tag-text-purple: #ac8bf3;
  --tag-bg-amber: rgba(255, 189, 76, 0.18); --tag-text-amber: #ffbd4c;
  --tag-bg-teal: rgba(40, 127, 110, 0.25);  --tag-text-teal: #40c4aa;
  --tag-bg-gray: #21201f;                   --tag-text-gray: #a3a3a3;
}
