/* ============================================================
   Vector Velocity — Design Tokens
   All design decisions live here as CSS custom properties.
   --brand-primary and --brand-accent are overridden at runtime
   by branding.js using values from the business_branding table.
   Never reference a colour value directly in other CSS files —
   always use a token.
   ============================================================ */

:root {

  /* ----------------------------------------------------------
     BRAND COLOURS
     Defaults are Vector Business Solutions colours.
     branding.js overrides these per tenant on login.
     ---------------------------------------------------------- */
  --brand-primary:       #1a56db;
  --brand-primary-light: #3b70e8;
  --brand-primary-dark:  #1246c0;
  --brand-primary-bg:    #eff4ff;
  --brand-primary-border:#bfd3fe;

  --brand-accent:        #0e9f6e;
  --brand-accent-light:  #1ab57e;
  --brand-accent-dark:   #0b8a5e;
  --brand-accent-bg:     #f0fdf4;
  --brand-accent-border: #bbf7d0;


  /* ----------------------------------------------------------
     NEUTRAL PALETTE
     ---------------------------------------------------------- */
  --color-white:     #ffffff;
  --color-grey-50:   #f9fafb;
  --color-grey-100:  #f3f4f6;
  --color-grey-200:  #e5e7eb;
  --color-grey-300:  #d1d5db;
  --color-grey-400:  #9ca3af;
  --color-grey-500:  #6b7280;
  --color-grey-600:  #4b5563;
  --color-grey-700:  #374151;
  --color-grey-800:  #1f2937;
  --color-grey-900:  #111827;


  /* ----------------------------------------------------------
     SEMANTIC COLOURS
     ---------------------------------------------------------- */
  --color-success:        #0e9f6e;
  --color-success-light:  #1ab57e;
  --color-success-bg:     #f0fdf4;
  --color-success-border: #bbf7d0;

  --color-warning:        #d97706;
  --color-warning-light:  #f59e0b;
  --color-warning-bg:     #fffbeb;
  --color-warning-border: #fde68a;

  --color-error:          #dc2626;
  --color-error-light:    #ef4444;
  --color-error-bg:       #fef2f2;
  --color-error-border:   #fecaca;

  --color-info:           #2563eb;
  --color-info-light:     #3b82f6;
  --color-info-bg:        #eff6ff;
  --color-info-border:    #bfdbfe;


  /* ----------------------------------------------------------
     SURFACES
     ---------------------------------------------------------- */
  --surface-page:    var(--color-grey-50);
  --surface-card:    var(--color-white);
  --surface-sidebar: var(--color-grey-900);
  --surface-header:  var(--color-white);
  --surface-overlay: rgba(0, 0, 0, 0.45);


  /* ----------------------------------------------------------
     TEXT
     ---------------------------------------------------------- */
  --text-primary:   var(--color-grey-900);
  --text-secondary: var(--color-grey-600);
  --text-muted:     var(--color-grey-400);
  --text-inverse:   var(--color-white);
  --text-brand:     var(--brand-primary);
  --text-link:      var(--brand-primary);


  /* ----------------------------------------------------------
     BORDERS
     ---------------------------------------------------------- */
  --border-color:      var(--color-grey-200);
  --border-color-dark: var(--color-grey-300);

  --radius-sm:   4px;
  --radius:      8px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;


  /* ----------------------------------------------------------
     SPACING  (4px base unit)
     ---------------------------------------------------------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;


  /* ----------------------------------------------------------
     TYPOGRAPHY
     System font stack — no external font dependency.
     ---------------------------------------------------------- */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;

  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  36px;

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --leading-tight:   1.25;
  --leading-snug:    1.375;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;


  /* ----------------------------------------------------------
     LAYOUT
     ---------------------------------------------------------- */
  --sidebar-width:  240px;
  --header-height:  60px;
  --panel-width:    400px;
  --content-max:    1280px;


  /* ----------------------------------------------------------
     SHADOWS
     ---------------------------------------------------------- */
  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.08), 0 1px 2px -1px rgba(0,0,0,0.06);
  --shadow:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 12px -2px rgba(0,0,0,0.08), 0 3px 5px -3px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 24px -4px rgba(0,0,0,0.08), 0 6px 8px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 40px -6px rgba(0,0,0,0.10), 0 8px 12px -4px rgba(0,0,0,0.04);


  /* ----------------------------------------------------------
     Z-INDEX LAYERS
     ---------------------------------------------------------- */
  --z-base:     1;
  --z-sticky:   100;
  --z-dropdown: 200;
  --z-modal:    300;
  --z-toast:    400;
  --z-overlay:  500;


  /* ----------------------------------------------------------
     TRANSITIONS
     ---------------------------------------------------------- */
  --transition-fast:   120ms ease;
  --transition:        200ms ease;
  --transition-slow:   300ms ease;

}
