
:root,
:root[data-theme="atlas"] {
  --font-space-grotesk: "Space Grotesk";
  --font-sora: "Sora";
  --font-jetbrains-mono: "JetBrains Mono";
  --font-system: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-system-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-display: var(--font-space-grotesk);
  --font-body: var(--font-sora);
  --font-mono: var(--font-jetbrains-mono);
  --background: 210 36% 97%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 32% 12%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 26% 92%;
  --secondary-foreground: 222 22% 16%;
  --muted: 210 28% 94%;
  --muted-foreground: 222 12% 38%;
  --accent: 188 86% 44%;
  --accent-foreground: 0 0% 98%;
  --border: 210 18% 82%;
  --ring: 188 88% 46%;
  --radius: 1.15rem;
  --shell-bg-start: 210 36% 97%;
  --shell-bg-end: 214 30% 92%;
  --shell-grid: hsl(var(--foreground) / 0.018);
  --shell-grid-strong: hsl(var(--foreground) / 0.05);
  --shell-orb: 188 90% 82%;
  --shell-orb-2: 32 92% 86%;
  --sidebar-bg: 0 0% 100%;
  --sidebar-border: 210 18% 84%;
  --header-bg: 0 0% 100%;
  --header-border: 210 18% 84%;
  --card-shadow: 0 40px 80px -58px rgba(10, 20, 35, 0.26);
  --surface-1: 0 0% 100%;
  --surface-2: 210 30% 96%;
  --surface-3: 210 34% 93%;
  --surface-4: 210 38% 90%;
  --outline-strong: 215 26% 68%;
  --shadow-ambient: 0 42px 86px -62px rgba(12, 20, 32, 0.32);
  --shadow-lifted: 0 30px 68px -44px rgba(12, 20, 32, 0.34);
  --glow-accent: 188 92% 68%;
  --glass-bg: 0 0% 100%;
  --glass-border: 210 20% 84%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 24px 60px -44px rgba(12, 20, 32, 0.26);
  --tremor-background: var(--card);
  --tremor-background-muted: var(--muted);
  --tremor-background-subtle: var(--background);
  --tremor-background-emphasis: var(--primary);
  --tremor-border: var(--border);
  --tremor-ring: var(--border);
  --tremor-brand: var(--accent);
  --tremor-brand-muted: var(--accent);
  --tremor-brand-faint: var(--accent);
  --tremor-brand-subtle: var(--accent);
  --tremor-brand-emphasis: var(--accent);
  --tremor-brand-inverted: var(--primary-foreground);
  --tremor-content: var(--foreground);
  --tremor-content-subtle: var(--muted-foreground);
  --tremor-content-emphasis: var(--foreground);
  --tremor-content-strong: var(--foreground);
  --tremor-content-inverted: var(--primary-foreground);
  --tremor-shadow-card: 0 18px 40px -26px rgba(10, 20, 35, 0.26);
  --tremor-shadow-input: 0 8px 24px -20px rgba(10, 20, 35, 0.2);
  --tremor-shadow-dropdown: 0 26px 54px -28px rgba(10, 20, 35, 0.3);
  --tremor-radius-small: 0.6rem;
  --tremor-radius-default: 1rem;
  --tremor-radius-full: 9999px;
}

