/*
  design-tokens.css — Central design system tokens for ERP UI
  Usage: import before Tailwind in base.html
  Tokens: colors, type, spacing, radii, elevation, motion
*/
:root {
  /* Brand & Accent */
  --brand: #0f1724;
  --accent: #1d4ed8;
  --accent-600: #2563eb;
  --accent-700: #1e40af;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --info: #2563eb;
  /* Surfaces */
  --surface: #fff;
  --surface-2: #f8fafc;
  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --h1: 2rem; /* 32px */
  --h2: 1.5rem; /* 24px */
  --h3: 1.25rem; /* 20px */
  --body: 1rem; /* 16px */
  --small: 0.875rem; /* 14px */
  /* Spacing (8px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(16,24,40,0.05);
  --shadow-md: 0 4px 8px 0 rgba(16,24,40,0.08);
  --shadow-lg: 0 8px 24px 0 rgba(16,24,40,0.12);
  /* Motion */
  --motion-duration: 200ms;
}
@media (prefers-reduced-motion: reduce) {
  :root { --motion-duration: 0ms; }
}

/* Component utilities */
.card {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: var(--h3);
  color: var(--brand);
  font-weight: 600;
}
.card-body {
  color: var(--muted);
}
.kpi-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); }
.focus-ring:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

/* Lightweight utility for subtle motion */
.motion-safe-transition { transition: all var(--motion-duration) ease; }
