/* Farmify Design System — tokens
   Identidade Farmify aplicada (paleta editorial-clínica: petrol + bone + âmbar).
   Único arquivo de tokens consumido por toda a área pública e admin. */

:root {
  /* Tipografia */
  --font-sans: "General Sans", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cabinet Grotesk", "General Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Neutros — bone clínico caloroso (paleta Farmify) */
  --bg: #FAF9F5;            /* bone */
  --bg-subtle: #F2F1EC;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --ink: #0A1814;            /* tinta */
  --ink-2: #364946;
  --ink-3: #6B7B78;
  --ink-4: #94A19E;
  --ink-5: #C8D0CD;
  --rule: #E5E8E5;
  --rule-2: #D6DAD6;

  /* Petróleo — primária Farmify */
  --petrol-50: #E6F2F1;       /* petrol-soft */
  --petrol-100: #C7E0DE;
  --petrol-200: #9FC8C5;
  --petrol-300: #6FAAA9;
  --petrol-400: #338A87;
  --petrol-500: #0F6E78;      /* primary — Farmify Petrol */
  --petrol-600: #0A5C66;
  --petrol-700: #095861;      /* petrol-deep */
  --petrol-800: #074044;
  --petrol-900: #042A2D;

  /* Âmbar — acento secundário (CTA destacada, alerta crítico, faixa de controlados) */
  --amber-50: #FBF1E0;
  --amber-100: #F5DDB0;
  --amber-300: #E5A857;
  --amber-500: #D88B2C;       /* Farmify Âmbar */
  --amber-700: #9A5E15;

  /* Status */
  --ok: #15803D;
  --ok-soft: #DCFCE7;
  --ok-border: #BBF7D0;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --warn-border: #FDE68A;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --danger-border: #FECACA;
  --info: #1D4ED8;
  --info-soft: #DBEAFE;
  --info-border: #BFDBFE;

  /* Anvisa */
  --controlled-red: #B91C1C;       /* faixa entorpecentes (Lista A) */
  --controlled-black: #111111;     /* faixa psicotrópicos (Lista B/C) */

  /* Raios */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Sombras — calibradas para fundo bone */
  --shadow-1: 0 1px 2px rgba(10,24,20,.04), 0 0 0 1px rgba(10,24,20,.04);
  --shadow-2: 0 1px 2px rgba(10,24,20,.06), 0 8px 24px -8px rgba(10,24,20,.10);
  --shadow-3: 0 2px 4px rgba(10,24,20,.06), 0 24px 48px -12px rgba(10,24,20,.18);
  --ring-focus: 0 0 0 3px var(--petrol-50);

  /* Espaçamento — base 4 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* Type scale */
  --t-mono: 12px;
  --t-xs: 12px;
  --t-sm: 13px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: 20px;
  --t-h3: 24px;
  --t-h2: 32px;
  --t-h1: 44px;
  --t-display: 60px;

  /* Transições */
  --t-fast: 120ms ease;
  --t-base: 180ms ease;
}

/* Modo escuro */
[data-theme="dark"] {
  --bg: #061714;
  --bg-subtle: #0B201C;
  --surface: #0F2925;
  --surface-2: #143330;
  --ink: #F4F2EB;
  --ink-2: #D4D8D2;
  --ink-3: #94A19E;
  --ink-4: #6B7B78;
  --ink-5: #364946;
  --rule: #1F3835;
  --rule-2: #2A4744;

  --petrol-50: #073533;
  --petrol-500: #2A9D97;
  --petrol-600: #0F6E78;
  --petrol-700: #095861;

  --ok-soft: rgba(34,197,94,.12);
  --warn-soft: rgba(245,158,11,.12);
  --danger-soft: rgba(239,68,68,.12);
  --info-soft: rgba(59,130,246,.12);

  --shadow-1: 0 0 0 1px rgba(255,255,255,.06);
  --shadow-2: 0 8px 24px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}

/* Reset mínimo */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
button { font-family: inherit; }
a { color: inherit; }