:root[data-theme="quartz"] {
  --background: 210 32% 96%;
  --foreground: 224 28% 10%;
  --card: 0 0% 100%;
  --card-foreground: 224 26% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 26% 10%;
  --primary: 224 30% 14%;
  --primary-foreground: 0 0% 98%;
  --secondary: 214 24% 91%;
  --secondary-foreground: 223 20% 16%;
  --muted: 214 26% 94%;
  --muted-foreground: 223 12% 40%;
  --accent: 202 78% 44%;
  --accent-foreground: 0 0% 98%;
  --border: 218 16% 82%;
  --ring: 202 80% 46%;
  --shell-bg-start: 210 32% 96%;
  --shell-bg-end: 214 28% 92%;
  --shell-orb: 202 82% 76%;
  --shell-orb-2: 220 72% 76%;
  --surface-1: 0 0% 100%;
  --surface-2: 214 24% 95%;
  --surface-3: 214 28% 91%;
  --surface-4: 216 30% 88%;
  --glass-bg: 0 0% 100%;
  --glass-border: 218 16% 82%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 22px 50px -32px rgba(12, 20, 32, 0.24);
  --tremor-background: var(--card);
  --tremor-background-muted: var(--muted);
  --tremor-background-subtle: var(--background);
  --tremor-background-emphasis: var(--primary);
  --tremor-border: var(--border);
  --tremor-ring: var(--border);
  --tremor-brand: var(--accent);
  --tremor-brand-muted: var(--accent);
  --tremor-brand-faint: var(--accent);
  --tremor-brand-subtle: var(--accent);
  --tremor-brand-emphasis: var(--accent);
  --tremor-brand-inverted: var(--primary-foreground);
  --tremor-content: var(--foreground);
  --tremor-content-subtle: var(--muted-foreground);
  --tremor-content-emphasis: var(--foreground);
  --tremor-content-strong: var(--foreground);
  --tremor-content-inverted: var(--primary-foreground);
  --tremor-shadow-card: 0 8px 24px -18px rgba(10, 20, 35, 0.25);
  --tremor-shadow-input: 0 1px 2px rgba(10, 20, 35, 0.06);
  --tremor-shadow-dropdown: 0 18px 32px -18px rgba(10, 20, 35, 0.28);
  --tremor-radius-small: 0.6rem;
  --tremor-radius-default: 0.9rem;
  --tremor-radius-full: 9999px;
}

:root[data-theme="canopy"] {
  --background: 34 40% 94%;
  --foreground: 24 30% 12%;
  --card: 0 0% 100%;
  --card-foreground: 24 28% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 24 28% 12%;
  --primary: 24 32% 16%;
  --primary-foreground: 0 0% 98%;
  --secondary: 32 28% 89%;
  --secondary-foreground: 24 22% 18%;
  --muted: 32 28% 92%;
  --muted-foreground: 24 14% 40%;
  --accent: 142 40% 36%;
  --accent-foreground: 0 0% 98%;
  --border: 30 18% 80%;
  --ring: 142 38% 38%;
  --shell-bg-start: 34 40% 94%;
  --shell-bg-end: 30 32% 90%;
  --shell-orb: 142 44% 66%;
  --shell-orb-2: 36 84% 72%;
  --surface-1: 0 0% 100%;
  --surface-2: 32 28% 93%;
  --surface-3: 32 30% 89%;
  --surface-4: 32 32% 86%;
  --glass-bg: 0 0% 100%;
  --glass-border: 30 18% 80%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 22px 48px -32px rgba(24, 20, 12, 0.26);
  --tremor-background: var(--card);
  --tremor-background-muted: var(--muted);
  --tremor-background-subtle: var(--background);
  --tremor-background-emphasis: var(--primary);
  --tremor-border: var(--border);
  --tremor-ring: var(--border);
  --tremor-brand: var(--accent);
  --tremor-brand-muted: var(--accent);
  --tremor-brand-faint: var(--accent);
  --tremor-brand-subtle: var(--accent);
  --tremor-brand-emphasis: var(--accent);
  --tremor-brand-inverted: var(--primary-foreground);
  --tremor-content: var(--foreground);
  --tremor-content-subtle: var(--muted-foreground);
  --tremor-content-emphasis: var(--foreground);
  --tremor-content-strong: var(--foreground);
  --tremor-content-inverted: var(--primary-foreground);
  --tremor-shadow-card: 0 8px 24px -18px rgba(10, 20, 35, 0.25);
  --tremor-shadow-input: 0 1px 2px rgba(10, 20, 35, 0.06);
  --tremor-shadow-dropdown: 0 18px 32px -18px rgba(10, 20, 35, 0.28);
  --tremor-radius-small: 0.6rem;
  --tremor-radius-default: 0.9rem;
  --tremor-radius-full: 9999px;
}

