src/app/globals.css

@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
  --background: var(--app-canvas);
  --foreground: var(--app-ink);
  --card: var(--app-panel);
  --card-foreground: var(--app-ink);
  --popover: var(--app-panel);
  --popover-foreground: var(--app-ink);
  --primary: var(--app-accent);
  --primary-foreground: var(--app-accent-foreground);
  --secondary: var(--app-soft-panel);
  --secondary-foreground: var(--app-ink);
  --muted: var(--app-soft-panel);
  --muted-foreground: var(--app-muted);
  --accent: var(--app-soft-panel);
  --accent-foreground: var(--app-ink);
  --destructive: var(--app-danger);
  --border: var(--app-border);
  --input: var(--app-border);
  --ring: var(--app-accent);
  --chart-1: var(--app-accent);
  --chart-2: var(--app-highlight);
  --chart-3: var(--app-warning);
  --chart-4: var(--app-danger);
  --chart-5: var(--app-muted);
  /* Theme values live here; runtime code only overrides the user's accent. */
  --surface-canvas: #f8fafc;
  --surface-panel: #ffffff;
  --surface-panel-raised: #ffffff;
  --surface-sunken: #f1f5f9;
  --surface-overlay: #ffffff;
  --text-primary: #000000;
  --text-secondary: #3f3f46;
  --text-muted: #52525b;
  --text-disabled: #a1a1aa;
  --status-info: #2563eb;
  --status-info-bg: #eff6ff;
  --status-success: #15803d;
  --status-success-bg: #f0fdf4;
  --status-warning: #b45309;
  --status-warning-bg: #fffbeb;
  --status-danger: #b91c1c;
  --status-danger-bg: #fef2f2;
  --focus-ring: #18181b;
  --selected-bg: rgb(24 24 27 / 0.08);
  --disabled-bg: #f1f5f9;
  --overlay-scrim: rgba(15, 23, 42, 0.58);
  --brand-google-drive: #4285f4;
  --brand-dropbox: #0061ff;
  --brand-slack: #4a154b;
  --brand-frame-io: #8b5cf6;
  --brand-one-drive: #0078d4;
  --brand-google-calendar: #34a853;
  --workflow-stage-1: #14b8a6;
  --workflow-stage-2: #2dd4bf;
  --workflow-stage-3: #fbbf24;
  --workflow-stage-4: #22c55e;
  --workflow-stage-5: #2a3340;
  --workflow-stage-6: #ef4444;
  --decorative-thumb-1: #d9e3e8;
  --decorative-thumb-2: #dfd5c7;
  --decorative-thumb-3: #eee7da;
  --decorative-thumb-4: #dce4dc;
  --decorative-thumb-5: #d6e1ed;
  --media-package-1: #dce8f7;
  --media-package-2: #e8e4dc;
  --media-package-3: #dce9df;
  --media-package-4: #dde3eb;
  --media-package-5: #e7e9ec;
  --space-unit: 4px;
  --density-control-height: 40px;
  --radius: 0.375rem;
  --radius-control: 0.375rem;
  --radius-panel: 0.375rem;
  --radius-overlay: 0.5rem;
  --radius-pill: 9999px;
  --shadow-panel: none;
  --shadow-overlay: 0 18px 50px rgb(15 23 42 / 0.16);
  --sidebar: var(--app-sidebar);
  --sidebar-foreground: var(--app-ink);
  --sidebar-primary: var(--app-accent);
  --sidebar-primary-foreground: var(--app-accent-foreground);
  --sidebar-accent: var(--app-active);
  --sidebar-accent-foreground: var(--app-highlight);
  --sidebar-border: var(--app-border);
  --sidebar-ring: var(--app-accent);

  --app-accent: #18181b;
  --app-accent-foreground: #ffffff;
  --app-highlight: #18181b;
  --app-canvas: var(--surface-canvas);
  --app-panel: var(--surface-panel);
  --app-sidebar: var(--surface-sunken);
  --app-soft-panel: var(--surface-sunken);
  --app-header-panel: var(--surface-panel-raised);
  --app-active: var(--selected-bg);
  --app-hover: rgba(15, 23, 42, 0.05);
  --app-ink: var(--text-primary);
  --app-muted: var(--text-muted);
  --app-subtle: var(--text-disabled);
  --app-border: #e2e8f0;
  --app-strong-border: #cbd5e1;
  --app-control: var(--surface-panel);
  --app-success: var(--status-success);
  --app-warning: var(--status-warning);
  --app-danger: var(--status-danger);
  --app-success-bg: var(--status-success-bg);
  --app-warning-bg: var(--status-warning-bg);
  --app-danger-bg: var(--status-danger-bg);
  --app-progress-track: var(--app-border);
  --app-chart-grid: var(--app-border);
  --app-avatar-surface: var(--surface-sunken);
  --app-thumb-icon: rgba(15, 23, 42, 0.36);
  --app-shadow-1: var(--shadow-panel);
  --app-shadow-2: var(--shadow-overlay);
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 280ms;
  --motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

