OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
@import "tailwindcss";
@import "react-grid-layout/css/styles.css";
@import "@fontsource-variable/inter";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@custom-variant light (&:is(.light *));
@custom-variant system (&:is(.system *));
body {
@apply m-0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
:root {
/* Core colors converted from HSL to OKLCH using convert-to-oklch tool */
--highlight: oklch(55.1% 0.21 262); /* hsl(220, 84%, 53%) -> #2266ec */
/* def- color scale converted from HSL to OKLCH */
--def-100: oklch(98.4% 0 248); /* hsl(210, 40%, 98%) -> #F0F4F9 */
--def-200: oklch(96.8% 0 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
--def-300: oklch(91.7% 0 248); /* hsl(210, 15.14%, 89.41%) -> #DDE3E9 */
--def-400: oklch(80.3% 0 248); /* hsl(210, 9.08%, 75.05%) -> #B3BDC7 */
/* foregroundish converted from HSL to OKLCH */
--foregroundish: oklch(34.4% 0 273); /* hsl(226.49, 3.06%, 22.62%) */
--background: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
--foreground: oklch(13.7% 0.04 259); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--card: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
--card-foreground: oklch(
13.7% 0.04 259
); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--popover: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
--popover-foreground: oklch(
13.7% 0.04 259
); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--primary: oklch(20.8% 0.04 266); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--primary-foreground: oklch(98.4% 0 248); /* hsl(210, 40%, 98%) -> #F0F4F9 */
--secondary: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
--secondary-foreground: oklch(
20.8% 0.04 266
); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--muted: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
--muted-foreground: oklch(
55.5% 0.04 257
); /* hsl(215.4, 16.3%, 46.9%) -> #798290 */
--accent: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
--accent-foreground: oklch(
20.8% 0.04 266
); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--destructive: oklch(63.7% 0.21 25.3); /* hsl(0, 84.2%, 60.2%) -> #F2677D */
--destructive-foreground: oklch(
96.9% 0.02 17.4
); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
--border: oklch(92.9% 0.01 256); /* hsl(214.3, 31.8%, 91.4%) -> #E8EBF1 */
--input: oklch(92.9% 0.01 256); /* hsl(214.3, 31.8%, 91.4%) -> #E8EBF1 */
--ring: oklch(86.9% 0.02 253); /* hsl(212.73, 26.83%, 83.92%) -> #CDD6E2 */
/* Chart colors converted to OKLCH for consistency */
--chart-0: oklch(54.6% 0.22 263); /* #2563EB */
--chart-1: oklch(72.2% 0.17 33.7); /* #ff7557 */
--chart-2: oklch(84.7% 0.09 188); /* #7fe1d8 */
--chart-3: oklch(82.9% 0.15 82); /* #f8bc3c */
--chart-4: oklch(57.8% 0.12 6.72); /* #b3596e */
--chart-5: oklch(77.3% 0.11 241); /* #72bef4 */
--chart-6: oklch(82.5% 0.12 56.4); /* #ffb27a */
--chart-7: oklch(55.3% 0.1 226); /* #0f7ea0 */
--chart-8: oklch(65.8% 0.13 159); /* #3ba974 */
--chart-9: oklch(85.1% 0.08 27.5); /* #febbb2 */
--chart-10: oklch(71.1% 0.15 320); /* #cb80dc */
--chart-11: oklch(72.1% 0.09 188); /* #5cb7af */
--chart-12: oklch(58.7% 0.24 286); /* #7856ff */
--radius: 0.5rem;
/* Bklit chart tokens — single-series defaults pick OpenPanel brand palette.
We deliberately do NOT redefine --chart-1..5 (OpenPanel uses them as a 13-color
fixed palette via --chart-0..12); for multi-series charts we always pass
explicit colors via getChartColor(i). */
--chart-background: var(--card);
--chart-foreground: var(--foreground);
--chart-foreground-muted: var(--muted-foreground);
--chart-line-primary: var(--chart-0);
--chart-line-secondary: var(--chart-1);
--chart-crosshair: oklch(from var(--foreground) l c h / 0.4);
--chart-grid: var(--border);
/* Slightly see-through so the chart's blur shows, opaque enough to read over bright series. */
--chart-tooltip-background: oklch(from var(--card) l c h / 0.9);
--chart-tooltip-foreground: var(--foreground);
--chart-tooltip-muted: var(--muted-foreground);
--chart-marker-background: var(--def-100);
--chart-marker-border: var(--border);
--chart-marker-foreground: var(--foreground);
/* Notification-pill style: high-contrast against the marker circle. Auto-
adapts to light/dark via the foreground/background tokens. Without
these the SVG <circle> / <text> in MarkerGroup fall back to black on
black and the count badge renders as a black dot. */
--chart-marker-badge-background: var(--foreground);
--chart-marker-badge-foreground: var(--background);
--chart-ring-background: oklch(from var(--foreground) l c h / 0.12);
--chart-label: var(--muted-foreground);
--chart-scale-01: color-mix(in oklab, var(--chart-0) 8%, var(--card));
--chart-scale-02: color-mix(in oklab, var(--chart-0) 28%, var(--card));
--chart-scale-03: color-mix(in oklab, var(--chart-0) 50%, var(--card));
--chart-scale-04: color-mix(in oklab, var(--chart-0) 75%, var(--card));
--chart-scale-05: var(--chart-0);
--chart-scale-pattern-color: var(--def-100);
--legend: var(--card);
--legend-foreground: var(--foreground);
--legend-muted: var(--def-100);
--legend-muted-foreground: var(--muted-foreground);
--legend-track: var(--def-200);
}
.dark {
/* Core colors converted from HSL to OKLCH for dark mode using convert-to-oklch tool */
--highlight: oklch(61.3% 0.21 263); /* hsl(221.44, 100%, 62.04%) */
/* def- color scale converted from HSL to OKLCH for dark mode */
--def-100: oklch(19.3% 0 0); /* hsl(0, 0%, 8%) -> #0f0f0f */
--def-200: oklch(25% 0 0); /* hsl(0, 0%, 13.12%) -> #212121 */
--def-300: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--def-400: oklch(37.3% 0 0); /* hsl(0, 0%, 25.23%) -> #404040 */
--foregroundish: oklch(86.3% 0 0); /* #d4d4d4 */
--background: oklch(23.8% 0 0); /* hsl(0, 0%, 12.02%) -> #1e1e1e */
--foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--card: oklch(21.6% 0 0); /* hsl(0, 0%, 10%) -> #1a1a1a */
--card-foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--popover: oklch(21.6% 0 0); /* hsl(0, 0%, 10%) -> #1a1a1a */
--popover-foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--primary: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--primary-foreground: oklch(22.9% 0 0); /* hsl(0, 0%, 11.2%) -> #1c1c1c */
--secondary: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--secondary-foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--muted: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--muted-foreground: oklch(72.4% 0 0); /* hsl(0, 0%, 65%) */
--accent: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--accent-foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--destructive: oklch(63.7% 0.21 25.3); /* hsl(0, 84.2%, 60.2%) -> #F2677D */
--destructive-foreground: oklch(
96.9% 0.02 17.4
); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
--border: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--input: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--ring: oklch(87.6% 0 0); /* hsl(0, 0%, 83.9%) -> #d6d6d6 */
}
@theme {
--font-sans:
"Inter Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* The dashboard's type scale. `sm` is the default for almost everything
(body, inputs, buttons); `3xs` is for uppercase micro labels and table
headers, `2xs` for captions and percentages beside 13px text, `xs` for
dense tables, `xl` for h1 and sheet/modal titles. Larger steps keep
Tailwind's defaults for display numbers. */
--text-3xs: 10px;
--text-3xs--line-height: 14px;
--text-2xs: 11px;
--text-2xs--line-height: 16px;
--text-xs: 12px;
--text-xs--line-height: 16px;
--text-sm: 13px;
--text-sm--line-height: 20px;
--text-base: 14px;
--text-base--line-height: 20px;
--text-lg: 16px;
--text-lg--line-height: 24px;
--text-xl: 20px;
--text-xl--line-height: 28px;
/* Sidebar rows: a touch smaller and lighter than body text; the fractional
weight needs the variable font. */
--text-nav: 13px;
--text-nav--line-height: 20px;
--text-nav--letter-spacing: -0.06px;
--text-nav--font-weight: 480;
/* Color variables */
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
/* Extended chart colors */
--color-chart-0: var(--chart-0);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-chart-6: var(--chart-6);
--color-chart-7: var(--chart-7);
--color-chart-8: var(--chart-8);
--color-chart-9: var(--chart-9);
--color-chart-10: var(--chart-10);
--color-chart-11: var(--chart-11);
--color-chart-12: var(--chart-12);
/* Additional colors */
--color-highlight: var(--highlight);
--color-foregroundish: var(--foregroundish);
/* def color scale - properly defined for all variants */
--color-def-100: var(--def-100);
--color-def-200: var(--def-200);
--color-def-300: var(--def-300);
--color-def-400: var(--def-400);
/* Radius variables */
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
/* Sidebar colors */
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
@layer base {
* {
@apply border-border outline-ring/50;
scrollbar-width: thin;
scrollbar-color: oklch(from var(--foreground) l c h / 0.18) transparent;
}
body {
@apply bg-background text-foreground;
}
/* Monospace reads a step larger than Inter, so code sits one size below body text. */
code,
kbd,
samp,
pre {
@apply text-xs;
}
.h1 {
@apply text-xl font-semibold;
}
.h2 {
@apply text-lg font-medium;
}
.h3 {
@apply text-base font-medium;
}
.h4 {
@apply font-medium;
}
.ellipsis {
@apply overflow-hidden text-ellipsis whitespace-nowrap;
}
.heading {
@apply text-xl font-semibold;
}
.title {
@apply text-lg font-semibold;
}
.subtitle {
@apply text-base font-medium;
}
.card {
@apply rounded-md border border-border bg-card;
}
}
@utility center-center {
@apply flex items-center justify-center text-center;
}
@utility col {
@apply flex flex-col;
}
@utility row {
@apply flex flex-row;
}
@utility text-text {
@apply text-foreground;
}
@utility scrollbar-hidden {
&::-webkit-scrollbar {
display: none;
}
}
button {
@apply cursor-pointer;
}
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
/* Thin scrollbar, visible on hover - "the small little nice thingy" */
.scrollbar-thin {
scrollbar-width: thin;
scrollbar-color: transparent transparent;
}
.scrollbar-thin:hover {
scrollbar-color: var(--color-border) transparent;
}
.scrollbar-thin::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
background: transparent;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 9999px;
transition: background 0.15s ease;
}
.scrollbar-thin:hover::-webkit-scrollbar-thumb,
.scrollbar-thin:active::-webkit-scrollbar-thumb {
background: var(--color-border);
}
/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
/*
* Shimmer text — used in the chat to signal that an AI step is in
* flight (tool call running, model thinking). The gradient sweeps
* left-to-right; `background-clip: text` makes the moving gradient
* visible only inside the text glyphs.
*/
@keyframes op-shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.op-shimmer {
background-image: linear-gradient(
90deg,
var(--color-muted-foreground) 0%,
var(--color-foreground) 50%,
var(--color-muted-foreground) 100%
);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
animation: op-shimmer 2.2s linear infinite;
}
/* Custom slow pulse animation */
@keyframes slow-pulse {
0%,
100% {
opacity: 0.5;
}
50% {
opacity: 1;
}
}
.animate-slow-pulse {
animation: slow-pulse 4s ease-in-out infinite;
}
/* Floating element animations */
@keyframes float-1 {
0%,
100% {
transform: scale(1);
opacity: 0.3;
}
50% {
transform: scale(1.2);
opacity: 0.6;
}
}
@keyframes float-2 {
0%,
100% {
transform: scale(1.2);
opacity: 0.4;
}
50% {
transform: scale(1);
opacity: 0.7;
}
}
.animate-float-1 {
animation: float-1 4s ease-in-out infinite;
}
.animate-float-2 {
animation: float-2 3.5s ease-in-out infinite;
animation-delay: 1s;
}
/* Slow ping animation for success modal */
@keyframes ping-slow {
75%,
100% {
transform: scale(1.2);
opacity: 0;
}
}
.animate-ping-slow {
animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
/* Realtime feeds: a new row pushes the list down as it grows in, no measuring needed */
@keyframes live-feed-in {
from {
margin-top: calc(-1 * (1.75rem + 0.25rem));
opacity: 0;
transform: translateY(-4px);
}
to {
margin-top: 0;
opacity: 1;
transform: translateY(0);
}
}
.animate-live-feed-in {
animation: live-feed-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scrollarea {
position: relative;
width: 100%;
height: 300px; /* set any height */
overflow: hidden; /* hide native scrollbars */
}
.scrollarea-content {
height: 100%;
width: 100%;
overflow-y: scroll;
padding-right: 16px; /* preserve space for custom scrollbar */
scrollbar-width: none; /* hide Firefox scrollbar */
}
.scrollarea-content::-webkit-scrollbar {
width: 8px; /* size of custom scrollbar */
}
.scrollarea-content::-webkit-scrollbar-track {
background: transparent; /* no visible track, like shadcn */
}
.scrollarea-content::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 9999px; /* fully rounded */
transition: background 0.2s;
}
.scrollarea-content:hover::-webkit-scrollbar-thumb,
.scrollarea-content:active::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.4); /* darken on hover/scroll */
}
/* Scroll-driven animation for sticky header */
@keyframes sticky-shadow {
0% {
box-shadow: none;
border-bottom-color: transparent;
border-bottom-width: 1px;
background-color: transparent;
}
100% {
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
border-bottom-color: var(--color-border);
border-bottom-width: 1px;
background-color: var(--color-def-100);
}
}
.sticky-header {
position: sticky;
top: 0;
z-index: 10;
border-bottom: 1px solid transparent;
animation: sticky-shadow linear both;
animation-timeline: scroll();
animation-range: 0 1px;
}
@theme inline {
--color-chart-background: var(--chart-background);
--color-chart-foreground: var(--chart-foreground);
--color-chart-foreground-muted: var(--chart-foreground-muted);
--color-chart-crosshair: var(--chart-crosshair);
--color-chart-grid: var(--chart-grid);
--color-chart-tooltip-background: var(--chart-tooltip-background);
--color-chart-tooltip-foreground: var(--chart-tooltip-foreground);
--color-chart-tooltip-muted: var(--chart-tooltip-muted);
--color-chart-marker-background: var(--chart-marker-background);
--color-chart-marker-border: var(--chart-marker-border);
--color-chart-marker-foreground: var(--chart-marker-foreground);
--color-chart-ring-background: var(--chart-ring-background);
--color-chart-label: var(--chart-label);
}
/* Dashboard grid: only tiles making room animate; the one under the pointer
follows it 1:1. */
.react-grid-item.cssTransforms {
transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}
.react-grid-item.react-draggable-dragging,
.react-grid-item.resizing {
transition: none;
}
.react-grid-item.react-grid-placeholder {
background: color-mix(in oklch, var(--primary) 8%, transparent);
opacity: 1;
border: 1px solid var(--primary);
border-radius: var(--radius);
transition: transform 100ms cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
.react-grid-item.cssTransforms,
.react-grid-item.react-grid-placeholder {
transition: none;
}
}
/* While a tile moves, nothing under the pointer reacts: no chart tooltips,
no hover states, no text selection. The gesture itself runs on document
listeners, so the tiles need no pointer events until it ends.
`data-gesture` is set once a drag passes its threshold; the library marks
the tile as dragging on mouse-down, which would swallow a click on the title. */
[data-gesture] .react-grid-item > * {
pointer-events: none;
user-select: none;
}
html:has([data-gesture] .react-grid-item.react-draggable-dragging),
[data-gesture] .react-grid-item.react-draggable-dragging {
cursor: grabbing;
}
/* The dragged tile lifts off the grid. */
[data-gesture] .react-grid-item.react-draggable-dragging > * {
transform: scale(1.02);
box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.35);
transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
[data-gesture] .react-grid-item.react-draggable-dragging > * {
transform: none;
}
}
/* Edges resize along one axis through invisible 8px strips; the corners keep
the library's grip. */
.react-grid-item > .react-resizable-handle.react-resizable-handle-n,
.react-grid-item > .react-resizable-handle.react-resizable-handle-s,
.react-grid-item > .react-resizable-handle.react-resizable-handle-e,
.react-grid-item > .react-resizable-handle.react-resizable-handle-w {
margin: 0;
transform: none;
background: none;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-n::after,
.react-grid-item > .react-resizable-handle.react-resizable-handle-s::after,
.react-grid-item > .react-resizable-handle.react-resizable-handle-e::after,
.react-grid-item > .react-resizable-handle.react-resizable-handle-w::after {
display: none;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-n,
.react-grid-item > .react-resizable-handle.react-resizable-handle-s {
left: 20px;
right: 20px;
width: auto;
height: 8px;
cursor: ns-resize;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-n {
top: -4px;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-s {
bottom: -4px;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-e,
.react-grid-item > .react-resizable-handle.react-resizable-handle-w {
top: 20px;
bottom: 20px;
width: 8px;
height: auto;
cursor: ew-resize;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-e {
right: -4px;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-w {
left: -4px;
}
/* While resizing, the chart keeps its starting size (dimmed and clipped) and
the tile shows the size it will snap to. */
.react-grid-item.resizing {
overflow: hidden;
}
.react-grid-item.resizing [data-tile-body] {
opacity: 0.5;
}
.react-grid-item.resizing[data-tile-size]::after {
content: attr(data-tile-size);
position: absolute;
right: 12px;
bottom: 12px;
padding: 2px 8px;
border-radius: 9999px;
background: var(--foreground);
color: var(--background);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: 12px;
font-weight: 600;
pointer-events: none;
}