:root[data-theme="social"] {
  --font-display: var(--font-system);
  --font-body: var(--font-system);
  --font-mono: var(--font-system-mono);
  --background: 220 16% 95%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 30% 10%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 14% 90%;
  --secondary-foreground: 222 24% 14%;
  --muted: 220 14% 92%;
  --muted-foreground: 222 10% 38%;
  --accent: 214 89% 52%;
  --accent-foreground: 0 0% 100%;
  --border: 220 12% 85%;
  --ring: 214 89% 52%;
  --radius: 0.85rem;
  --shell-bg-start: 220 16% 95%;
  --shell-bg-end: 220 16% 95%;
  --shell-grid: transparent;
  --shell-grid-strong: transparent;
  --shell-orb: 214 89% 72%;
  --shell-orb-2: 214 89% 72%;
  --sidebar-bg: 0 0% 100%;
  --sidebar-border: 220 12% 86%;
  --header-bg: 214 89% 52%;
  --header-border: 214 89% 42%;
  --glass-bg: 0 0% 100%;
  --glass-border: 220 12% 86%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 30px -24px rgba(0, 0, 0, 0.18);
  --tremor-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 30px -24px rgba(0, 0, 0, 0.18);
  --tremor-shadow-input: 0 1px 2px rgba(0, 0, 0, 0.06);
  --tremor-shadow-dropdown: 0 20px 60px -34px rgba(0, 0, 0, 0.28);
  --tremor-radius-small: 0.5rem;
  --tremor-radius-default: 0.75rem;
}

:root[data-theme="network"] {
  --font-display: var(--font-system);
  --font-body: var(--font-system);
  --font-mono: var(--font-system-mono);
  --background: 40 20% 96%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 30% 10%;
  --primary-foreground: 0 0% 100%;
  --secondary: 40 14% 92%;
  --secondary-foreground: 222 24% 14%;
  --muted: 40 14% 94%;
  --muted-foreground: 222 10% 38%;
  --accent: 208 91% 40%;
  --accent-foreground: 0 0% 100%;
  --border: 210 16% 84%;
  --ring: 208 91% 40%;
  --radius: 0.6rem;
  --shell-bg-start: 40 20% 96%;
  --shell-bg-end: 40 20% 96%;
  --shell-grid: transparent;
  --shell-grid-strong: transparent;
  --shell-orb: 208 91% 62%;
  --shell-orb-2: 198 90% 66%;
  --sidebar-bg: 0 0% 100%;
  --sidebar-border: 210 16% 84%;
  --header-bg: 0 0% 100%;
  --header-border: 208 91% 40%;
  --glass-bg: 0 0% 100%;
  --glass-border: 210 16% 84%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 28px -24px rgba(0, 0, 0, 0.16);
  --tremor-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 28px -24px rgba(0, 0, 0, 0.16);
  --tremor-shadow-input: 0 1px 2px rgba(0, 0, 0, 0.06);
  --tremor-shadow-dropdown: 0 24px 64px -36px rgba(0, 0, 0, 0.24);
  --tremor-radius-small: 0.45rem;
  --tremor-radius-default: 0.65rem;
}

:root[data-theme="enterprise"] {
  --font-display: var(--font-system);
  --font-body: var(--font-system);
  --font-mono: var(--font-system-mono);
  --background: 210 20% 98%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 30% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 14% 92%;
  --secondary-foreground: 222 24% 14%;
  --muted: 210 14% 95%;
  --muted-foreground: 222 10% 40%;
  --accent: 35 92% 50%;
  --accent-foreground: 222 30% 10%;
  --border: 214 18% 84%;
  --ring: 35 92% 50%;
  --radius: 0.25rem;
  --shell-bg-start: 210 20% 98%;
  --shell-bg-end: 210 20% 98%;
  --shell-orb: 35 92% 60%;
  --shell-orb-2: 35 92% 60%;
  --sidebar-bg: 0 0% 100%;
  --sidebar-border: 214 18% 84%;
  --header-bg: 0 0% 100%;
  --header-border: 214 18% 84%;
  --glass-bg: 0 0% 100%;
  --glass-border: 214 18% 84%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: none;
  --tremor-shadow-card: none;
  --tremor-shadow-input: none;
  --tremor-shadow-dropdown: 0 18px 40px -28px rgba(15, 23, 42, 0.22);
  --tremor-radius-small: 0.25rem;
  --tremor-radius-default: 0.35rem;
}