.dark {
  --app-accent: #ffffff;
  --app-accent-foreground: #000000;
  --app-highlight: #ffffff;
  --app-hover: rgb(255 255 255 / 0.06);
  --app-border: #27272a;
  --app-strong-border: #3f3f46;
  --app-thumb-icon: rgba(241, 245, 249, 0.38);
  --media-package-1: #17263a;
  --media-package-2: #29251f;
  --media-package-3: #172a21;
  --media-package-4: #252039;
  --media-package-5: #252b33;
  --surface-canvas: #000000;
  --surface-panel: #121212;
  --surface-panel-raised: #171717;
  --surface-sunken: #0a0a0a;
  --surface-overlay: #181818;
  --text-primary: #ffffff;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --text-disabled: #71717a;
  --status-info: #60a5fa;
  --status-info-bg: rgb(37 99 235 / 0.16);
  --status-success: #4ade80;
  --status-success-bg: rgb(34 197 94 / 0.14);
  --status-warning: #fbbf24;
  --status-warning-bg: rgb(251 191 36 / 0.14);
  --status-danger: #f87171;
  --status-danger-bg: rgb(239 68 68 / 0.14);
  --focus-ring: #ffffff;
  --selected-bg: rgb(255 255 255 / 0.1);
  --disabled-bg: #1a212b;
  --overlay-scrim: rgb(0 0 0 / 0.68);
  --shadow-panel: none;
  --shadow-overlay: 0 20px 56px rgb(0 0 0 / 0.3);
}

@theme inline {
  --font-sans: "Geist", "Geist Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;
  --font-display:
    "Geist", "Geist Fallback", ui-sans-serif, system-ui, sans-serif;
  --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-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --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-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);
  --radius-xs: calc(var(--radius) * 0.5);
  --radius-sm: calc(var(--radius) * 0.75);
  --radius-md: calc(var(--radius) * 0.875);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.5);
}

* {
  border-color: var(--border);
  outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
  box-sizing: border-box;
}

html {
  background: var(--app-canvas);
  color-scheme: light;
  scroll-behavior: smooth;
}

html.dark {
  color-scheme: dark;
}

.brand-logo-dark {
  display: none !important;
}

.dark .brand-logo-light {
  display: none !important;
}

.dark .brand-logo-dark {
  display: block !important;
}

body {
  min-height: 100dvh;
  background: var(--app-canvas);
  color: var(--app-ink);
  font-family: "Geist", "Geist Fallback", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
[role="button"],
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
a[href] {
  touch-action: manipulation;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]) {
  transition:
    color var(--motion-fast) var(--motion-ease-standard),
    background-color var(--motion-fast) var(--motion-ease-standard),
    border-color var(--motion-fast) var(--motion-ease-standard),
    box-shadow var(--motion-fast) var(--motion-ease-standard),
    opacity var(--motion-fast) var(--motion-ease-standard),
    transform var(--motion-fast) var(--motion-ease-out);
}

button:not(:disabled):active,
[role="button"]:not([aria-disabled="true"]):active {
  transform: translateY(1px) scale(0.985);
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

:where(input, textarea, select):focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: -1px;
  box-shadow: none;
}

[data-slot="command-input"]:focus-visible {
  outline: none;
}

[data-slot="command-input-wrapper"]:focus-within {
  box-shadow: inset 0 -1px var(--focus-ring);
}

