/**
 * Design Tokens
 * TraceLog - Food Producer Traceability System
 *
 * Based on Culinary Microherbs branding
 * Primary: #1eb286 (Green)
 * Secondary: #ff6b6b (Pink/Red accent)
 */

:root {
  /* ===== BRAND COLOURS ===== */
  --color-primary: #1eb286;
  --color-primary-dark: #148868;
  --color-primary-light: #e8f5f1;
  --color-primary-rgb: 30, 178, 134;

  --color-secondary: #ff6b6b;
  --color-secondary-dark: #e55a5a;
  --color-secondary-light: #fff0f0;

  /* ===== SEMANTIC COLOURS ===== */
  --color-success: #28a745;
  --color-success-light: #d4edda;
  --color-success-bg: #e8f5e9;
  --color-warning: #ffc107;
  --color-warning-light: #fff3cd;
  --color-warning-bg: #fff8e1;
  --color-danger: #dc3545;
  --color-danger-light: #f8d7da;
  --color-danger-bg: #fdeaea;
  --color-info: #17a2b8;
  --color-info-light: #d1ecf1;
  --color-info-bg: #e1f5fe;

  /* ===== TEXT COLOURS ===== */
  --color-text-primary: #212529;
  --color-text-secondary: #6c757d;
  --color-text-muted: #6b7280;  /* Darkened from #adb5bd for better readability */
  --color-text-inverse: #ffffff;
  --color-text-link: var(--color-primary);
  --color-text-link-hover: var(--color-primary-dark);

  /* ===== BACKGROUND COLOURS ===== */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #e9ecef;
  --color-bg-dark: #343a40;
  --color-bg-overlay: rgba(0, 0, 0, 0.5);

  /* ===== BORDER COLOURS ===== */
  --color-border: #dee2e6;
  --color-border-light: #e9ecef;
  --color-border-dark: #ced4da;
  --color-border-focus: var(--color-primary);

  /* ===== STATUS COLOURS (Workflow) ===== */
  --color-status-germinating: #6f42c1;
  --color-status-germinating-light: #f3e8ff;
  --color-status-germinating-bg: #f3e8ff;
  --color-status-growing: #1eb286;
  --color-status-growing-light: #e8f5f1;
  --color-status-growing-bg: #e8f5f1;
  --color-status-ready: #fd7e14;
  --color-status-ready-light: #fff3e0;
  --color-status-ready-bg: #fff3e0;
  --color-status-completed: #6c757d;
  --color-status-completed-light: #e9ecef;
  --color-status-completed-bg: #e9ecef;

  /* School Meals Workflow Status Colours */
  --color-status-prep: #6f42c1;
  --color-status-prep-light: #f3e8ff;
  --color-status-prep-bg: #f3e8ff;
  --color-status-cooking: #fd7e14;
  --color-status-cooking-light: #fff3e0;
  --color-status-cooking-bg: #fff3e0;
  --color-status-cooling: #17a2b8;
  --color-status-cooling-light: #e0f7fa;
  --color-status-cooling-bg: #e0f7fa;
  --color-status-chilled-storage: #007bff;
  --color-status-chilled-storage-light: #e3f2fd;
  --color-status-chilled-storage-bg: #e3f2fd;
  --color-status-hot-holding: #dc3545;
  --color-status-hot-holding-light: #ffebee;
  --color-status-hot-holding-bg: #ffebee;
  --color-status-ready-to-dispatch: #1eb286;
  --color-status-ready-to-dispatch-light: #e8f5f1;
  --color-status-ready-to-dispatch-bg: #e8f5f1;

  /* ===== SPACING SCALE ===== */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */

  /* ===== TYPOGRAPHY ===== */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                       'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas,
                       'Liberation Mono', 'Courier New', monospace;

  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;

  /* ===== BORDER RADIUS ===== */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
               0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
               0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
               0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-focus: 0 0 0 3px rgba(30, 178, 134, 0.25);

  /* ===== Z-INDEX SCALE ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* ===== TRANSITIONS ===== */
  --transition-fast: 0.1s ease;
  --transition-base: 0.15s ease;
  --transition-slow: 0.3s ease;

  /* ===== LAYOUT ===== */
  --sidebar-width: 240px;
  --topbar-height: 64px;
  --pwa-header-height: 56px;
  --container-max-width: 1400px;
}

/* ===== DARK MODE (Phase 2) ===== */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary: #1a1a1a;
    --color-bg-secondary: #2d2d2d;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-border: #404040;
  }
}
*/
