/* Quba AdminApp Theme - OKLCH Color Space
 * Deep Teal accent (#0F766E / #2DD4BF)
 * Error Red (#DC2626 / #F87171)
 * Neutral Slate system
 */

/* Box-sizing override only. No global margin/padding reset here:
 * Tailwind preflight already normalizes spacing, and a second universal
 * nuke zeroes component internals (sidebar, dialogs, cards) that rely on
 * their own padding. Spacing comes from utilities in app.css. */
*, :after, :before, ::backdrop {
    box-sizing: border-box;
}

:root {
  --background: oklch(0.985 0.005 240);
  --foreground: oklch(0.145 0.02 240);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0.02 240);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0.02 240);

  --primary: oklch(0.505 0.11 180); /* #0F766E Deep Teal */
  --primary-foreground: oklch(0.985 0 0);

  --secondary: oklch(0.95 0.01 240);
  --secondary-foreground: oklch(0.205 0.02 240);

  --muted: oklch(0.95 0.01 240);
  --muted-foreground: oklch(0.45 0.02 240);

  --accent: oklch(0.95 0.01 240);
  --accent-foreground: oklch(0.505 0.11 180);

  --destructive: oklch(0.577 0.245 27.325); /* #DC2626 Red */
  --destructive-foreground: oklch(1 0 0);

  --border: oklch(0.90 0.01 240);
  --input: oklch(0.90 0.01 240);
  --ring: oklch(0.505 0.11 180);

  --radius: 0;

  /* Teal chart spectrum */
  --chart-1: oklch(0.505 0.11 180);
  --chart-2: oklch(0.58 0.12 180);
  --chart-3: oklch(0.68 0.13 180);
  --chart-4: oklch(0.78 0.12 180);
  --chart-5: oklch(0.88 0.09 180);

  /* Sidebar variables */
  --sidebar-background: oklch(0.985 0.005 240);
  --sidebar-foreground: oklch(0.25 0.02 240);
  --sidebar-primary: oklch(0.505 0.11 180);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.94 0.015 180);
  --sidebar-accent-foreground: oklch(0.505 0.11 180);
  --sidebar-border: oklch(0.90 0.01 240);
  --sidebar-ring: oklch(0.505 0.11 180);

  /* One-Color Alert overrides (Teal / Slate / Red)
   * NOTE: *-foreground is body text on the tinted *-bg (used by BbToast),
   * so it must contrast with the bg: dark text on light tint here. */
  --alert-success: oklch(0.505 0.11 180);
  --alert-success-foreground: oklch(0.32 0.09 180);
  --alert-success-bg: oklch(0.96 0.03 180);

  --alert-info: oklch(0.45 0.02 240);
  --alert-info-foreground: oklch(0.25 0.02 240);
  --alert-info-bg: oklch(0.96 0.01 240);

  --alert-warning: oklch(0.45 0.02 240);
  --alert-warning-foreground: oklch(0.25 0.02 240);
  --alert-warning-bg: oklch(0.96 0.01 240);

  --alert-danger: oklch(0.577 0.245 27.325);
  --alert-danger-foreground: oklch(0.44 0.21 27);
  --alert-danger-bg: oklch(0.96 0.03 27);
  --success: oklch(0.596 0.145 163.225);  /* emerald-600 */
  --success-foreground: oklch(0.985 0 0);
  --warning: oklch(0.666 0.179 58.318);   /* amber-600 */
  --warning-foreground: oklch(0.145 0.02 240);
  --info: oklch(0.546 0.245 262.881);     /* blue-600 */
  --info-foreground: oklch(0.985 0 0);
  --scrim: oklch(0 0 0);                  /* modal backdrop, opacity via bg-scrim/NN */
}

.dark {
  --background: oklch(0.12 0.02 240);
  --foreground: oklch(0.90 0.01 240);

  --card: oklch(0.18 0.02 240);
  --card-foreground: oklch(0.90 0.01 240);

  --popover: oklch(0.18 0.02 240);
  --popover-foreground: oklch(0.90 0.01 240);

  --primary: oklch(0.79 0.13 180); /* #2DD4BF Teal */
  --primary-foreground: oklch(0.12 0.02 240);

  --secondary: oklch(0.22 0.02 240);
  --secondary-foreground: oklch(0.90 0.01 240);

  --muted: oklch(0.22 0.02 240);
  --muted-foreground: oklch(0.65 0.02 240);

  --accent: oklch(0.22 0.02 240);
  --accent-foreground: oklch(0.79 0.13 180);

  --destructive: oklch(0.68 0.20 25); /* #F87171 Red */
  --destructive-foreground: oklch(0.12 0.02 240);

  --border: oklch(0.24 0.02 240);
  --input: oklch(0.24 0.02 240);
  --ring: oklch(0.79 0.13 180);

  --chart-1: oklch(0.79 0.13 180);
  --chart-2: oklch(0.70 0.13 180);
  --chart-3: oklch(0.60 0.12 180);
  --chart-4: oklch(0.50 0.11 180);
  --chart-5: oklch(0.40 0.09 180);

  /* Sidebar variables */
  --sidebar-background: oklch(0.12 0.02 240);
  --sidebar-foreground: oklch(0.85 0.01 240);
  --sidebar-primary: oklch(0.79 0.13 180);
  --sidebar-primary-foreground: oklch(0.12 0.02 240);
  --sidebar-accent: oklch(0.20 0.03 180);
  --sidebar-accent-foreground: oklch(0.79 0.13 180);
  --sidebar-border: oklch(0.24 0.02 240);
  --sidebar-ring: oklch(0.79 0.13 180);

  /* Alert colors dark — light text on dark tinted bg for contrast */
  --alert-success: oklch(0.79 0.13 180);
  --alert-success-foreground: oklch(0.92 0.04 180);
  --alert-success-bg: oklch(0.20 0.03 180);

  --alert-info: oklch(0.65 0.02 240);
  --alert-info-foreground: oklch(0.90 0.01 240);
  --alert-info-bg: oklch(0.20 0.01 240);

  --alert-warning: oklch(0.65 0.02 240);
  --alert-warning-foreground: oklch(0.90 0.01 240);
  --alert-warning-bg: oklch(0.20 0.01 240);

  --alert-danger: oklch(0.68 0.20 25);
  --alert-danger-foreground: oklch(0.92 0.05 25);
  --alert-danger-bg: oklch(0.20 0.03 25);
  --success: oklch(0.765 0.177 163.223);  /* emerald-400 */
  --success-foreground: oklch(0.12 0.02 240);
  --warning: oklch(0.828 0.189 84.429);   /* amber-400 */
  --warning-foreground: oklch(0.12 0.02 240);
  --info: oklch(0.809 0.105 251.813);     /* blue-300 */
  --info-foreground: oklch(0.12 0.02 240);
  --scrim: oklch(0 0 0);
}
