@tailwind base;
@tailwind components;
@tailwind utilities;

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

@layer base {
  :root {
    /* Main backgrounds - Healthcare blue/grey theme */
    --background: 0 0% 100%;
    --foreground: 224 71.4% 4.1%;
    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;

    --primary: 202 81% 27%; /* Hex: #0A4F7F */
    --primary-foreground: 210 20% 98%;
    
    --secondary: 220 13% 91%;
    --secondary-foreground: 220 14% 10%;

    --muted: 220 13% 91%;
    --muted-foreground: 220 9% 46%;

    --accent: 220 13% 91%;
    --accent-foreground: 220 14% 10%;

    /* Danger/Destructive - Healthcare red */
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 20% 98%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 202 81% 32%; /* Slightly darker for focus */

    /* Success - Healthcare green */
    --success: 158 64% 52%; /* #10B981 */
    --success-foreground: 0 0% 100%;
    
    --warning: 38 92% 50%; /* #F59E0B */
    --warning-foreground: 0 0% 100%;
    
    --info: 216 94% 59%; /* Same as primary */
    --info-foreground: 0 0% 100%;

    /* Prescription paper colors */
    --paper-bg: 60 33% 99%; /* #FFFEF9 - cream/off-white */
    --prescription-text: 210 30% 16%; /* Dark text for prescriptions */

    --radius: 0.75rem;

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;
    
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 224 71.4% 4.1%;
    --foreground: 210 20% 98%;
    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;
    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;
    
    --primary: 202 81% 27%;
    --primary-foreground: 210 20% 98%;
    
    --secondary: 215 28% 17%;
    --secondary-foreground: 210 20% 98%;
    --muted: 215 28% 17%;
    --muted-foreground: 217 10% 65%;
    --accent: 215 28% 17%;
    --accent-foreground: 210 20% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 20% 98%;
    --border: 215 28% 17%;
    --input: 215 28% 17%;
    --ring: 202 81% 32%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground font-inter;
  }

  /* Prescription paper styling */
  .prescription-paper {
    background-color: hsl(var(--paper-bg));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid hsl(var(--border));
  }

  /* Table zebra striping */
  .table-row:nth-child(even) {
    background-color: hsl(var(--muted) / 0.3);
  }

  .table-row:hover {
    background-color: hsl(var(--muted) / 0.6);
  }
}