:root[data-theme="assistant"] {
  --font-display: var(--font-system);
  --font-body: var(--font-system);
  --font-mono: var(--font-system-mono);
  --background: 210 20% 97%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 30% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 18% 93%;
  --secondary-foreground: 222 24% 14%;
  --muted: 210 18% 95%;
  --muted-foreground: 222 10% 40%;
  --accent: 160 84% 35%;
  --accent-foreground: 0 0% 100%;
  --border: 214 18% 85%;
  --ring: 160 84% 35%;
  --radius: 1.2rem;
  --shell-bg-start: 210 20% 97%;
  --shell-bg-end: 210 20% 96%;
  --shell-grid: transparent;
  --shell-grid-strong: transparent;
  --shell-orb: 160 84% 54%;
  --shell-orb-2: 152 84% 60%;
  --sidebar-bg: 210 16% 94%;
  --sidebar-border: 214 18% 85%;
  --header-bg: 210 20% 97%;
  --header-border: 214 18% 85%;
  --glass-bg: 0 0% 100%;
  --glass-border: 214 18% 85%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 20px 56px -46px rgba(0, 0, 0, 0.18);
  --tremor-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06), 0 20px 56px -46px rgba(0, 0, 0, 0.18);
  --tremor-shadow-input: 0 1px 2px rgba(0, 0, 0, 0.06);
  --tremor-shadow-dropdown: 0 26px 70px -40px rgba(0, 0, 0, 0.22);
  --tremor-radius-small: 0.85rem;
  --tremor-radius-default: 1.2rem;
}

:root[data-theme="noir"] {
  --color-scheme: dark;
  --font-body: var(--font-jetbrains-mono);
  --background: 222 28% 6%;
  --foreground: 210 24% 96%;
  --card: 222 22% 10%;
  --card-foreground: 210 24% 96%;
  --popover: 222 22% 10%;
  --popover-foreground: 210 24% 96%;
  --primary: 210 24% 96%;
  --primary-foreground: 222 28% 8%;
  --secondary: 222 18% 14%;
  --secondary-foreground: 210 24% 96%;
  --muted: 222 16% 12%;
  --muted-foreground: 217 12% 70%;
  --accent: 152 84% 52%;
  --accent-foreground: 222 28% 8%;
  --border: 222 18% 18%;
  --ring: 152 84% 52%;
  --radius: 1.1rem;
  --shell-bg-start: 222 28% 6%;
  --shell-bg-end: 226 26% 10%;
  --shell-grid: hsl(var(--foreground) / 0.04);
  --shell-grid-strong: hsl(var(--foreground) / 0.1);
  --shell-orb: 152 84% 52%;
  --shell-orb-2: 196 92% 56%;
  --sidebar-bg: 222 22% 10%;
  --sidebar-border: 222 18% 18%;
  --header-bg: 222 22% 10%;
  --header-border: 222 18% 18%;
  --card-shadow: 0 42px 90px -64px rgba(0, 0, 0, 0.72);
  --surface-1: 222 22% 10%;
  --surface-2: 222 20% 12%;
  --surface-3: 222 18% 14%;
  --surface-4: 222 16% 18%;
  --outline-strong: 216 10% 52%;
  --shadow-ambient: 0 46px 100px -70px rgba(0, 0, 0, 0.78);
  --shadow-lifted: 0 30px 70px -46px rgba(0, 0, 0, 0.74);
  --glow-accent: 152 84% 60%;
  --glass-bg: 222 22% 10%;
  --glass-border: 222 18% 18%;
  --glass-highlight: 210 24% 96%;
  --glass-shadow: 0 26px 70px -52px rgba(0, 0, 0, 0.72);
  --tremor-shadow-card: 0 16px 36px -24px rgba(0, 0, 0, 0.6);
  --tremor-shadow-input: 0 10px 26px -20px rgba(0, 0, 0, 0.62);
  --tremor-shadow-dropdown: 0 26px 64px -34px rgba(0, 0, 0, 0.66);
}

