| 1 | @import 'tailwindcss'; |
| 2 | |
| 3 | @plugin 'tailwindcss-animate'; |
| 4 | |
| 5 | @custom-variant dark (&:is([data-kb-theme="dark"] *)); |
| 6 | |
| 7 | @utility container { |
| 8 | margin-inline: auto; |
| 9 | padding-inline: 1.25rem; |
| 10 | @media (width >= --theme(--breakpoint-sm)) { |
| 11 | max-width: none; |
| 12 | } |
| 13 | @media (width >= 1280px) { |
| 14 | max-width: 1280px; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | @theme { |
| 19 | --font-sans: |
| 20 | ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', |
| 21 | sans-serif; |
| 22 | |
| 23 | --color-border: hsl(var(--border)); |
| 24 | --color-input: hsl(var(--input)); |
| 25 | --color-ring: hsl(var(--ring)); |
| 26 | --color-background: hsl(var(--background)); |
| 27 | --color-foreground: hsl(var(--foreground)); |
| 28 | |
| 29 | --color-primary: hsl(var(--primary)); |
| 30 | --color-primary-foreground: hsl(var(--primary-foreground)); |
| 31 | |
| 32 | --color-secondary: hsl(var(--secondary)); |
| 33 | --color-secondary-foreground: hsl(var(--secondary-foreground)); |
| 34 | |
| 35 | --color-destructive: hsl(var(--destructive)); |
| 36 | --color-destructive-foreground: hsl(var(--destructive-foreground)); |
| 37 | |
| 38 | --color-muted: hsl(var(--muted)); |
| 39 | --color-muted-foreground: hsl(var(--muted-foreground)); |
| 40 | |
| 41 | --color-accent: hsl(var(--accent)); |
| 42 | --color-accent-foreground: hsl(var(--accent-foreground)); |
| 43 | |
| 44 | --color-popover: hsl(var(--popover)); |
| 45 | --color-popover-foreground: hsl(var(--popover-foreground)); |
| 46 | |
| 47 | --color-card: hsl(var(--card)); |
| 48 | --color-card-foreground: hsl(var(--card-foreground)); |
| 49 | |
| 50 | --color-success: hsl(var(--success)); |
| 51 | --color-warning: hsl(var(--warning)); |
| 52 | --color-info: hsl(var(--info)); |
| 53 | |
| 54 | --color-sidebar: hsl(var(--sidebar)); |
| 55 | --color-sidebar-foreground: hsl(var(--sidebar-foreground)); |
| 56 | |
| 57 | |
| 58 | --radius-3xl: calc(var(--radius) + 12px); |
| 59 | --radius-2xl: calc(var(--radius) + 8px); |
| 60 | --radius-xl: calc(var(--radius) + 4px); |
| 61 | --radius-lg: var(--radius); |
| 62 | --radius-md: calc(var(--radius) - 2px); |
| 63 | --radius-sm: calc(var(--radius) - 4px); |
| 64 | |
| 65 | --animate-fade-up: fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 66 | --animate-accordion-down: accordion-down 0.25s cubic-bezier(0.16, 1, 0.3, 1); |
| 67 | --animate-accordion-up: accordion-up 0.25s cubic-bezier(0.16, 1, 0.3, 1); |
| 68 | |
| 69 | @keyframes fade-up { |
| 70 | from { |
| 71 | opacity: 0; |
| 72 | transform: translateY(8px); |
| 73 | } |
| 74 | to { |
| 75 | opacity: 1; |
| 76 | transform: translateY(0); |
| 77 | } |
| 78 | } |
| 79 | @keyframes accordion-down { |
| 80 | from { |
| 81 | height: 0; |
| 82 | } |
| 83 | to { |
| 84 | height: var(--kb-collapsible-content-height); |
| 85 | } |
| 86 | } |
| 87 | @keyframes accordion-up { |
| 88 | from { |
| 89 | height: var(--kb-collapsible-content-height); |
| 90 | } |
| 91 | to { |
| 92 | height: 0; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | @layer base { |
| 106 | *, |
| 107 | ::after, |
| 108 | ::before, |
| 109 | ::backdrop, |
| 110 | ::file-selector-button { |
| 111 | border-color: var(--color-gray-200, currentcolor); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | @utility focus-ring { |
| 116 | @apply focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/75 focus-visible:ring-offset-1 focus-visible:ring-offset-background; |
| 117 | } |
| 118 | |
| 119 | @utility topbar-control { |
| 120 | @apply border border-border/70 bg-transparent text-muted-foreground transition-colors hover:border-border hover:bg-muted/60 hover:text-foreground; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | @utility topbar-ai-control { |
| 125 | color: #fff; |
| 126 | background-image: linear-gradient(to right, #7c3aed, #4f46e5, #7c3aed); |
| 127 | border: 1px solid rgb(129 140 248 / 0.5); |
| 128 | box-shadow: 0 0 20px rgb(99 102 241 / 0.35); |
| 129 | @apply transition-[filter,box-shadow,transform] hover:brightness-110 hover:shadow-[0_0_24px_rgb(99_102_241_/_0.5)]; |
| 130 | } |
| 131 | |
| 132 | @utility data-shell { |
| 133 | @apply rounded-lg border border-border bg-card shadow-sm; |
| 134 | } |
| 135 | |
| 136 | @utility data-table-wrap { |
| 137 | @apply isolate max-h-[65vh] overflow-auto rounded-lg border border-border bg-card; |
| 138 | } |
| 139 | |
| 140 | @utility data-table { |
| 141 | @apply w-full caption-bottom text-sm; |
| 142 | |
| 143 | & thead { |
| 144 | @apply sticky top-0 z-20 border-b border-border/80 text-muted-foreground; |
| 145 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 146 | } |
| 147 | |
| 148 | & th { |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | @apply h-11 overflow-hidden text-ellipsis whitespace-nowrap px-3 text-xs font-medium tracking-normal text-muted-foreground first:pl-4 last:pr-4; |
| 154 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 155 | } |
| 156 | |
| 157 | & td { |
| 158 | |
| 159 | @apply whitespace-nowrap px-3 py-3 align-middle text-sm font-normal text-foreground tabular-nums first:pl-4 last:pr-4; |
| 160 | } |
| 161 | |
| 162 | & tbody tr { |
| 163 | @apply border-b border-border/60 transition-colors data-[state=selected]:bg-muted; |
| 164 | background-color: hsl(var(--card)); |
| 165 | } |
| 166 | |
| 167 | & tbody tr:hover { |
| 168 | background-color: color-mix(in oklab, hsl(var(--muted)) 40%, hsl(var(--card))); |
| 169 | } |
| 170 | |
| 171 | & tbody tr[data-state='selected'] { |
| 172 | background-color: hsl(var(--muted)); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | @utility table-sticky-left { |
| 183 | background-color: inherit; |
| 184 | border-right: 1px solid hsl(var(--border)); |
| 185 | box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 186 | } |
| 187 | |
| 188 | @utility table-sticky-right { |
| 189 | background-color: inherit; |
| 190 | border-left: 1px solid hsl(var(--border)); |
| 191 | box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 192 | } |
| 193 | |
| 194 | |
| 195 | @utility table-sticky-head-left { |
| 196 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 197 | border-right: 1px solid hsl(var(--border)); |
| 198 | box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 199 | } |
| 200 | |
| 201 | @utility table-sticky-head-right { |
| 202 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 203 | border-left: 1px solid hsl(var(--border)); |
| 204 | box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 205 | } |
| 206 | |
| 207 | |
| 208 | .data-table td.table-action-cell, |
| 209 | .data-table th.table-action-cell { |
| 210 | width: 110px; |
| 211 | min-width: 110px; |
| 212 | max-width: 110px; |
| 213 | height: 45px; |
| 214 | padding-top: 0; |
| 215 | padding-bottom: 0; |
| 216 | } |
| 217 | |
| 218 | @utility detail-breadcrumb { |
| 219 | @apply flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground font-medium; |
| 220 | |
| 221 | & a { |
| 222 | @apply transition-colors hover:text-foreground; |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | @utility detail-action-group { |
| 227 | @apply flex w-full flex-wrap items-center gap-1.5 rounded-lg border border-border/80 bg-card p-1.5 shadow-sm sm:w-auto; |
| 228 | } |
| 229 | |
| 230 | @utility detail-action-divider { |
| 231 | @apply flex flex-1 items-center gap-1.5 border-t border-border pt-1.5 sm:ml-1 sm:flex-none sm:border-l sm:border-t-0 sm:pl-1.5 sm:pt-0; |
| 232 | } |
| 233 | |
| 234 | @utility tab-panel-header { |
| 235 | @apply flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border/60 bg-muted/20 px-3 py-2; |
| 236 | } |
| 237 | |
| 238 | @utility tab-panel-note { |
| 239 | @apply rounded-lg border border-border/60 bg-muted/20 px-3 py-2 text-sm text-muted-foreground; |
| 240 | } |
| 241 | |
| 242 | @utility detail-metric-card { |
| 243 | @apply rounded-lg border border-border bg-card px-4 py-4 shadow-sm; |
| 244 | } |
| 245 | |
| 246 | @utility side-panel-body { |
| 247 | & form { |
| 248 | @apply space-y-4 pb-4; |
| 249 | } |
| 250 | |
| 251 | & form > .space-y-3 { |
| 252 | @apply rounded-lg border border-border bg-card p-4; |
| 253 | } |
| 254 | |
| 255 | & form > .space-y-4 { |
| 256 | @apply rounded-lg border border-border bg-card p-4; |
| 257 | } |
| 258 | |
| 259 | & form > .space-y-1\.5 { |
| 260 | @apply rounded-lg border border-border bg-card p-4; |
| 261 | } |
| 262 | |
| 263 | & form > .grid { |
| 264 | @apply rounded-lg border border-border bg-card p-4; |
| 265 | } |
| 266 | |
| 267 | & label { |
| 268 | @apply text-xs font-semibold text-muted-foreground/90 tracking-tight; |
| 269 | } |
| 270 | |
| 271 | & input { |
| 272 | @apply h-9 rounded-md; |
| 273 | } |
| 274 | |
| 275 | & textarea { |
| 276 | @apply rounded-md; |
| 277 | } |
| 278 | |
| 279 | & select { |
| 280 | @apply h-9 rounded-md; |
| 281 | } |
| 282 | |
| 283 | & form > .flex:last-child { |
| 284 | @apply sticky bottom-0 -mx-5 justify-end border-t border-border bg-background px-5 py-3; |
| 285 | } |
| 286 | |
| 287 | & form > .flex.flex-wrap:last-child { |
| 288 | @apply sticky bottom-0 -mx-5 justify-end border-t border-border bg-background px-5 py-3; |
| 289 | } |
| 290 | |
| 291 | & form > .flex:last-child button { |
| 292 | @apply h-9 rounded-md px-4 font-medium; |
| 293 | } |
| 294 | |
| 295 | & form > .flex.flex-wrap:last-child button { |
| 296 | @apply h-9 rounded-md px-4 font-medium; |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | @utility tactile-press { |
| 301 | @apply active:scale-[0.97] transition-transform duration-150; |
| 302 | } |
| 303 | |
| 304 | @utility animate-pulse-glow { |
| 305 | animation: pulse-glow 3s ease-in-out infinite; |
| 306 | |
| 307 | @media (prefers-reduced-motion: reduce) { |
| 308 | animation: none; |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | @utility num { |
| 313 | font-family: |
| 314 | SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', |
| 315 | monospace; |
| 316 | font-variant-numeric: tabular-nums; |
| 317 | } |
| 318 | |
| 319 | @utility mono { |
| 320 | font-family: |
| 321 | SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', |
| 322 | monospace; |
| 323 | font-variant-numeric: tabular-nums; |
| 324 | } |
| 325 | |
| 326 | @layer base { |
| 327 | |
| 328 | :root { |
| 329 | --ui-accent: 0 0% 13%; |
| 330 | --background: 0 0% 98%; |
| 331 | --foreground: 0 0% 8%; |
| 332 | --card: 0 0% 100%; |
| 333 | --card-foreground: 0 0% 8%; |
| 334 | --popover: 0 0% 100%; |
| 335 | --popover-foreground: 0 0% 8%; |
| 336 | --primary: var(--ui-accent); |
| 337 | --primary-foreground: 0 0% 98%; |
| 338 | --secondary: 0 0% 94%; |
| 339 | --secondary-foreground: 0 0% 16%; |
| 340 | --muted: 0 0% 96%; |
| 341 | --muted-foreground: 0 0% 40%; |
| 342 | --accent: 0 0% 92%; |
| 343 | --accent-foreground: 0 0% 13%; |
| 344 | --destructive: 356 82% 51%; |
| 345 | --destructive-foreground: 0 0% 100%; |
| 346 | --border: 0 0% 89%; |
| 347 | --input: 0 0% 82%; |
| 348 | --ring: 0 0% 45%; |
| 349 | --radius: 0.5rem; |
| 350 | --success: 137 63% 39%; |
| 351 | --warning: 38 92% 50%; |
| 352 | --info: 219 98% 53%; |
| 353 | --surface-elevated: 0 0% 100%; |
| 354 | --sidebar: 0 0% 98%; |
| 355 | --sidebar-foreground: 0 0% 8%; |
| 356 | } |
| 357 | |
| 358 | [data-kb-theme="dark"] { |
| 359 | --ui-accent: 0 0% 92%; |
| 360 | --background: 0 0% 4%; |
| 361 | --foreground: 0 0% 98%; |
| 362 | --card: 0 0% 8%; |
| 363 | --card-foreground: 0 0% 98%; |
| 364 | --popover: 0 0% 8%; |
| 365 | --popover-foreground: 0 0% 98%; |
| 366 | --primary: var(--ui-accent); |
| 367 | --primary-foreground: 0 0% 6%; |
| 368 | --secondary: 0 0% 16%; |
| 369 | --secondary-foreground: 0 0% 98%; |
| 370 | --muted: 0 0% 13%; |
| 371 | --muted-foreground: 0 0% 62%; |
| 372 | --accent: 0 0% 18%; |
| 373 | --accent-foreground: 0 0% 98%; |
| 374 | --destructive: 357 94% 64%; |
| 375 | --destructive-foreground: 0 0% 100%; |
| 376 | --border: 0 0% 17%; |
| 377 | --input: 0 0% 24%; |
| 378 | --ring: 0 0% 45%; |
| 379 | --success: 137 58% 58%; |
| 380 | --warning: 38 92% 54%; |
| 381 | --info: 219 98% 60%; |
| 382 | --surface-elevated: 0 0% 10%; |
| 383 | --sidebar: 0 0% 4%; |
| 384 | --sidebar-foreground: 0 0% 98%; |
| 385 | } |
| 386 | |
| 387 | * { |
| 388 | @apply border-border; |
| 389 | } |
| 390 | |
| 391 | html { |
| 392 | @apply scroll-smooth; |
| 393 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; |
| 394 | -webkit-font-smoothing: antialiased; |
| 395 | -moz-osx-font-smoothing: grayscale; |
| 396 | } |
| 397 | |
| 398 | body { |
| 399 | @apply min-h-screen bg-background font-sans text-foreground antialiased selection:bg-primary/20 selection:text-primary; |
| 400 | } |
| 401 | |
| 402 | |
| 403 | * { |
| 404 | -ms-overflow-style: none; |
| 405 | scrollbar-width: none; |
| 406 | } |
| 407 | |
| 408 | ::-webkit-scrollbar { |
| 409 | display: none; |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | @layer components { |
| 414 | @keyframes pulse-glow { |
| 415 | 0%, 100% { opacity: 0.9; transform: scale(1); filter: drop-shadow(0 0 10px hsl(var(--primary) / 0.25)); } |
| 416 | 50% { opacity: 1; transform: scale(1.02); filter: drop-shadow(0 0 20px hsl(var(--primary) / 0.45)); } |
| 417 | } |
| 418 | } |