| 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 | |
| 59 | --color-brand: hsl(var(--brand)); |
| 60 | --color-brand-accent: hsl(var(--brand-accent)); |
| 61 | --color-brand-hover: hsl(var(--brand-hover)); |
| 62 | --color-brand-ink: hsl(var(--brand-ink)); |
| 63 | --color-brand-wash: hsl(var(--brand-wash)); |
| 64 | --color-surface-base: hsl(var(--surface-base)); |
| 65 | --color-surface-overlay: hsl(var(--surface-overlay)); |
| 66 | --color-surface-tint: hsl(var(--surface-tint)); |
| 67 | --color-surface-fill: hsl(var(--surface-fill)); |
| 68 | --color-text-strong: hsl(var(--text-strong)); |
| 69 | --color-text-default: hsl(var(--text-default)); |
| 70 | --color-text-subtle: hsl(var(--text-subtle)); |
| 71 | --color-text-placeholder: hsl(var(--text-placeholder)); |
| 72 | --color-border-line: hsl(var(--border-line)); |
| 73 | --color-border-hairline: hsl(var(--border-hairline)); |
| 74 | |
| 75 | |
| 76 | --radius-3xl: calc(var(--radius) + 12px); |
| 77 | --radius-2xl: calc(var(--radius) + 8px); |
| 78 | --radius-xl: calc(var(--radius) + 4px); |
| 79 | --radius-lg: var(--radius); |
| 80 | --radius-md: calc(var(--radius) - 2px); |
| 81 | --radius-sm: calc(var(--radius) - 4px); |
| 82 | |
| 83 | --animate-fade-up: fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 84 | --animate-accordion-down: accordion-down 0.25s cubic-bezier(0.16, 1, 0.3, 1); |
| 85 | --animate-accordion-up: accordion-up 0.25s cubic-bezier(0.16, 1, 0.3, 1); |
| 86 | |
| 87 | @keyframes fade-up { |
| 88 | from { |
| 89 | opacity: 0; |
| 90 | transform: translateY(8px); |
| 91 | } |
| 92 | to { |
| 93 | opacity: 1; |
| 94 | transform: translateY(0); |
| 95 | } |
| 96 | } |
| 97 | @keyframes accordion-down { |
| 98 | from { |
| 99 | height: 0; |
| 100 | } |
| 101 | to { |
| 102 | height: var(--kb-collapsible-content-height); |
| 103 | } |
| 104 | } |
| 105 | @keyframes accordion-up { |
| 106 | from { |
| 107 | height: var(--kb-collapsible-content-height); |
| 108 | } |
| 109 | to { |
| 110 | height: 0; |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | @layer base { |
| 124 | button:not(:disabled), |
| 125 | [role='button']:not([aria-disabled='true']) { |
| 126 | cursor: pointer; |
| 127 | } |
| 128 | |
| 129 | *, |
| 130 | ::after, |
| 131 | ::before, |
| 132 | ::backdrop, |
| 133 | ::file-selector-button { |
| 134 | border-color: var(--color-gray-200, currentcolor); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | @utility topbar-control { |
| 139 | @apply border border-border/70 bg-transparent text-muted-foreground transition-colors hover:border-border hover:bg-muted/60 hover:text-foreground; |
| 140 | } |
| 141 | |
| 142 | |
| 143 | @utility topbar-ai-control { |
| 144 | @apply border border-brand/20 bg-brand/10 text-brand transition-colors hover:bg-brand/16 hover:text-brand; |
| 145 | } |
| 146 | |
| 147 | @utility data-shell { |
| 148 | @apply rounded-xl border border-border-line bg-surface-base; |
| 149 | } |
| 150 | |
| 151 | @utility data-table-wrap { |
| 152 | @apply isolate max-h-[65vh] overflow-auto rounded-xl border border-border-line bg-surface-base; |
| 153 | } |
| 154 | |
| 155 | @utility data-table { |
| 156 | @apply w-full caption-bottom text-sm; |
| 157 | |
| 158 | & thead { |
| 159 | @apply sticky top-0 z-20 border-b border-border-hairline text-text-subtle; |
| 160 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 161 | } |
| 162 | |
| 163 | & th { |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | @apply h-11 overflow-hidden text-ellipsis whitespace-nowrap px-3 text-xs font-medium tracking-normal text-text-subtle first:pl-4 last:pr-4; |
| 169 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 170 | } |
| 171 | |
| 172 | & td { |
| 173 | |
| 174 | @apply whitespace-nowrap px-3 py-3 align-middle text-sm font-normal text-foreground tabular-nums first:pl-4 last:pr-4; |
| 175 | } |
| 176 | |
| 177 | & tbody tr { |
| 178 | @apply border-b border-border-hairline transition-colors data-[state=selected]:bg-muted; |
| 179 | background-color: hsl(var(--card)); |
| 180 | } |
| 181 | |
| 182 | & tbody tr:hover { |
| 183 | background-color: color-mix(in oklab, hsl(var(--muted)) 40%, hsl(var(--card))); |
| 184 | } |
| 185 | |
| 186 | & tbody tr[data-state='selected'] { |
| 187 | background-color: hsl(var(--muted)); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | @utility table-sticky-left { |
| 198 | background-color: inherit; |
| 199 | border-right: 1px solid hsl(var(--border)); |
| 200 | box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 201 | } |
| 202 | |
| 203 | @utility table-sticky-right { |
| 204 | background-color: inherit; |
| 205 | border-left: 1px solid hsl(var(--border)); |
| 206 | box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 207 | } |
| 208 | |
| 209 | |
| 210 | @utility table-sticky-head-left { |
| 211 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 212 | border-right: 1px solid hsl(var(--border)); |
| 213 | box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 214 | } |
| 215 | |
| 216 | @utility table-sticky-head-right { |
| 217 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 218 | border-left: 1px solid hsl(var(--border)); |
| 219 | box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent); |
| 220 | } |
| 221 | |
| 222 | |
| 223 | .data-table td.table-action-cell, |
| 224 | .data-table th.table-action-cell { |
| 225 | width: 110px; |
| 226 | min-width: 110px; |
| 227 | max-width: 110px; |
| 228 | height: 45px; |
| 229 | padding-top: 0; |
| 230 | padding-bottom: 0; |
| 231 | } |
| 232 | |
| 233 | @utility detail-breadcrumb { |
| 234 | @apply flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground font-medium; |
| 235 | |
| 236 | & a { |
| 237 | @apply transition-colors hover:text-foreground; |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | @utility detail-action-group { |
| 242 | @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; |
| 243 | } |
| 244 | |
| 245 | @utility detail-action-divider { |
| 246 | @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; |
| 247 | } |
| 248 | |
| 249 | @utility tab-panel-header { |
| 250 | @apply flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border/60 bg-muted/20 px-3 py-2; |
| 251 | } |
| 252 | |
| 253 | @utility tab-panel-note { |
| 254 | @apply rounded-lg border border-border/60 bg-muted/20 px-3 py-2 text-sm text-muted-foreground; |
| 255 | } |
| 256 | |
| 257 | @utility detail-metric-card { |
| 258 | @apply rounded-lg border border-border bg-card px-4 py-4 shadow-sm; |
| 259 | } |
| 260 | |
| 261 | @utility side-panel-body { |
| 262 | & form { |
| 263 | @apply space-y-4 pb-4; |
| 264 | } |
| 265 | |
| 266 | & form > .space-y-3 { |
| 267 | @apply rounded-lg border border-border bg-card p-4; |
| 268 | } |
| 269 | |
| 270 | & form > .space-y-4 { |
| 271 | @apply rounded-lg border border-border bg-card p-4; |
| 272 | } |
| 273 | |
| 274 | & form > .space-y-1\.5 { |
| 275 | @apply rounded-lg border border-border bg-card p-4; |
| 276 | } |
| 277 | |
| 278 | & form > .grid { |
| 279 | @apply rounded-lg border border-border bg-card p-4; |
| 280 | } |
| 281 | |
| 282 | & label { |
| 283 | @apply text-xs font-semibold text-muted-foreground/90 tracking-tight; |
| 284 | } |
| 285 | |
| 286 | & input { |
| 287 | @apply h-9 rounded-md; |
| 288 | } |
| 289 | |
| 290 | & textarea { |
| 291 | @apply rounded-md; |
| 292 | } |
| 293 | |
| 294 | & select { |
| 295 | @apply h-9 rounded-md; |
| 296 | } |
| 297 | |
| 298 | & form > .flex:last-child { |
| 299 | @apply sticky bottom-0 -mx-5 justify-end border-t border-border bg-background px-5 py-3; |
| 300 | } |
| 301 | |
| 302 | & form > .flex.flex-wrap:last-child { |
| 303 | @apply sticky bottom-0 -mx-5 justify-end border-t border-border bg-background px-5 py-3; |
| 304 | } |
| 305 | |
| 306 | & form > .flex:last-child button { |
| 307 | @apply h-9 rounded-md px-4 font-medium; |
| 308 | } |
| 309 | |
| 310 | & form > .flex.flex-wrap:last-child button { |
| 311 | @apply h-9 rounded-md px-4 font-medium; |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | @utility tactile-press { |
| 316 | @apply active:scale-[0.97] transition-transform duration-150; |
| 317 | } |
| 318 | |
| 319 | @utility animate-pulse-glow { |
| 320 | animation: pulse-glow 3s ease-in-out infinite; |
| 321 | |
| 322 | @media (prefers-reduced-motion: reduce) { |
| 323 | animation: none; |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | @utility num { |
| 328 | font-family: |
| 329 | SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', |
| 330 | monospace; |
| 331 | font-variant-numeric: tabular-nums; |
| 332 | } |
| 333 | |
| 334 | @utility mono { |
| 335 | font-family: |
| 336 | SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', |
| 337 | monospace; |
| 338 | font-variant-numeric: tabular-nums; |
| 339 | } |
| 340 | |
| 341 | @layer base { |
| 342 | |
| 343 | :root { |
| 344 | |
| 345 | |
| 346 | |
| 347 | --app-viewport: calc(100dvh - env(safe-area-inset-top)); |
| 348 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | |
| 353 | |
| 354 | color-scheme: light; |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | --brand: 191.94 100% 42.35%; |
| 360 | --brand-accent: 191.94 100% 42.35%; |
| 361 | --brand-hover: 192.06 100% 37.06%; |
| 362 | --brand-ink: 192.46 94.2% 27.06%; |
| 363 | --brand-wash: 193.33 75% 95.29%; |
| 364 | --surface-base: 0 0% 100%; |
| 365 | --surface-overlay: 0 0% 97%; |
| 366 | --surface-tint: 0 0% 96%; |
| 367 | --surface-fill: 0 0% 90%; |
| 368 | --text-strong: 0 0% 4%; |
| 369 | --text-default: 240 6% 10%; |
| 370 | --text-subtle: 0 0% 45%; |
| 371 | --text-placeholder: 0 0% 63%; |
| 372 | --border-line: 0 0% 4% / 0.1; |
| 373 | --border-hairline: 0 0% 91%; |
| 374 | --ui-accent: var(--accent-light, var(--brand)); |
| 375 | --background: var(--surface-overlay); |
| 376 | --foreground: var(--text-default); |
| 377 | --card: 0 0% 100%; |
| 378 | --card-foreground: 0 0% 8%; |
| 379 | --popover: 0 0% 100%; |
| 380 | --popover-foreground: 0 0% 8%; |
| 381 | --primary: var(--ui-accent); |
| 382 | --primary-foreground: var(--accent-light-fg, 0 0% 4%); |
| 383 | --secondary: var(--surface-fill); |
| 384 | --secondary-foreground: 0 0% 16%; |
| 385 | --muted: var(--surface-tint); |
| 386 | --muted-foreground: var(--text-subtle); |
| 387 | --accent: var(--surface-fill); |
| 388 | --accent-foreground: 0 0% 13%; |
| 389 | --destructive: 356 82% 51%; |
| 390 | --destructive-foreground: 0 0% 100%; |
| 391 | --border: var(--border-hairline); |
| 392 | --input: var(--border-line); |
| 393 | --ring: var(--accent-light, var(--brand-ink)); |
| 394 | --radius: 0.5rem; |
| 395 | --success: 137 63% 39%; |
| 396 | --warning: 38 92% 50%; |
| 397 | --info: 219 98% 53%; |
| 398 | --surface-elevated: 0 0% 100%; |
| 399 | --sidebar: 0 0% 98%; |
| 400 | --sidebar-foreground: 0 0% 8%; |
| 401 | |
| 402 | |
| 403 | --illu-accent: hsl(var(--primary)); |
| 404 | --illu-accent-2: hsl(349 100% 70%); |
| 405 | --illu-ink: hsl(240 12% 22%); |
| 406 | --illu-line: hsl(0 0% 82%); |
| 407 | --illu-soft: hsl(0 0% 92%); |
| 408 | --illu-paper: hsl(0 0% 100%); |
| 409 | } |
| 410 | |
| 411 | [data-kb-theme="dark"] { |
| 412 | |
| 413 | |
| 414 | |
| 415 | color-scheme: dark; |
| 416 | --surface-base: 0 0% 6%; |
| 417 | --surface-overlay: 0 0% 6%; |
| 418 | --surface-tint: 0 0% 15%; |
| 419 | --surface-fill: 0 0% 15%; |
| 420 | --text-strong: 0 0% 98%; |
| 421 | --text-default: 0 0% 96%; |
| 422 | --text-subtle: 0 0% 63%; |
| 423 | --text-placeholder: 0 0% 63%; |
| 424 | --border-line: 0 0% 20%; |
| 425 | --border-hairline: 0 0% 20%; |
| 426 | --ui-accent: var(--accent-dark, var(--brand)); |
| 427 | --background: var(--surface-overlay); |
| 428 | --foreground: var(--text-strong); |
| 429 | --card: var(--surface-base); |
| 430 | --card-foreground: var(--text-strong); |
| 431 | --popover: var(--surface-base); |
| 432 | --popover-foreground: var(--text-strong); |
| 433 | --primary: var(--ui-accent); |
| 434 | --primary-foreground: var(--accent-dark-fg, 0 0% 4%); |
| 435 | --secondary: var(--surface-fill); |
| 436 | --secondary-foreground: 0 0% 98%; |
| 437 | --muted: var(--surface-tint); |
| 438 | --muted-foreground: var(--text-subtle); |
| 439 | --accent: var(--surface-fill); |
| 440 | --accent-foreground: 0 0% 98%; |
| 441 | --destructive: 357 94% 64%; |
| 442 | --destructive-foreground: 0 0% 100%; |
| 443 | --border: var(--border-hairline); |
| 444 | --input: var(--border-line); |
| 445 | --ring: var(--accent-dark, var(--brand)); |
| 446 | --success: 137 58% 58%; |
| 447 | --warning: 38 92% 54%; |
| 448 | --info: 219 98% 60%; |
| 449 | --illu-ink: hsl(240 6% 72%); |
| 450 | --illu-line: hsl(0 0% 30%); |
| 451 | --illu-soft: hsl(0 0% 19%); |
| 452 | --illu-paper: hsl(0 0% 11%); |
| 453 | --surface-elevated: var(--surface-fill); |
| 454 | --sidebar: var(--surface-base); |
| 455 | --sidebar-foreground: 0 0% 98%; |
| 456 | } |
| 457 | |
| 458 | * { |
| 459 | @apply border-border; |
| 460 | } |
| 461 | |
| 462 | html { |
| 463 | @apply scroll-smooth bg-background; |
| 464 | |
| 465 | |
| 466 | |
| 467 | overscroll-behavior-y: none; |
| 468 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; |
| 469 | -webkit-font-smoothing: antialiased; |
| 470 | -moz-osx-font-smoothing: grayscale; |
| 471 | } |
| 472 | |
| 473 | body { |
| 474 | @apply min-h-screen bg-background font-sans text-foreground antialiased selection:bg-primary/20 selection:text-primary; |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | box-sizing: border-box; |
| 481 | min-height: 100dvh; |
| 482 | padding-top: env(safe-area-inset-top); |
| 483 | padding-left: env(safe-area-inset-left); |
| 484 | padding-right: env(safe-area-inset-right); |
| 485 | } |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | body::before { |
| 494 | content: ''; |
| 495 | position: fixed; |
| 496 | top: 0; |
| 497 | left: 0; |
| 498 | right: 0; |
| 499 | height: env(safe-area-inset-top); |
| 500 | background: hsl(var(--background)); |
| 501 | z-index: 90; |
| 502 | pointer-events: none; |
| 503 | } |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | input, |
| 511 | textarea, |
| 512 | select { |
| 513 | color: hsl(var(--foreground)); |
| 514 | caret-color: hsl(var(--primary)); |
| 515 | -webkit-text-fill-color: currentColor; |
| 516 | } |
| 517 | |
| 518 | |
| 519 | |
| 520 | input::placeholder, |
| 521 | textarea::placeholder { |
| 522 | -webkit-text-fill-color: currentColor; |
| 523 | } |
| 524 | |
| 525 | input::selection, |
| 526 | textarea::selection { |
| 527 | background: hsl(var(--primary) / 0.3); |
| 528 | color: hsl(var(--foreground)); |
| 529 | } |
| 530 | |
| 531 | |
| 532 | * { |
| 533 | -ms-overflow-style: none; |
| 534 | scrollbar-width: none; |
| 535 | } |
| 536 | |
| 537 | ::-webkit-scrollbar { |
| 538 | display: none; |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | @layer components { |
| 543 | @keyframes pulse-glow { |
| 544 | 0%, 100% { opacity: 0.9; transform: scale(1); filter: drop-shadow(0 0 10px hsl(var(--primary) / 0.25)); } |
| 545 | 50% { opacity: 1; transform: scale(1.02); filter: drop-shadow(0 0 20px hsl(var(--primary) / 0.45)); } |
| 546 | } |
| 547 | } |