/* ============================================================
 * planilla_v2 — Design Tokens
 * ------------------------------------------------------------
 * Swiss / Stripe-style direction. Luxury B2B.
 * Single source of truth for colors, type, spacing, radii.
 * ============================================================ */

:root {
  /* --------------------------------------------------------
   * Neutrals — cool gray scale (zinc-ish)
   * -------------------------------------------------------- */
  --color-white:       #ffffff;
  --color-neutral-50:  #fafafa;
  --color-neutral-100: #f4f4f5;
  --color-neutral-150: #eceef1;
  --color-neutral-200: #e4e4e7;
  --color-neutral-300: #d4d4d8;
  --color-neutral-400: #a1a1aa;
  --color-neutral-500: #71717a;
  --color-neutral-600: #52525b;
  --color-neutral-700: #3f3f46;
  --color-neutral-800: #27272a;
  --color-neutral-900: #18181b;

  /* --------------------------------------------------------
   * Brand — deep ink blue (not the generic Bootstrap blue)
   * -------------------------------------------------------- */
  --color-brand-50:  #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-300: #a5b4fc;
  --color-brand-500: #6366f1;
  /* Channel form of brand-500 for rgba() without hardcoding: rgb(var(--color-brand-500-rgb) / 0.05) */
  --color-brand-500-rgb: 99 102 241;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
  --color-brand-800: #3730a3;
  --color-brand-900: #312e81;

  /* --------------------------------------------------------
   * Semantic colors — used only for status
   * -------------------------------------------------------- */
  --color-success-50:  #ecfdf5;
  --color-success-100: #d1fae5;
  --color-success-500: #10b981;
  --color-success-600: #059669;
  --color-success-700: #047857;

  --color-warning-50:  #fffbeb;
  --color-warning-100: #fef3c7;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;

  --color-danger-50:   #fef2f2;
  --color-danger-100:  #fee2e2;
  --color-danger-500:  #ef4444;
  --color-danger-600:  #dc2626;
  --color-danger-700:  #b91c1c;

  --color-info-50:     #eff6ff;
  --color-info-100:    #dbeafe;
  --color-info-500:    #3b82f6;
  --color-info-600:    #2563eb;
  --color-info-700:    #1d4ed8;

  /* --------------------------------------------------------
   * Surface tokens — semantic aliases
   * -------------------------------------------------------- */
  --surface-page:       var(--color-neutral-50);
  --surface-card:       var(--color-white);
  --surface-sunken:     var(--color-neutral-100);
  --surface-hover:      var(--color-neutral-100);

  --text-primary:       var(--color-neutral-900);
  --text-secondary:     var(--color-neutral-600);
  --text-tertiary:      var(--color-neutral-500);
  --text-brand:         var(--color-brand-700);
  --text-success:       var(--color-success-700);
  --text-warning:       var(--color-warning-700);
  --text-danger:        var(--color-danger-700);

  --border-subtle:      var(--color-neutral-150);
  --border-default:     var(--color-neutral-200);
  --border-strong:      var(--color-neutral-300);
  --border-focus:       var(--color-brand-500);

  /* --------------------------------------------------------
   * Typography
   * -------------------------------------------------------- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Type scale (compact B2B scale, base 14px) */
  --text-xs:   0.75rem;   /* 12 */
  --text-sm:   0.8125rem; /* 13 */
  --text-base: 0.875rem;  /* 14 */
  --text-md:   0.9375rem; /* 15 */
  --text-lg:   1rem;      /* 16 */
  --text-xl:   1.125rem;  /* 18 */
  --text-2xl:  1.375rem;  /* 22 */
  --text-3xl:  1.75rem;   /* 28 */
  --text-4xl:  2.25rem;   /* 36 */

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;

  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --tracking-tight:  -0.015em;
  --tracking-normal: 0;
  --tracking-wide:   0.02em;

  /* --------------------------------------------------------
   * Spacing scale (4px base)
   * -------------------------------------------------------- */
  --space-1:   0.25rem;  /* 4 */
  --space-2:   0.5rem;   /* 8 */
  --space-3:   0.75rem;  /* 12 */
  --space-4:   1rem;     /* 16 */
  --space-5:   1.25rem;  /* 20 */
  --space-6:   1.5rem;   /* 24 */
  --space-8:   2rem;     /* 32 */
  --space-12:  3rem;     /* 48 */

  /* --------------------------------------------------------
   * Radius — hierarchical, not uniform
   * -------------------------------------------------------- */
  --radius-xs:   3px;
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-full: 9999px;

  /* --------------------------------------------------------
   * Shadows — subtle, semantic, not decorative
   * -------------------------------------------------------- */
  --shadow-xs:   0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm:   0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md:   0 4px 8px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg:   0 12px 24px -6px rgba(15, 23, 42, 0.12), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 3px rgb(var(--color-brand-500-rgb) / 0.25);

  /* --------------------------------------------------------
   * Motion
   * -------------------------------------------------------- */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   120ms;
  --duration-base:   180ms;

  /* --------------------------------------------------------
   * Layout constants
   * -------------------------------------------------------- */
  --layout-navbar-height: 56px;
  --layout-sidebar-width: 240px;
  --layout-content-max: 1400px;

  /* Z-index scale (used by navbar/sidebar/toast; reserved for future dropdown/modal) */
  --z-sidebar:  1010;
  --z-navbar:   1020;
  --z-toast:    1050;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