:root[data-theme="brutal"] {
  --font-display: var(--font-jetbrains-mono);
  --font-body: var(--font-jetbrains-mono);
  --background: 48 60% 96%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 30% 10%;
  --primary-foreground: 48 60% 96%;
  --secondary: 48 34% 88%;
  --secondary-foreground: 222 30% 10%;
  --muted: 48 40% 92%;
  --muted-foreground: 222 14% 34%;
  --accent: 24 98% 54%;
  --accent-foreground: 222 30% 10%;
  --border: 222 30% 10%;
  --ring: 24 98% 54%;
  --radius: 0.35rem;
  --shell-bg-start: 48 60% 96%;
  --shell-bg-end: 48 46% 92%;
  --shell-grid: hsl(var(--foreground) / 0.06);
  --shell-grid-strong: hsl(var(--foreground) / 0.14);
  --shell-orb: 24 98% 54%;
  --shell-orb-2: 196 92% 52%;
  --sidebar-bg: 0 0% 100%;
  --sidebar-border: 222 30% 10%;
  --header-bg: 0 0% 100%;
  --header-border: 222 30% 10%;
  --card-shadow: 12px 12px 0 rgba(15, 23, 42, 0.16);
  --surface-1: 0 0% 100%;
  --surface-2: 48 46% 94%;
  --surface-3: 48 44% 90%;
  --surface-4: 48 40% 86%;
  --outline-strong: 222 30% 10%;
  --shadow-ambient: 12px 12px 0 rgba(15, 23, 42, 0.16);
  --shadow-lifted: 16px 16px 0 rgba(15, 23, 42, 0.18);
  --glow-accent: 24 98% 60%;
  --glass-bg: 0 0% 100%;
  --glass-border: 222 30% 10%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 14px 14px 0 rgba(15, 23, 42, 0.16);
  --tremor-shadow-card: 12px 12px 0 rgba(15, 23, 42, 0.16);
  --tremor-shadow-input: 8px 8px 0 rgba(15, 23, 42, 0.14);
  --tremor-shadow-dropdown: 16px 16px 0 rgba(15, 23, 42, 0.18);
  --tremor-radius-small: 0.25rem;
  --tremor-radius-default: 0.35rem;
}

:root[data-theme="prism"] {
  --font-display: var(--font-space-grotesk);
  --font-body: var(--font-sora);
  --background: 210 44% 97%;
  --foreground: 222 30% 10%;
  --card: 0 0% 100%;
  --card-foreground: 222 30% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 30% 10%;
  --primary: 222 32% 12%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 26% 92%;
  --secondary-foreground: 222 22% 16%;
  --muted: 210 28% 94%;
  --muted-foreground: 222 12% 38%;
  --accent: 196 92% 52%;
  --accent-foreground: 0 0% 98%;
  --border: 210 18% 82%;
  --ring: 196 92% 52%;
  --radius: 1.4rem;
  --shell-bg-start: 210 44% 97%;
  --shell-bg-end: 214 36% 92%;
  --shell-grid: hsl(var(--foreground) / 0.016);
  --shell-grid-strong: hsl(var(--foreground) / 0.055);
  --shell-orb: 196 92% 72%;
  --shell-orb-2: 12 92% 72%;
  --card-shadow: 0 44px 92px -62px rgba(10, 20, 35, 0.26);
  --surface-1: 0 0% 100%;
  --surface-2: 210 30% 96%;
  --surface-3: 210 34% 93%;
  --surface-4: 210 38% 90%;
  --outline-strong: 215 26% 68%;
  --shadow-ambient: 0 46px 100px -70px rgba(10, 20, 35, 0.3);
  --shadow-lifted: 0 34px 78px -52px rgba(10, 20, 35, 0.32);
  --glow-accent: 196 92% 68%;
  --glass-bg: 0 0% 100%;
  --glass-border: 210 20% 84%;
  --glass-highlight: 0 0% 100%;
  --glass-shadow: 0 28px 70px -52px rgba(12, 20, 32, 0.24);
  --tremor-shadow-card: 0 18px 44px -28px rgba(10, 20, 35, 0.26);
  --tremor-shadow-dropdown: 0 30px 70px -34px rgba(10, 20, 35, 0.3);
  --tremor-radius-small: 0.75rem;
  --tremor-radius-default: 1.15rem;
}

