/**
 * Design Tokens - Life Tracker by Bonn
 * Design System v2.0
 *
 * Generato da ui-designer skill
 * Data: 2026-01-31
 *
 * RATIONALE DELLE SCELTE:
 *
 * PALETTE:
 * - Primary (Teal): Colore associato a calma, salute e fiducia nel settore healthcare.
 *   Ispirato a Headspace, Calm e app wellness moderne. Evita il blu generico.
 * - Secondary (Coral/Warm): Colore energetico ma non aggressivo, perfetto per
 *   motivazione e gamification (badge, streak). Complementare al teal.
 * - Accent (Amber): Per highlight e azioni importanti, evoca energia positiva.
 *
 * TIPOGRAFIA:
 * - Heading: "Plus Jakarta Sans" - Geometric sans moderna, friendly ma professionale.
 *   Più carattere di Inter/Roboto, ottima leggibilità, adatta a target 25-45.
 * - Body: "DM Sans" - Pulito, leggibile, complementare a Plus Jakarta Sans.
 *   Ottimo per dati e numeri (tabular figures disponibili).
 *
 * RIFERIMENTI:
 * - Headspace: approccio friendly, colori soft
 * - Calm: spazi ampi, visual language sereno
 * - Oscar Health: interfaccia medica ma approachable
 * - Modern wellness dashboards: card-based, data visualization chiara
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ===========================================
     COLORS - Primary (Teal - Salute & Calma)
     =========================================== */
  --color-primary-50: #F0FDFA;
  --color-primary-100: #CCFBF1;
  --color-primary-200: #99F6E4;
  --color-primary-300: #5EEAD4;
  --color-primary-400: #2DD4BF;
  --color-primary-500: #14B8A6;  /* Colore principale */
  --color-primary-600: #0D9488;
  --color-primary-700: #0F766E;
  --color-primary-800: #115E59;
  --color-primary-900: #134E4A;

  /* ===========================================
     COLORS - Secondary (Coral - Energia & Motivazione)
     =========================================== */
  --color-secondary-50: #FFF5F5;
  --color-secondary-100: #FFE4E6;
  --color-secondary-200: #FECDD3;
  --color-secondary-300: #FDA4AF;
  --color-secondary-400: #FB7185;
  --color-secondary-500: #F43F5E;  /* Rose/Coral */
  --color-secondary-600: #E11D48;
  --color-secondary-700: #BE123C;
  --color-secondary-800: #9F1239;
  --color-secondary-900: #881337;

  /* ===========================================
     COLORS - Accent (Amber - Highlight & Azione)
     =========================================== */
  --color-accent-50: #FFFBEB;
  --color-accent-100: #FEF3C7;
  --color-accent-200: #FDE68A;
  --color-accent-300: #FCD34D;
  --color-accent-400: #FBBF24;
  --color-accent-500: #F59E0B;
  --color-accent-600: #D97706;
  --color-accent-700: #B45309;
  --color-accent-800: #92400E;
  --color-accent-900: #78350F;

  /* ===========================================
     COLORS - Semantic
     =========================================== */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-success-dark: #059669;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-warning-dark: #D97706;
  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-error-dark: #DC2626;
  --color-info: #0EA5E9;
  --color-info-light: #E0F2FE;
  --color-info-dark: #0284C7;

  /* ===========================================
     COLORS - Neutrals (Warm Gray - Non freddo)
     =========================================== */
  --color-white: #FFFFFF;
  --color-black: #0F0F0F;

  --color-gray-50: #FAFAF9;   /* Background chiaro */
  --color-gray-100: #F5F5F4;
  --color-gray-200: #E7E5E4;  /* Bordi, dividers */
  --color-gray-300: #D6D3D1;
  --color-gray-400: #A8A29E;  /* Placeholder text */
  --color-gray-500: #78716C;  /* Secondary text */
  --color-gray-600: #57534E;
  --color-gray-700: #44403C;  /* Body text */
  --color-gray-800: #292524;
  --color-gray-900: #1C1917;  /* Headings */

  /* ===========================================
     COLORS - Surfaces (Light Mode)
     =========================================== */
  --color-background: #FAFAF9;
  --color-background-alt: #F5F5F4;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #FFFFFF;
  --color-surface-overlay: rgba(255, 255, 255, 0.95);

  /* ===========================================
     COLORS - Feature Specific
     =========================================== */
  /* Weight */
  --color-weight-gain: #EF4444;
  --color-weight-loss: #10B981;
  --color-weight-neutral: #78716C;

  /* Heart Rate */
  --color-heart: #F43F5E;
  --color-heart-light: #FFE4E6;

  /* Sleep */
  --color-sleep: #6366F1;
  --color-sleep-light: #E0E7FF;

  /* Steps */
  --color-steps: #22C55E;
  --color-steps-light: #DCFCE7;

  /* Calories */
  --color-calories: #F97316;
  --color-calories-light: #FFEDD5;

  /* Water */
  --color-water: #0EA5E9;
  --color-water-light: #E0F2FE;

  /* Blood Pressure */
  --color-blood-pressure: #8B5CF6;
  --color-blood-pressure-light: #EDE9FE;

  /* ===========================================
     TYPOGRAPHY - Font Families
     =========================================== */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* ===========================================
     TYPOGRAPHY - Font Sizes
     =========================================== */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* ===========================================
     TYPOGRAPHY - Font Weights
     =========================================== */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* ===========================================
     TYPOGRAPHY - Line Heights
     =========================================== */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ===========================================
     TYPOGRAPHY - Letter Spacing
     =========================================== */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===========================================
     SPACING
     =========================================== */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;   /* 2px */
  --space-1: 0.25rem;      /* 4px */
  --space-1-5: 0.375rem;   /* 6px */
  --space-2: 0.5rem;       /* 8px */
  --space-2-5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;      /* 12px */
  --space-3-5: 0.875rem;   /* 14px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-9: 2.25rem;      /* 36px */
  --space-10: 2.5rem;      /* 40px */
  --space-11: 2.75rem;     /* 44px */
  --space-12: 3rem;        /* 48px */
  --space-14: 3.5rem;      /* 56px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */

  /* ===========================================
     BORDER RADIUS
     =========================================== */
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-default: 0.375rem; /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.25rem;   /* 20px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ===========================================
     SHADOWS (Soft, non aggressive)
     =========================================== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.15);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.03);
  --shadow-none: 0 0 #0000;

  /* Colored shadows for interactive elements */
  --shadow-primary: 0 4px 14px -2px rgb(20 184 166 / 0.25);
  --shadow-primary-lg: 0 10px 25px -3px rgb(20 184 166 / 0.3);
  --shadow-secondary: 0 4px 14px -2px rgb(244 63 94 / 0.25);
  --shadow-accent: 0 4px 14px -2px rgb(245 158 11 / 0.25);

  /* ===========================================
     TRANSITIONS
     =========================================== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Specific transitions */
  --transition-colors: color, background-color, border-color, fill, stroke var(--transition-fast);
  --transition-opacity: opacity var(--transition-fast);
  --transition-shadow: box-shadow var(--transition-fast);
  --transition-transform: transform var(--transition-normal);
  --transition-all: all var(--transition-normal);

  /* ===========================================
     Z-INDEX
     =========================================== */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* ===========================================
     COMPONENT-SPECIFIC TOKENS
     =========================================== */
  /* Cards */
  --card-padding: var(--space-6);
  --card-radius: var(--radius-2xl);
  --card-shadow: var(--shadow-md);
  --card-border: 1px solid var(--color-gray-200);

  /* Buttons */
  --btn-padding-x: var(--space-5);
  --btn-padding-y: var(--space-3);
  --btn-radius: var(--radius-xl);
  --btn-font-weight: var(--font-semibold);

  /* Inputs */
  --input-padding-x: var(--space-4);
  --input-padding-y: var(--space-3);
  --input-radius: var(--radius-lg);
  --input-border: 2px solid var(--color-gray-200);
  --input-focus-ring: 0 0 0 3px rgb(20 184 166 / 0.15);

  /* Navigation */
  --nav-height: 64px;
  --nav-height-mobile: 56px;

  /* ===========================================
     LEGACY COLORS (Gradual Migration)
     Questi colori sono usati nel codice esistente
     e verranno gradualmente sostituiti con i nuovi
     =========================================== */
  --color-legacy-purple-light: #667eea;
  --color-legacy-purple-dark: #764ba2;
  --color-legacy-gradient: linear-gradient(135deg, var(--color-legacy-purple-light), var(--color-legacy-purple-dark));
  --color-legacy-gradient-90: linear-gradient(90deg, var(--color-legacy-purple-light), var(--color-legacy-purple-dark), var(--color-legacy-purple-light));
}


/* ===========================================
   BASE STYLES
   =========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-700);
  background-color: var(--color-background);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-gray-900);
  margin: 0;
}

h1 { font-size: var(--text-4xl); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-3xl); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: var(--font-semibold); }

p {
  margin: 0;
  color: var(--color-gray-600);
}

a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-700);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-primary-100);
  color: var(--color-primary-900);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

/* Code */
code, pre {
  font-family: var(--font-mono);
}
