/* ==============================================================================
   PAYFLOW ENTERPRISE - GLOBAL CSS DESIGN SYSTEM & THEMING TOKENS
   Strictly separated stylesheet. Referenced across all Storefront, Dashboard & POS.
   ============================================================================== */

:root {
  /* Brand Core Colors (Jumia Kenya Inspired Palette - #E8650A Primary) */
  --color-primary: #E8650A;               /* Signature Kenyan Burnt-Orange Primary */
  --color-primary-light: #ff781f;
  --color-primary-hover: #cf5705;
  
  --color-accent: #E8650A;                /* Jumia Kenya Primary Brand Orange */
  --color-accent-hover: #cf5705;
  --color-accent-subtle: #fef4ec;
  --color-accent-ring: rgba(232, 101, 10, 0.22);

  --color-brand-secondary: #00b050;       /* Safaricom M-Pesa Green */
  --color-brand-secondary-hover: #047857;

  /* Jumia Signature Accent Tokens */
  --color-jumia-orange: #E8650A;
  --color-jumia-orange-hover: #cf5705;
  --color-jumia-dark: #282828;
  --color-jumia-red: #e61601;
  --color-jumia-yellow: #f6b01e;
  --color-jumia-bg: #f1f1f2;
  --color-jumia-border: #ededed;
  --color-safaricom-green: #00b050;

  /* Status Colors */
  --color-success: #00b050;
  --color-success-bg: #f0fdf4;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-danger: #e61601;
  --color-danger-bg: #fef2f2;
  --color-info: #2563eb;
  --color-info-bg: #eff6ff;

  /* Neutral Surface Palette (Light Mode Default) */
  --bg-page: #f1f1f2;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-sunken: #f8f8f8;
  --bg-surface-hover: #fcfcfc;
  --bg-backdrop: rgba(40, 40, 40, 0.65);

  /* Borders & Dividers */
  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-interactive: #94a3b8;

  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;
  --text-accent: #E8650A;
  --text-danger: #dc2626;

  /* Font Families */
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-display: 'Nunito', -apple-system, sans-serif;

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

  /* Spacing Scale */
  --space-0: 0;
  --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 */

  /* Border Radii */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows (Crafted for tactile realism, avoiding blurry AI glow) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.02);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout Constraints */
  --max-width-store: 1280px;
  --max-width-reading: 720px;
  --header-height: 72px;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --pos-cart-width: 380px;

  /* Z-Index Hierarchy */
  --z-header: 100;
  --z-sidebar: 200;
  --z-dropdown: 300;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-toast: 1100;

  /* POS-Specific Tokens (Touch & Fast Ergonomics) */
  --pos-btn-height: 48px;
  --pos-item-grid-gap: 12px;
  --pos-receipt-width-58mm: 200px;
  --pos-receipt-width-80mm: 300px;
}

/* Dark Mode Overrides (Optional / Vendor or Dashboard Toggle) */
[data-theme="dark"] {
  --color-primary: #f8fafc;
  --color-primary-light: #e2e8f0;
  --color-primary-hover: #ffffff;
  
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-sunken: #070a12;
  --bg-surface-hover: #1f293d;

  --border-subtle: #1e293b;
  --border-default: #334155;
  --border-strong: #475569;
  --border-interactive: #64748b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}