/* Shared state hooks for Radix and native controls. */
[data-disabled="true"],
[aria-disabled="true"],
:disabled,
[aria-disabled="true"]:disabled {
  cursor: not-allowed;
}

[data-selected="true"],
[aria-selected="true"],
[data-state="active"],
[data-state="on"] {
  --selection-color: var(--selected-bg);
}

[data-loading="true"],
[aria-busy="true"],
[data-state="loading"] {
  cursor: progress;
  opacity: 0.72;
}

[readonly],
[aria-readonly="true"],
[data-readonly="true"],
[data-state="readonly"] {
  cursor: default;
  color: var(--text-secondary);
}

[data-slot="input"][readonly],
[data-slot="textarea"][readonly],
[data-slot="select-trigger"][data-readonly="true"] {
  background: var(--surface-sunken);
  border-color: var(--app-border);
}

[data-slot="dialog-overlay"],
[data-slot="sheet-overlay"] {
  background: var(--overlay-scrim);
}

[data-slot="button"] {
  min-height: 40px;
  border-radius: var(--radius-control);
}

[data-slot="button"][data-size="xs"],
[data-slot="button"][data-size="icon-xs"] {
  min-height: 24px;
}

[data-slot="button"][data-size="sm"],
[data-slot="button"][data-size="icon-sm"] {
  min-height: 32px;
}

[data-slot="button"][data-size="icon"],
[data-slot="button"][data-size="icon-lg"] {
  min-height: 40px;
}

[data-slot="input"],
[data-slot="select-trigger"] {
  min-height: 40px;
  border-radius: var(--radius-control);
  background-color: var(--surface-panel);
}

[data-slot="textarea"] {
  border-radius: var(--radius-control);
  background-color: var(--surface-panel);
}

[data-slot="badge"] {
  min-height: 24px;
}
[data-slot="select-item"],
[data-slot="dropdown-menu-item"],
[data-slot="dropdown-menu-checkbox-item"],
[data-slot="dropdown-menu-radio-item"],
[data-slot="dropdown-menu-sub-trigger"] {
  min-height: 32px;
}

[data-slot="dialog-content"],
[data-slot="sheet-content"],
[data-slot="popover-content"],
[data-slot="dropdown-menu-content"],
[data-slot="select-content"] {
  background-color: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
}

[data-slot="dialog-content"],
[data-slot="popover-content"],
[data-slot="sheet-content"] {
  border-radius: var(--radius-overlay);
}

[data-slot="dropdown-menu-content"],
[data-slot="select-content"] {
  border-radius: var(--radius-panel);
}

[data-slot="badge"],
[data-slot="tag"] {
  border-radius: var(--radius-pill);
}

[data-slot="skeleton"] {
  background: color-mix(in srgb, var(--app-muted) 16%, transparent);
}

[data-slot="progress"] {
  background: var(--app-progress-track);
}
[data-slot="progress-indicator"] {
  background: var(--app-accent);
}
[data-slot="tooltip-content"] {
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--app-ink) 16%, transparent);
  box-shadow: var(--shadow-overlay);
}

[data-density="compact"] {
  --density-control-height: 32px;
}
[data-density="balanced"] {
  --density-control-height: 36px;
}
[data-density="comfortable"] {
  --density-control-height: 36px;
}

::selection {
  background: color-mix(in srgb, var(--app-accent) 22%, transparent);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  translate: 0 -160%;
  border: 1px solid var(--app-strong-border);
  border-radius: 6px;
  background: var(--app-panel);
  color: var(--app-ink);
  padding: 8px 12px;
  box-shadow: var(--app-shadow-2);
  font-size: 13px;
  font-weight: 600;
  transition: translate var(--motion-base) var(--motion-ease-out);
}

.skip-link:focus {
  translate: 0;
}

.interactive-row {
  position: relative;
  isolation: isolate;
  transition:
    background-color var(--motion-fast) var(--motion-ease-standard),
    box-shadow var(--motion-fast) var(--motion-ease-standard);
}

.interactive-row::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: inset 3px 0 0 transparent;
  content: "";
  pointer-events: none;
  transition: box-shadow var(--motion-fast) var(--motion-ease-standard);
}