@layer base {
  * {
    box-sizing: border-box;
    border-color: hsl(var(--border));
  }

  html {
    color-scheme: var(--color-scheme, light);
  }

  body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    background-image:
      radial-gradient(920px 520px at 8% -10%, hsl(var(--shell-orb) / 0.2), transparent 60%),
      radial-gradient(900px 520px at 100% -4%, hsl(var(--shell-orb-2) / 0.18), transparent 60%),
      linear-gradient(180deg, hsl(var(--shell-bg-start)), hsl(var(--shell-bg-end)));
    background-attachment: fixed;
  }

  h1 {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    text-transform: none;
  }

  h2,
  h3,
  h4 {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

:root[data-theme="social"] body,
:root[data-theme="network"] body,
:root[data-theme="assistant"] body,
:root[data-theme="enterprise"] body {
  background-image: none;
}

:root[data-theme="enterprise"] {
  font-size: 14px;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(1000px 560px at 10% -18%, hsl(var(--shell-orb) / 0.2), transparent 62%),
    radial-gradient(980px 560px at 95% -4%, hsl(var(--shell-orb-2) / 0.18), transparent 62%),
    linear-gradient(180deg, hsl(var(--shell-bg-start)), hsl(var(--shell-bg-end)));
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--shell-grid) 1px, transparent 0),
    radial-gradient(circle at 1px 1px, var(--shell-grid-strong) 1px, transparent 0),
    linear-gradient(180deg, transparent, hsl(var(--background) / 0.65));
  background-size: 36px 36px, 72px 72px, auto;
  opacity: 0.6;
  pointer-events: none;
}

.pattern-grid {
  background-image:
    linear-gradient(var(--shell-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--shell-grid-strong) 1px, transparent 1px);
  background-size: 48px 48px;
}

.glass-card {
  background: linear-gradient(160deg, hsl(var(--glass-bg) / 0.92), hsl(var(--surface-2) / 0.9));
  border: 1px solid hsl(var(--glass-border) / 0.8);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

:root[data-theme="brutal"] .glass-card,
:root[data-theme="brutal"] .shell-sidebar,
:root[data-theme="brutal"] .shell-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:root[data-theme="brutal"] .glass-card {
  background: hsl(var(--card));
  border-width: 2px;
}

:root[data-theme="brutal"] .shell-sidebar {
  background: hsl(var(--card));
  border-right-width: 2px;
}

:root[data-theme="brutal"] .shell-header {
  background: hsl(var(--card));
  border-bottom-width: 2px;
}

:root[data-theme="social"] .app-shell,
:root[data-theme="network"] .app-shell {
  background: hsl(var(--background));
}

:root[data-theme="assistant"] .app-shell {
  background:
    radial-gradient(1200px 520px at 10% -12%, hsl(var(--accent) / 0.08), transparent 62%),
    radial-gradient(900px 520px at 96% -6%, hsl(var(--accent) / 0.06), transparent 62%),
    hsl(var(--background));
}

:root[data-theme="enterprise"] .app-shell {
  background:
    repeating-linear-gradient(
      90deg,
      hsl(var(--foreground) / 0.03) 0,
      hsl(var(--foreground) / 0.03) 1px,
      transparent 1px,
      transparent 56px
    ),
    repeating-linear-gradient(
      0deg,
      hsl(var(--foreground) / 0.03) 0,
      hsl(var(--foreground) / 0.03) 1px,
      transparent 1px,
      transparent 56px
    ),
    linear-gradient(180deg, hsl(var(--background)), hsl(var(--background)));
}

:root[data-theme="social"] .app-shell::before,
:root[data-theme="network"] .app-shell::before,
:root[data-theme="assistant"] .app-shell::before,
:root[data-theme="enterprise"] .app-shell::before {
  opacity: 0;
}

:root[data-theme="social"] .surface-glow,
:root[data-theme="network"] .surface-glow,
:root[data-theme="assistant"] .surface-glow,
:root[data-theme="enterprise"] .surface-glow {
  display: none;
}

:root[data-theme="social"] .glass-card,
:root[data-theme="network"] .glass-card,
:root[data-theme="assistant"] .glass-card,
:root[data-theme="enterprise"] .glass-card,
:root[data-theme="social"] .shell-sidebar,
:root[data-theme="network"] .shell-sidebar,
:root[data-theme="assistant"] .shell-sidebar,
:root[data-theme="enterprise"] .shell-sidebar,
:root[data-theme="social"] .shell-header,
:root[data-theme="network"] .shell-header,
:root[data-theme="assistant"] .shell-header,
:root[data-theme="enterprise"] .shell-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:root[data-theme="social"] .glass-card,
:root[data-theme="network"] .glass-card,
:root[data-theme="assistant"] .glass-card,
:root[data-theme="enterprise"] .glass-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--tremor-shadow-card);
}

