/* assets/css/tokens.css - GFSI EMP Mobile-First Pro Tokens */
:root {
  /* Typography - Compact Pro Scale */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  
  --fs-title: 17px;
  --fs-section: 15px;
  --fs-body: 14px;
  --fs-small: 13px;
  --fs-caption: 12px;
  --fs-badge: 11px;

  /* 4px Spacing Scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Compact Sizing & Touch Targets */
  --h-appbar: 48px;
  --h-bottomnav: 52px;
  --h-input: 40px;
  --hit-target: 44px; /* Accessible 44px minimum tap target */
  --icon-size: 20px;
  --icon-size-sm: 16px;
  --icon-size-lg: 24px;

  /* Shapes & Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 9999px;

  /* Light Theme (GFSI Social Impact Palette) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ffffff;
  --bg-sunken: #f1f5f9;
  --border-line: #e2e8f0;
  --border-subtle: #edf2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Brand Colors */
  --primary: #0d9488;         /* GFSI Empowering Teal */
  --primary-hover: #0f766e;
  --primary-subtle: #f0fdfa;
  --primary-border: #99f6e4;
  --on-primary: #ffffff;

  --accent: #f97316;          /* Warm Food / Marketplace Orange */
  --accent-hover: #ea580c;
  --accent-subtle: #fff7ed;
  --accent-border: #fed7aa;
  --on-accent: #ffffff;

  /* Semantic State Colors */
  --success: #16a34a;
  --success-subtle: #f0fdf4;
  --success-border: #bbf7d0;

  --warning: #d97706;
  --warning-subtle: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-subtle: #fef2f2;
  --danger-border: #fecaca;

  --info: #0284c7;
  --info-subtle: #f0f9ff;
  --info-border: #bae6fd;

  /* Shadows (Subtle, never bulky) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-sheet: 0 -4px 20px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --tr-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-surface: #131c31;
  --bg-surface-raised: #1e293b;
  --bg-sunken: #0f172a;
  --border-line: #334155;
  --border-subtle: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b1120;

  --primary: #2dd4bf;
  --primary-hover: #14b8a6;
  --primary-subtle: #132a2f;
  --primary-border: #115e59;
  --on-primary: #042f2e;

  --accent: #fb923c;
  --accent-hover: #f97316;
  --accent-subtle: #2d1808;
  --accent-border: #7c2d12;
  --on-accent: #431407;

  --success: #4ade80;
  --success-subtle: #052e16;
  --success-border: #166534;

  --warning: #fbbf24;
  --warning-subtle: #2e1e05;
  --warning-border: #854d0e;

  --danger: #f87171;
  --danger-subtle: #310d0d;
  --danger-border: #991b1b;

  --info: #38bdf8;
  --info-subtle: #082f49;
  --info-border: #075985;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-sheet: 0 -4px 20px rgba(0, 0, 0, 0.7);
}

@media (min-width: 840px) {
  :root {
    --fs-title: 18px;
    --h-appbar: 52px;
  }
}
