/* ===========================================
   GESTIOLEX - Design Tokens
   Variabili CSS centralizzate per coerenza UI.
   =========================================== */

:root {
  /* ---- Border Radius ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 20px;
  --radius-full: 50%;

  /* ---- Box Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);

  /* ---- Font Sizes ---- */
  --text-xs: 0.65rem;
  --text-sm: 0.75rem;
  --text-base: 0.85rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;

  /* ---- Spacing ---- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* ---- Transitions ---- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* ---- Brand Colors ---- */
  --brand-primary: #0B5E70;
  --brand-primary-dark: #094a59;
  --brand-primary-light: #0d7a94;
  --brand-primary-rgb: 11, 94, 112;

  /* ---- Semantic Colors ---- */
  --color-success: #198754;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-info: #17a2b8;

  /* ---- Neutrals ---- */
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-200: #dee2e6;
  --gray-300: #ced4da;
  --gray-400: #bcc1c7;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
}

/* ===========================================
   DARK MODE - Token Overrides
   =========================================== */
[data-bs-theme="dark"] {
  /* ---- Box Shadows (piu pronunciati su sfondo scuro) ---- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.5);

  /* ---- Brand Colors (piu chiari per leggibilita) ---- */
  --brand-primary: #4dd0e1;
  --brand-primary-dark: #26c6da;
  --brand-primary-light: #80deea;
  --brand-primary-rgb: 77, 208, 225;

  /* ---- Semantic Colors (piu brillanti su sfondo scuro) ---- */
  --color-success: #75b798;
  --color-warning: #ffda6a;
  --color-danger: #ea868f;
  --color-info: #6edff6;

  /* ---- Neutrals (scala invertita) ---- */
  --gray-50: #1a1d21;
  --gray-100: #212529;
  --gray-200: #2d3339;
  --gray-300: #3d4349;
  --gray-400: #565c63;
  --gray-500: #6c757d;
  --gray-600: #adb5bd;
  --gray-700: #ced4da;
  --gray-800: #e9ecef;
  --gray-900: #f8f9fa;
}

/* Fix globale: Bootstrap .bg-white non si inverte in dark mode */
[data-bs-theme="dark"] .bg-white {
  background-color: var(--bs-body-bg, #212529) !important;
}