:root[data-theme="social"] .shell-sidebar,
:root[data-theme="network"] .shell-sidebar,
:root[data-theme="assistant"] .shell-sidebar,
:root[data-theme="enterprise"] .shell-sidebar,
:root[data-theme="social"] .shell-header,
:root[data-theme="network"] .shell-header,
:root[data-theme="assistant"] .shell-header,
:root[data-theme="enterprise"] .shell-header {
  background: hsl(var(--sidebar-bg));
  border-color: hsl(var(--sidebar-border));
  box-shadow: var(--tremor-shadow-card);
}

:root[data-theme="social"] .shell-header,
:root[data-theme="network"] .shell-header,
:root[data-theme="assistant"] .shell-header,
:root[data-theme="enterprise"] .shell-header {
  background: hsl(var(--header-bg));
  border-bottom-color: hsl(var(--header-border));
}

:root[data-theme="social"] .shell-header {
  box-shadow: none;
  color: #ffffff;
}

:root[data-theme="social"] .shell-header .text-muted-foreground {
  color: rgba(255, 255, 255, 0.8);
}

:root[data-theme="network"] .shell-header {
  box-shadow: none;
  border-bottom-width: 3px;
}

:root[data-theme="assistant"] .shell-header {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

:root[data-theme="enterprise"] .shell-header,
:root[data-theme="enterprise"] .shell-sidebar {
  box-shadow: none;
}

:root[data-theme="enterprise"] .shell-pill {
  background: hsl(var(--secondary));
  box-shadow: none;
}

.surface-glow {
  position: absolute;
  inset: -200px -120px auto auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, hsl(var(--shell-orb) / 0.25), transparent 70%);
  filter: blur(22px);
  opacity: 0.45;
}

.surface-glow.secondary {
  inset: auto auto -240px -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, hsl(var(--shell-orb-2) / 0.25), transparent 70%);
  opacity: 0.35;
}

.fade-stagger {
  animation: fade-up 0.6s ease both;
  animation-delay: var(--delay, 0s);
}

.shell-sidebar {
  background: hsl(var(--sidebar-bg) / 0.86);
  border-right: 1px solid hsl(var(--sidebar-border) / 0.7);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
}

.shell-header {
  background: hsl(var(--header-bg) / 0.86);
  border-bottom: 1px solid hsl(var(--header-border) / 0.7);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
}

