﻿/*
 * Design Tokens — WorkforceTime
 * T902: Neutral base theme, status colors, spacing, radius, typography, breakpoints.
 * T903: Customer accent CSS variable with contrast hook.
 *
 * All tokens are CSS custom properties on :root.
 * Customer branding overrides --accent-* via a <style> tag injected at runtime.
 */

:root {
  /* ── Typography ──────────────────────────────────────────────────────────── */
  --font-family-base: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-family-mono: "Fira Code", "Cascadia Code", ui-monospace, monospace;

  --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-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:  1.25;
  --line-height-normal: 1.5;
  --line-height-loose:  1.75;

  /* ── Neutral palette ─────────────────────────────────────────────────────── */
  --color-neutral-50:  #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;

  /* ── Semantic colors ── NCW brand: deep navy + warm accent ─────────────── */
  /* To match teamncw.com exactly, adjust these three navy values and the
     --accent-* values below. Everything else re-themes automatically. */
  --color-primary:       #14284b; /* NCW navy        */
  --color-primary-light: #2a4a7a; /* Navy (lighter)  */
  --color-primary-dark:  #0d1c38; /* Navy (darker)   */

  --color-success:       #16a34a; /* Green-600  */
  --color-success-light: #bbf7d0; /* Green-200  */
  --color-warning:       #d97706; /* Amber-600  */
  --color-warning-light: #fef3c7; /* Amber-100  */
  --color-error:         #dc2626; /* Red-600    */
  --color-error-light:   #fee2e2; /* Red-100    */
  --color-info:          #0891b2; /* Cyan-600   */
  --color-info-light:    #cffafe; /* Cyan-100   */

  /* ── Surface / background ────────────────────────────────────────────────── */
  --color-surface:       #ffffff;
  --color-surface-muted: #f7f5f1; /* warm paper background */
  --color-border:        var(--color-neutral-200);
  --color-border-strong: var(--color-neutral-300);
  --color-text:          var(--color-neutral-900);
  --color-text-muted:    var(--color-neutral-500);
  --color-text-inverse:  #ffffff;

  /* ── Customer accent (T903) — overridable per subdomain ────────────────────
   * The BrandingAdmin page injects:
   *   <style>:root { --accent-500: #hex; --accent-600: #hex; --accent-100: #hex; }</style>
   * Contrast must be >= 4.5:1 against white for text use (WCAG 2.2 AA).
   */
  --accent-50:  #fdf1ea;
  --accent-100: #fbe2d3;
  --accent-200: #f6c3a6;
  --accent-500: #ef5f29;
  --accent-600: #d94e1f;
  --accent-700: #b03f17;

  /* ── Status badge colors ─────────────────────────────────────────────────── */
  --status-pending-bg:    var(--color-warning-light);
  --status-pending-text:  #92400e;
  --status-submitted-bg:  var(--color-info-light);
  --status-submitted-text:#0c4a6e;
  --status-approved-bg:   var(--color-success-light);
  --status-approved-text: #14532d;
  --status-rejected-bg:   var(--color-error-light);
  --status-rejected-text: #7f1d1d;
  --status-exported-bg:   #e0e7ff;
  --status-exported-text: #3730a3;
  --status-processed-bg:  var(--color-neutral-100);
  --status-processed-text:var(--color-neutral-700);

  /* ── Spacing ─────────────────────────────────────────────────────────────── */
  --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 radius ───────────────────────────────────────────────────────── */
  --radius-sm:   0.25rem;  /* 4px  */
  --radius-md:   0.5rem;   /* 8px  */
  --radius-lg:   0.75rem;  /* 12px */
  --radius-xl:   1rem;     /* 16px */
  --radius-full: 9999px;

  /* ── Shadows ─────────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* ── Transitions ─────────────────────────────────────────────────────────── */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;

  /* ── Z-index scale ───────────────────────────────────────────────────────── */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

/* ── Reduced-motion support (WCAG 2.2 SC 2.3.3) ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive breakpoints (reference only — use in media queries) ──────── */
/*
  --breakpoint-sm:  640px
  --breakpoint-md:  768px
  --breakpoint-lg:  1024px
  --breakpoint-xl:  1280px
  --breakpoint-2xl: 1536px
*/