.interactive-row[data-selected="true"]::after,
.interactive-row[aria-selected="true"]::after {
  box-shadow: inset 3px 0 0 var(--app-accent);
}

.motion-enter {
  animation: workspace-enter var(--motion-slow) var(--motion-ease-out) both;
}

.motion-enter-delayed {
  animation: workspace-enter var(--motion-slow) var(--motion-ease-out) 70ms both;
}

.motion-fade {
  animation: workspace-fade var(--motion-base) var(--motion-ease-out) both;
}

.metric-value {
  font-variant-numeric: tabular-nums;
}

/* Studio Split motion allowlist - named reusable states. Reduced motion provides static fallbacks. */
.studio-motion-transition {
  transition:
    color var(--motion-fast) var(--motion-ease-standard),
    background-color var(--motion-fast) var(--motion-ease-standard),
    border-color var(--motion-fast) var(--motion-ease-standard),
    opacity var(--motion-fast) var(--motion-ease-standard),
    transform var(--motion-fast) var(--motion-ease-out);
}

.studio-motion-silver-pass {
  position: relative;
  overflow: hidden;
}

.studio-motion-silver-pass::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 52%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 0.34),
    transparent
  );
  transform: translateX(-110%);
  content: "";
  pointer-events: none;
}

.studio-motion-silver-pass[data-active="true"]::after {
  animation: studio-silver-pass 520ms ease-out forwards;
}

.studio-motion-edge-sweep {
  position: relative;
  overflow: hidden;
}

.studio-motion-edge-sweep[data-active="true"]::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(212 212 216 / 0.9);
  animation: studio-edge-sweep 360ms var(--motion-ease-out) both;
  content: "";
  pointer-events: none;
}

.studio-motion-thinking-orb[data-active="true"] {
  animation: studio-thinking-orb 880ms var(--motion-ease-standard) infinite
    alternate;
}

.studio-motion-gooey {
  animation: studio-gooey-enter 280ms var(--motion-ease-out) both;
}

.workspace-flyout[data-state="open"] {
  animation: workspace-flyout-in 180ms var(--motion-ease-out) both;
}

.workspace-flyout[data-state="closed"] {
  animation: workspace-flyout-out 120ms ease-in both;
}

.team-chat-composer:focus-within {
  background: color-mix(in srgb, var(--surface-overlay) 88%, transparent);
  backdrop-filter: blur(10px);
}

@keyframes workspace-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes workspace-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes studio-silver-pass {
  from {
    transform: translateX(-110%);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  to {
    transform: translateX(110%);
    opacity: 0;
  }
}

@keyframes studio-edge-sweep {
  from {
    opacity: 0;
    box-shadow: inset 0 0 0 1px transparent;
  }
  to {
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgb(212 212 216 / 0.9);
  }
}

@keyframes studio-thinking-orb {
  from {
    opacity: 0.55;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes studio-gooey-enter {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes workspace-flyout-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes workspace-flyout-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

.relay-density-balanced {
  --workspace-row-height: 40px;
  --workspace-section-gap: 20px;
  --density-control-height: 36px;
}

.relay-density-balanced [data-slot="button"],
.relay-density-balanced [data-slot="input"],
.relay-density-balanced [data-slot="select-trigger"] {
  min-height: 36px;
}

* {
  scrollbar-color: var(--app-strong-border) transparent;
  scrollbar-width: thin;
}

.workspace-scrollbar-hidden {
  scrollbar-width: none;
}

.workspace-scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

.app-toast-position {
  bottom: 16px;
}

@media (max-width: 1023px) {
  .app-toast-position {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) and (pointer: coarse) {
  button,
  a[href],
  [role="button"],
  input,
  select {
    min-height: 48px;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Geist", "Geist Fallback", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

.font-display {
  font-family:
    var(--font-geist-sans), "Geist", "Geist Fallback", ui-sans-serif, system-ui,
    sans-serif;
}

.metric-value,
.timecode,
[data-timecode],
[data-id],
[data-stat] {
  font-family: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  button:not(:disabled):active,
  [role="button"]:not([aria-disabled="true"]):active {
    transform: none;
  }

  .team-chat-composer:focus-within {
    background: var(--surface-overlay);
    backdrop-filter: none;
  }
}