.shell-pill {
  border: 1px solid hsl(var(--sidebar-border) / 0.7);
  background: hsl(var(--secondary) / 0.7);
  color: hsl(var(--secondary-foreground));
  box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.45);
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@layer utilities {
  .bg-tremor-background {
    background-color: hsl(var(--tremor-background));
  }
  .bg-tremor-background-muted {
    background-color: hsl(var(--tremor-background-muted));
  }
  .bg-tremor-background-subtle {
    background-color: hsl(var(--tremor-background-subtle));
  }
  .bg-tremor-background-emphasis {
    background-color: hsl(var(--tremor-background-emphasis));
  }
  .bg-tremor-brand {
    background-color: hsl(var(--tremor-brand));
  }
  .bg-tremor-brand-muted {
    background-color: hsl(var(--tremor-brand-muted) / 0.16);
  }
  .bg-tremor-brand-faint {
    background-color: hsl(var(--tremor-brand-faint) / 0.12);
  }
  .bg-tremor-brand-subtle {
    background-color: hsl(var(--tremor-brand-subtle) / 0.2);
  }
  .bg-tremor-brand-emphasis {
    background-color: hsl(var(--tremor-brand-emphasis));
  }
  .bg-tremor-border {
    background-color: hsl(var(--tremor-border));
  }
  .bg-tremor-content-subtle {
    background-color: hsl(var(--tremor-content-subtle));
  }
  .text-tremor-content {
    color: hsl(var(--tremor-content));
  }
  .text-tremor-content-default {
    color: hsl(var(--tremor-content));
  }
  .text-tremor-content-subtle {
    color: hsl(var(--tremor-content-subtle));
  }
  .text-tremor-content-emphasis {
    color: hsl(var(--tremor-content-emphasis));
  }
  .text-tremor-content-strong {
    color: hsl(var(--tremor-content-strong));
  }
  .text-tremor-content-inverted {
    color: hsl(var(--tremor-content-inverted));
  }
  .text-tremor-default {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: hsl(var(--tremor-content));
  }
  .text-tremor-title {
    font-size: 1rem;
    line-height: 1.5rem;
    color: hsl(var(--tremor-content-strong));
  }
  .text-tremor-metric {
    font-size: 1.5rem;
    line-height: 2rem;
    color: hsl(var(--tremor-content-strong));
  }
  .text-tremor-label {
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: hsl(var(--tremor-content-subtle));
  }
  .text-tremor-brand {
    color: hsl(var(--tremor-brand));
  }
  .text-tremor-brand-emphasis {
    color: hsl(var(--tremor-brand-emphasis));
  }
  .text-tremor-brand-inverted {
    color: hsl(var(--tremor-brand-inverted));
  }
  .border-tremor-border {
    border-color: hsl(var(--tremor-border));
  }
  .border-tremor-brand {
    border-color: hsl(var(--tremor-brand));
  }
  .border-tremor-brand-subtle {
    border-color: hsl(var(--tremor-brand-subtle) / 0.4);
  }
  .border-tremor-brand-emphasis {
    border-color: hsl(var(--tremor-brand-emphasis));
  }
  .border-tremor-brand-inverted {
    border-color: hsl(var(--tremor-brand-inverted));
  }
  .border-tremor-background {
    border-color: hsl(var(--tremor-background));
  }
  .border-tremor-content {
    border-color: hsl(var(--tremor-content));
  }
  .ring-tremor-ring {
    --tw-ring-color: hsl(var(--tremor-ring));
  }
  .ring-tremor-brand {
    --tw-ring-color: hsl(var(--tremor-brand));
  }
  .ring-tremor-brand-muted {
    --tw-ring-color: hsl(var(--tremor-brand-muted) / 0.35);
  }
  .ring-tremor-brand-inverted {
    --tw-ring-color: hsl(var(--tremor-brand-inverted));
  }
  .shadow-tremor-card {
    box-shadow: var(--tremor-shadow-card);
  }
  .shadow-tremor-input {
    box-shadow: var(--tremor-shadow-input);
  }
  .shadow-tremor-dropdown {
    box-shadow: var(--tremor-shadow-dropdown);
  }
  .rounded-tremor-small {
    border-radius: var(--tremor-radius-small);
  }
  .rounded-tremor-default {
    border-radius: var(--tremor-radius-default);
  }
  .rounded-tremor-full {
    border-radius: var(--tremor-radius-full);
  }
}
