@import url('https://fonts.cristianobleve.com/aeonik/stylesheet.css');

/* =================================================
   Il Carrubo Design System
   Professional Dark Theme - Inspired by Fintech UI
   ================================================= */

   
:root {
  /* ======== Radius - More rounded, modern feel ======== */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ======== Colors - Professional Dark Theme ======== 
     Near-black background with refined blue accent
  */
  
  /* Base - Almost black background */
  --background: 0 0% 4%;
  --foreground: 0 0% 95%;

  /* Card - Slightly elevated from background */
  --card: 0 0% 7%;
  --card-foreground: 0 0% 95%;

  /* Popover/Dropdown */
  --popover: 0 0% 9%;
  --popover-foreground: 0 0% 95%;

  /* Primary - Professional deep blue (less saturated, more serious) */
  --primary: 217 71% 45%;
  --primary-foreground: 0 0% 100%;

  /* Primary variants for hover/active states */
  --primary-hover: 217 71% 38%;
  --primary-active: 217 71% 30%;
  --primary-muted: 217 40% 18%;

  /* Secondary - Neutral dark */
  --secondary: 220 10% 12%;
  --secondary-foreground: 0 0% 85%;

  /* Muted - For secondary text and backgrounds */
  --muted: 220 10% 14%;
  --muted-foreground: 0 0% 55%;

  /* Accent - Slightly lighter/different from primary for better contrast */
  --accent: 220 15% 15%;
  --accent-foreground: 0 0% 95%;

  /* Destructive - Red for errors */
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;

  /* Success - Green */
  --success: 152 69% 45%;
  --success-foreground: 0 0% 100%;

  /* Warning - Amber */
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 7%;

  /* Info - Blue (matching primary) */
  --info: 217 71% 50%;
  --info-foreground: 0 0% 100%;

  /* Borders & Inputs - Subtle, refined */
  --border: 220 10% 18%;
  --input: 220 10% 12%;
  --ring: 217 71% 45%;

  /* ======== Gradient Accents ======== */
  --gradient-primary: linear-gradient(135deg, hsl(217 71% 35%) 0%, hsl(217 71% 50%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(220 10% 10%) 0%, hsl(220 10% 6%) 100%);
  --gradient-subtle: linear-gradient(180deg, hsl(220 10% 8%) 0%, hsl(0 0% 4%) 100%);

  /* ======== Glow Effects ======== */
  --glow-primary: 0 0 20px hsl(217 71% 45% / 0.25);
  --glow-accent: 0 0 15px hsl(217 50% 40% / 0.15);

  /* ======== Shadows - Refined, subtle depth ======== */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 2px 4px 0 rgb(0 0 0 / 0.35), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 8px 16px -4px rgb(0 0 0 / 0.45), 0 4px 8px -4px rgb(0 0 0 / 0.35);
  --shadow-xl: 0 16px 32px -8px rgb(0 0 0 / 0.5), 0 8px 16px -8px rgb(0 0 0 / 0.4);
  --shadow-2xl: 0 24px 48px -12px rgb(0 0 0 / 0.6);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.3);
  --shadow-glow: 0 0 20px hsl(217 71% 45% / 0.15);

  /* ======== Typography ======== */
  --font-sans: 'Figtree', 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'IBM Plex Sans', 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ======== Spacing (matching Tailwind scale) ======== */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ======== 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);

  /* ======== Z-Index Scale ======== */
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ======== Light Theme Override ======== */
body.light,
:root[data-theme="light"] {
  --background: 0 0% 98%;
  --foreground: 220 15% 10%;

  --card: 0 0% 100%;
  --card-foreground: 220 15% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 220 15% 10%;

  --primary: 217 71% 40%;
  --primary-foreground: 0 0% 100%;

  --primary-hover: 217 71% 35%;
  --primary-active: 217 71% 28%;

  --secondary: 220 10% 94%;
  --secondary-foreground: 220 15% 15%;

  --muted: 220 10% 94%;
  --muted-foreground: 220 10% 45%;

  /* Accent - Light gray for hover, testo scuro */
  --accent: 220 10% 92%;
  --accent-foreground: 220 15% 10%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --success: 152 69% 40%;
  --success-foreground: 0 0% 100%;

  --border: 220 13% 88%;
  --input: 220 13% 91%;
  --ring: 217 71% 40%;

  /* Light shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --shadow-glow: 0 0 15px hsl(217 71% 40% / 0.1);
}

/* =================================================
   Helper Functions - HSL Color Usage
   Usage: hsl(var(--primary))
   ================================================= */

/* =================================================
   Animation Keyframes
   ================================================= */
@keyframes shadcn-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shadcn-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes shadcn-slide-in-from-top {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes shadcn-slide-in-from-bottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes shadcn-slide-in-from-left {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes shadcn-slide-in-from-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes shadcn-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes shadcn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shadcn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shadcn-bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
