/* Graphite Glass dark theme override.
   Loaded after the production bundle; scoped to .dark so the light theme stays unchanged. */

.dark {
  --background: 216 17% 7%;
  --foreground: 210 18% 92%;

  --card: 214 18% 12%;
  --card-foreground: 210 18% 92%;
  --card-border: 214 12% 23%;

  --popover: 216 18% 10%;
  --popover-foreground: 210 18% 92%;
  --popover-border: 214 12% 24%;

  --primary: 0 0% 96%;
  --primary-foreground: 216 17% 7%;
  --primary-border: hsl(0 0% 96% / .55);

  --secondary: 214 16% 15%;
  --secondary-foreground: 210 14% 82%;
  --secondary-border: hsl(214 10% 24% / .65);

  --muted: 214 14% 14%;
  --muted-foreground: 213 10% 64%;
  --muted-border: hsl(214 10% 24% / .55);

  --accent: 0 0% 96%;
  --accent-foreground: 216 17% 7%;
  --accent-border: hsl(0 0% 92% / .45);

  --destructive: 3 73% 64%;
  --destructive-foreground: 0 0% 98%;
  --destructive-border: hsl(3 73% 64% / .35);

  --border: 214 10% 22%;
  --input: 214 14% 14%;
  --ring: 0 0% 92%;

  --button-outline: hsl(214 10% 28% / .7);
  --badge-outline: hsl(214 10% 28% / .7);

  --sidebar-bg: 216 18% 8%;

  --cold-accent: 0 0% 82%;
  --cold-accent-2: 0 0% 70%;
  --warm-accent: 28 78% 58%;
  --signal-accent: 28 78% 58%;

  --glass-surface: 214 17% 13%;
  --glass-surface-strong: 214 18% 16%;
  --glass-highlight: 0 0% 96%;
  --glass-rim: 0 0% 72%;
  --glass-frost: 0 0% 96%;

  --ambient-bg-1: 216 18% 9%;
  --ambient-bg-2: 216 17% 7%;
  --ambient-bg-3: 218 16% 6%;
}

.dark body:before {
  background:
    linear-gradient(115deg, hsl(0 0% 100% / .05), transparent 32%),
    linear-gradient(230deg, hsl(var(--warm-accent) / .04), transparent 42%),
    radial-gradient(105% 72% at 24% -15%, hsl(0 0% 100% / .08), transparent 44%),
    radial-gradient(82% 66% at 92% 8%, hsl(0 0% 100% / .035), transparent 43%),
    linear-gradient(180deg, hsl(var(--ambient-bg-1)), hsl(var(--ambient-bg-2)) 58%, hsl(var(--ambient-bg-3)));
}

.dark body:after {
  opacity: .38;
  background:
    linear-gradient(90deg, hsl(0 0% 100% / .025) 1px, transparent 1px),
    linear-gradient(180deg, hsl(0 0% 100% / .018) 1px, transparent 1px);
}

.dark .sidebar-item.active {
  background: linear-gradient(180deg, hsl(0 0% 100% / .14), hsl(0 0% 100% / .08)) !important;
  color: hsl(0 0% 98%) !important;
  box-shadow:
    inset 0 1px hsl(0 0% 100% / .16),
    0 10px 24px hsl(220 18% 3% / .22) !important;
}

.dark .sidebar-item.active:before {
  background: hsl(0 0% 96%) !important;
}

.dark .bg-primary {
  background-color: hsl(0 0% 96% / .92) !important;
  color: hsl(216 17% 7%) !important;
}

.dark .text-primary {
  color: hsl(0 0% 94%) !important;
}

.dark .border-border,
.dark .border-card-border,
.dark .border-popover-border {
  border-color: hsl(214 10% 24% / .55) !important;
}

.dark .bg-card,
.dark .bg-secondary\/20,
.dark .bg-secondary\/30,
.dark .bg-popover {
  background-color: hsl(214 17% 13% / .74) !important;
}

.dark .glass,
.dark .glass-material-small,
.dark .glass-material-medium,
.dark .glass-material-large {
  border-color: hsl(0 0% 100% / .12) !important;
  box-shadow:
    inset 0 1px hsl(0 0% 100% / .08),
    0 18px 48px hsl(220 20% 3% / .34) !important;
}

.dark a,
.dark button {
  --tw-ring-color: hsl(0 0% 96% / .35);
}
