[x-cloak] { display: none !important; }

:root {
  --brand: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --bottom-nav-h: 4.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  /* z-index scale — use these tokens, not arbitrary values
     10: sticky headers  20: dropdowns  30: popovers
     40: mobile nav/topbar  50: modals/backdrops
     60: banners  70: toasts  80: debug */
  --z-sticky: 40;
  --z-popover: 50;
  --z-banner: 60;
  --z-toast: 70;
  /* shadcn-style semantic surface tokens (HSL channels for alpha compositing) */
  --bg: 210 40% 96%;           /* slate-100 — app background */
  --surface: 0 0% 100%;         /* white — cards, modals, inputs */
  --surface-2: 210 40% 90%;     /* slate-200 — secondary surfaces */
  --text: 222 47% 11%;         /* slate-900 — primary text */
  --text-muted: 215 16% 47%;   /* slate-500 — secondary text */
  --text-faint: 215 16% 65%;   /* slate-400 — tertiary text */
  --border: 214 32% 91%;       /* slate-200 — borders */
  --input: 214 32% 91%;        /* slate-200 — input borders */
  --surface-raised: 0 0% 100%;
  --surface-inset: 220 33% 98%;
  --ring: 239 84% 67%;
  --success: 160 84% 39%;
  --warning: 38 92% 50%;
  --danger: 350 89% 60%;
  --radius-sm: .65rem;
  --radius-md: .9rem;
  --radius-lg: 1.15rem;
  --shadow-panel: 0 1px 2px rgb(15 23 42 / .035), 0 8px 30px rgb(15 23 42 / .045);
}

.dark {
  --bg: 222 47% 7%;            /* slate-950 — app background */
  --surface: 222 47% 11%;      /* slate-900 — cards, modals */
  --surface-2: 217 33% 17%;    /* slate-800 — secondary surfaces */
  --text: 210 40% 98%;         /* slate-100 — primary text */
  --text-muted: 215 20% 65%;   /* slate-400 — secondary text */
  --text-faint: 215 16% 47%;   /* slate-500 — tertiary text */
  --border: 217 33% 20%;       /* slate-700 — borders */
  --input: 217 33% 20%;        /* slate-700 — input borders */
  --surface-raised: 222 47% 12%;
  --surface-inset: 222 47% 9%;
  --shadow-panel: 0 1px 2px rgb(0 0 0 / .25), 0 12px 32px rgb(0 0 0 / .18);
}

html {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  overscroll-behavior-y: contain;
}

/* Visible focus for keyboard users; mouse clicks keep the clean look */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Keep Tailwind form focus ring working alongside focus-visible */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgb(99 102 241 / .15) !important;
}

/* Respect motion preferences (WCAG 2.3.3 / iOS Reduce Motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-pulse { animation: none !important; }
  .pop { animation: none !important; }
}

/* Minimum tappable area on touch devices (WCAG 2.5.5, 44x44pt) */
@media (pointer: coarse) {
  .tap-target { min-height: 44px; min-width: 44px; }
}

/* iOS: 16px+ inputs avoid auto-zoom on focus */
@media (max-width: 767px) {
  input, select, textarea { font-size: 16px !important; }
}

.app-shell { min-height: 100dvh; }

.app-frame {
  width: min(100%, 96rem);
  margin-inline: auto;
  padding: 1rem;
}

.command-sidebar {
  position: sticky;
  top: 1rem;
  height: calc(100dvh - 2rem);
  flex-direction: column;
  padding: .85rem;
  border: 1px solid hsl(var(--border) / .75);
  border-radius: var(--radius-lg);
  background: hsl(var(--surface-raised) / .96);
  box-shadow: var(--shadow-panel);
  overflow-y: auto;
}
.command-sidebar nav { flex: 0 0 auto; }
.command-sidebar form:last-child { margin-top: auto; }

.command-topbar {
  min-height: 3.35rem;
  padding: .45rem .5rem .45rem .7rem;
  border: 1px solid hsl(var(--border) / .75);
  border-radius: var(--radius-lg);
  background: hsl(var(--surface-raised) / .92);
  box-shadow: 0 1px 2px rgb(15 23 42 / .035);
  backdrop-filter: blur(14px);
}

@media (min-width: 768px) {
  .app-frame { padding: 1rem 1.25rem; }
}
@media (min-width: 1280px) {
  .app-frame { padding: 1.25rem; }
}

.app-main {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
}
@media (min-width: 768px) {
  .app-main { padding-bottom: 0; }
  .pwa-install-offset { bottom: 1rem !important; }
}

.mobile-topbar {
  padding-top: var(--safe-top);
}

/* Bottom tab bar (iPhone) */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: end;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem calc(0.35rem + var(--safe-bottom));
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgb(226 232 240 / 0.9);
  box-shadow: 0 -4px 24px rgb(15 23 42 / 0.06);
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3rem;
  padding: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 0.65rem;
  transition: color 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}
.bottom-nav-link svg { width: 1.35rem; height: 1.35rem; }
.bottom-nav-link.active { color: var(--brand-600); background: rgb(238 242 255 / 0.8); }

.bottom-nav-fab {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: -1.1rem auto 0;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-600), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgb(79 70 229 / 0.45);
  touch-action: manipulation;
}
.bottom-nav-fab svg { width: 1.5rem; height: 1.5rem; }
.bottom-nav-fab:active { transform: scale(0.96); }

/* Modals: respect safe areas on notched iPhones */
@media (max-width: 767px) {
  .modal-sheet {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-sheet > form,
  .modal-sheet > div {
    max-height: 92dvh;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: calc(1rem + var(--safe-bottom)) !important;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subtle, modern scrollbars */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Card surfaces */
.card {
  background: hsl(var(--surface-raised));
  border: 1px solid hsl(var(--border) / .72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.workspace-card {
  background: hsl(var(--surface-raised));
  border: 1px solid hsl(var(--border) / .72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.workspace-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem .8rem;
  border-bottom: 1px solid hsl(var(--border) / .65);
}
.workspace-card-body { padding: 1rem; }
.eyebrow {
  font-size: .68rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: hsl(var(--text-faint));
}
.section-heading { font-size: .95rem; font-weight: 650; letter-spacing: -.015em; color: hsl(var(--text)); }
.section-copy { margin-top: .2rem; font-size: .75rem; line-height: 1.45; color: hsl(var(--text-muted)); }

.metric-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(9.75rem, 1fr);
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: .2rem;
}
.metric-tile,
.metric-card {
  position: relative;
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid hsl(var(--border) / .75);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-raised));
  scroll-snap-align: start;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.metric-tile:hover,
.metric-card:hover { border-color: hsl(var(--ring) / .35); box-shadow: 0 8px 22px rgb(15 23 42 / .06); transform: translateY(-1px); }
.metric-value { font-size: 1.65rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: hsl(var(--text)); }
.metric-card > strong { display: block; margin-top: .35rem; font-size: 1.65rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: hsl(var(--text)); overflow-wrap: anywhere; }
.metric-label { margin-top: .45rem; font-size: .72rem; font-weight: 600; color: hsl(var(--text-muted)); }
.metric-note { margin-top: .25rem; font-size: .66rem; color: hsl(var(--text-faint)); }
.metric-tile > div,
.metric-card > * { min-width: 0; }
.metric-label,
.metric-note { overflow-wrap: anywhere; }

.attention-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.7rem;
  padding: .7rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: background .12s ease, border-color .12s ease;
}
.attention-row:hover { background: hsl(var(--surface-inset)); border-color: hsl(var(--border) / .7); }
.attention-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border-radius: .72rem;
}
.attention-icon svg { width: 1rem; height: 1rem; }
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: .35rem .65rem;
  border: 1px solid hsl(var(--border));
  border-radius: .6rem;
  background: hsl(var(--surface-raised));
  color: hsl(var(--text-muted));
  font-size: .7rem;
  font-weight: 650;
  white-space: nowrap;
}
.mini-action:hover { border-color: hsl(var(--ring) / .45); color: var(--brand-600); }
.activity-line { position: relative; padding-left: 1.3rem; }
.activity-line::before { content: ""; position: absolute; left: .25rem; top: .55rem; bottom: -.85rem; width: 1px; background: hsl(var(--border)); }
.activity-line:last-child::before { display: none; }
.activity-dot { position: absolute; left: 0; top: .38rem; width: .55rem; height: .55rem; border: 2px solid hsl(var(--surface-raised)); border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 1px hsl(var(--border)); }

.filter-panel {
  padding: .8rem;
  border: 1px solid hsl(var(--border) / .72);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-inset));
}
.segmented-tabs {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem;
  border: 1px solid hsl(var(--border) / .7);
  border-radius: .85rem;
  background: hsl(var(--surface-inset));
}
.segmented-tab {
  min-height: 2.25rem;
  padding: .45rem .85rem;
  border-radius: .65rem;
  color: hsl(var(--text-muted));
  font-size: .78rem;
  font-weight: 650;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.segmented-tab-active { background: hsl(var(--surface-raised)); color: hsl(var(--text)); box-shadow: 0 1px 3px rgb(15 23 42 / .08); }
.entity-card {
  position: relative;
  padding: .9rem;
  border: 1px solid hsl(var(--border) / .78);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-raised));
  box-shadow: 0 1px 2px rgb(15 23 42 / .03);
  overflow: hidden;
}
.entity-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: hsl(var(--ring) / .55);
}
.entity-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .8rem;
  padding-top: .75rem;
  border-top: 1px solid hsl(var(--border) / .65);
}
.entity-quick-action {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: .65rem;
  font-size: .72rem;
  font-weight: 650;
}
.entity-quick-action svg { width: .95rem; height: .95rem; }
.data-table-shell { border: 1px solid hsl(var(--border) / .72); border-radius: var(--radius-md); overflow: hidden; }
.data-table-shell table thead { background: hsl(var(--surface-inset)); }
.data-table-shell table th { padding-top: .75rem; padding-bottom: .75rem; letter-spacing: .025em; text-transform: uppercase; font-size: .64rem; }
.data-table-shell table tbody tr { background: hsl(var(--surface-raised)); }
.data-table-shell table tbody tr:hover { background: hsl(var(--surface-inset)); }
.task-row-shell { border-color: hsl(var(--border) / .75) !important; border-radius: var(--radius-md) !important; box-shadow: 0 1px 2px rgb(15 23 42 / .025); }
.task-swipe-surface {
  min-height: 100%;
  background: hsl(var(--surface-raised));
  will-change: transform;
}

/* Command pages, pipeline board, and entity workspaces */
.command-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.command-primary-action {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border-radius: .72rem;
  background: var(--brand-600);
  color: #fff;
  font-size: .78rem;
  font-weight: 650;
  box-shadow: 0 5px 14px rgb(79 70 229 / .2);
  transition: background .12s ease, transform .12s ease;
}
.command-primary-action:hover { background: var(--brand-700); transform: translateY(-1px); }
.pipeline-board-shell {
  padding: .75rem;
  border: 1px solid hsl(var(--border) / .72);
  border-radius: var(--radius-lg);
  background: hsl(var(--surface-raised));
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.pipeline-board {
  display: flex;
  gap: .75rem;
  margin: 0 -.1rem;
  padding: .1rem .1rem .45rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.pipeline-column {
  display: flex;
  flex-direction: column;
  border: 1px solid hsl(var(--border) / .7);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-inset));
}
.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-height: 2.85rem;
  padding: .7rem .8rem;
  border-bottom: 1px solid hsl(var(--border) / .65);
}
.pipeline-stage-dot { width: .52rem; height: .52rem; border-radius: 999px; background: #94a3b8; }
.pipeline-stage-dot-1 { background: #64748b; }
.pipeline-stage-dot-2 { background: #6366f1; }
.pipeline-stage-dot-3 { background: #f59e0b; }
.pipeline-stage-dot-4 { background: #0ea5e9; }
.pipeline-stage-dot-5 { background: #10b981; }
.pipeline-stage-dot-6 { background: #f43f5e; }
.pipeline-count {
  display: inline-grid;
  min-width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  padding: 0 .35rem;
  border: 1px solid hsl(var(--border) / .7);
  border-radius: 999px;
  background: hsl(var(--surface-raised));
  color: hsl(var(--text-muted));
  font-size: .66rem;
  font-weight: 700;
}
.pipeline-card { padding: .72rem; border-color: hsl(var(--border) / .82); }
.pipeline-card:hover { border-color: hsl(var(--ring) / .38); }
.detail-workspace { max-width: 96rem; margin-inline: auto; }
.detail-hero {
  position: relative;
  background:
    radial-gradient(circle at 92% 8%, rgb(99 102 241 / .09), transparent 23rem),
    hsl(var(--surface-raised));
}
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), #8b5cf6);
}
.detail-action-strip { scrollbar-width: none; }
.detail-action-strip::-webkit-scrollbar { display: none; }
.detail-metrics { grid-auto-columns: minmax(10rem, 1fr); }
.metric-tile-accent { background: linear-gradient(145deg, rgb(238 242 255), #fff); border-color: rgb(199 210 254); }
.metric-value-icon { color: var(--brand-600); font-size: 1.2rem; letter-spacing: -.02em; }
.detail-context-shell { position: relative; }
.detail-context-layout { display: grid; gap: 1rem; align-items: start; }
.detail-context-main { min-width: 0; }
.detail-context-rail { display: none; min-width: 0; }
.detail-rail-card {
  padding: .9rem;
  border: 1px solid hsl(var(--border) / .76);
  border-radius: var(--radius-lg);
  background: hsl(var(--surface-raised));
  box-shadow: var(--shadow-panel);
}
.detail-rail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.detail-rail-summary div { padding: .55rem .3rem; border-radius: .7rem; background: hsl(var(--surface-inset)); text-align: center; }
.detail-rail-summary span { display: block; color: hsl(var(--text)); font-size: 1rem; font-weight: 700; line-height: 1; }
.detail-rail-summary small { display: block; margin-top: .3rem; color: hsl(var(--text-faint)); font-size: .58rem; }
.detail-section-nav { display: grid; gap: .2rem; }
.detail-section-nav a {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .65rem;
  border-radius: .65rem;
  color: hsl(var(--text-muted));
  font-size: .72rem;
  font-weight: 620;
}
.detail-section-nav a:hover { background: hsl(var(--surface-inset)); color: var(--brand-600); }
.detail-section-nav a span { color: hsl(var(--text-faint)); font-size: .65rem; }
.detail-rail-primary,
.detail-rail-actions a {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: .65rem;
  font-size: .72rem;
  font-weight: 650;
}
.detail-rail-primary { width: 100%; background: var(--brand-600); color: #fff; }
.detail-rail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.detail-rail-actions a { border: 1px solid hsl(var(--border)); color: hsl(var(--text-muted)); }
.detail-mobile-context-trigger {
  position: fixed;
  right: max(1rem, var(--safe-right));
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + .85rem);
  z-index: var(--z-sticky);
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  border: 1px solid hsl(var(--border) / .8);
  border-radius: 999px;
  background: hsl(var(--surface-raised) / .96);
  color: hsl(var(--text));
  box-shadow: 0 10px 30px rgb(15 23 42 / .18);
  backdrop-filter: blur(14px);
  font-size: .72rem;
  font-weight: 700;
}
.detail-mobile-context-trigger svg { width: 1rem; height: 1rem; color: var(--brand-600); }
.detail-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-popover);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem 0;
  background: rgb(15 23 42 / .48);
  backdrop-filter: blur(3px);
}
.detail-section-sheet {
  width: min(100%, 34rem);
  max-height: min(78dvh, 36rem);
  padding: .65rem 1rem calc(1rem + var(--safe-bottom));
  border: 1px solid hsl(var(--border) / .75);
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  background: hsl(var(--surface-raised));
  box-shadow: 0 -16px 50px rgb(15 23 42 / .22);
  overflow-y: auto;
}
.detail-sheet-handle { width: 2.5rem; height: .25rem; margin: 0 auto .85rem; border-radius: 999px; background: hsl(var(--border)); }
.detail-sheet-close { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 999px; background: hsl(var(--surface-inset)); color: hsl(var(--text-muted)); font-size: 1.25rem; }
.detail-sheet-nav { display: grid; gap: .35rem; }
.detail-sheet-nav a {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .8rem;
  border: 1px solid hsl(var(--border) / .7);
  border-radius: .8rem;
  background: hsl(var(--surface-inset));
  color: hsl(var(--text));
  font-size: .82rem;
  font-weight: 620;
}
.detail-sheet-nav a span { color: hsl(var(--text-faint)); font-size: .72rem; }

/* Ask intelligence and revenue workspaces */
.ask-workspace,
.revenue-workspace { max-width: 96rem; margin-inline: auto; }
.ask-hero {
  background:
    radial-gradient(circle at 88% 12%, rgb(139 92 246 / .12), transparent 24rem),
    radial-gradient(circle at 4% 100%, rgb(99 102 241 / .07), transparent 20rem),
    hsl(var(--surface-raised));
}
.ask-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  min-width: 13rem;
  padding: .25rem;
  border: 1px solid hsl(var(--border) / .75);
  border-radius: .85rem;
  background: hsl(var(--surface-inset));
}
.ask-mode-option {
  display: flex;
  min-height: 2.7rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: .65rem;
  color: hsl(var(--text-muted));
  font-size: .72rem;
  font-weight: 650;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.ask-mode-option small { margin-top: .05rem; color: hsl(var(--text-faint)); font-size: .58rem; font-weight: 550; }
.ask-mode-active { background: hsl(var(--surface-raised)); color: hsl(var(--text)); box-shadow: 0 1px 4px rgb(15 23 42 / .09); }
.ask-composer { box-shadow: 0 10px 32px rgb(79 70 229 / .08); }
.ask-composer input { min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.ask-response-grid { display: grid; gap: 1rem; align-items: start; }
.ask-chat-scroll { min-height: 18rem; max-height: 32rem; }
.ask-sources-rail { min-width: 0; }
.starter-prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.starter-prompt {
  display: flex;
  min-height: 5rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid hsl(var(--border) / .78);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-raised));
  color: hsl(var(--text-muted));
  text-align: left;
  font-size: .78rem;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.starter-prompt span { color: var(--brand-600); font-size: .62rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.starter-prompt:hover { border-color: hsl(var(--ring) / .4); background: hsl(var(--surface-inset)); transform: translateY(-1px); }
.revenue-tabs { display: flex; width: max-content; max-width: 100%; overflow-x: auto; }
.revenue-card {
  padding: 1rem;
  border: 1px solid hsl(var(--border) / .78);
  border-radius: var(--radius-md);
  background: hsl(var(--surface-raised));
  box-shadow: 0 1px 2px rgb(15 23 42 / .025);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.revenue-card:hover { border-color: hsl(var(--ring) / .3); box-shadow: 0 8px 22px rgb(15 23 42 / .05); }
.invoice-actions button,
.invoice-actions a { min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 767px) {
  .metric-rail {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .metric-tile,
  .metric-card { width: 100%; }
  .command-page-header { align-items: stretch; flex-direction: column; }
  .command-page-header > :last-child { justify-content: space-between; }
  .pipeline-board-shell { margin-inline: -.25rem; padding: .55rem; }
  .pipeline-metrics .metric-tile { min-width: 0; }
  .detail-hero { margin-inline: -.25rem; }
  .ask-hero { margin-inline: -.25rem; }
  .ask-mode-switch { width: 100%; min-width: 0; }
  .ask-composer { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 3.8rem); z-index: var(--z-sticky); }
  .ask-composer button { padding-inline: .8rem; }
  .starter-prompt-grid { grid-template-columns: 1fr; }
  .revenue-tabs.segmented-tabs { display: flex; width: 100%; }
  .revenue-card { padding: .85rem; }
  .segmented-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .segmented-tab { min-height: 2.65rem; }
}

@media (min-width: 1024px) {
  .metric-rail { grid-auto-flow: initial; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .pipeline-metrics { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .detail-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .revenue-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ask-response-grid { grid-template-columns: minmax(0, 1fr) 20rem; }
  .ask-chat-scroll { min-height: 26rem; max-height: 40rem; }
  .ask-sources-rail { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; padding-right: .15rem; }
  .workspace-card-header { padding: 1.1rem 1.2rem .9rem; }
  .workspace-card-body { padding: 1.15rem 1.2rem; }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .detail-mobile-context-trigger { bottom: 1.25rem; }
}

@media (min-width: 1280px) {
  .detail-context-layout { grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.1rem; }
  .detail-context-rail { display: block; position: sticky; top: 1rem; }
  .detail-mobile-context-trigger,
  .detail-sheet-backdrop { display: none !important; }
}

/* Page + section titles — one consistent scale */
.page-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: #0f172a; }
@media (min-width: 768px) { .page-title { font-size: 1.5rem; } }
.page-subtitle { font-size: 0.825rem; color: #64748b; margin-top: 0.125rem; }

/* Empty states */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2.5rem 1.5rem; gap: 0.35rem;
}
.empty-state-icon {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px;
  background: rgb(238 242 255); color: var(--brand-600);
  margin-bottom: 0.35rem;
}
.empty-state-icon svg { width: 1.35rem; height: 1.35rem; }
.empty-state-title { font-size: 0.875rem; font-weight: 600; color: #334155; }
.empty-state-text { font-size: 0.8rem; color: #94a3b8; max-width: 22rem; }
.card-hover { transition: box-shadow .15s ease, transform .15s ease; }
.card-hover:hover { box-shadow: 0 4px 14px rgb(15 23 42 / .08); }

/* Buttons */
.btn { @apply inline-flex items-center justify-center gap-1.5 rounded-lg text-sm font-medium transition; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { color: #475569; }
.btn-ghost:hover { background: rgb(241 245 249); }

/* Sidebar nav links */
.nav-link {
  display: flex; align-items: center; gap: .6rem;
  border-radius: .6rem; padding: .5rem .65rem;
  font-size: .825rem; font-weight: 500; color: #475569;
  transition: background .12s ease, color .12s ease;
}
.nav-link:hover { background: rgb(241 245 249); color: #0f172a; }
.nav-link.active { background: var(--brand-600); color: #fff; box-shadow: 0 1px 3px rgb(79 70 229 / .35); }
.nav-link.active svg { color: #fff; }
.nav-link svg { width: 1rem; height: 1rem; color: #94a3b8; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 9999px; letter-spacing: .01em; }

/* Initials avatar */
.avatar {
  display: inline-grid; place-items: center;
  font-size: .7rem; font-weight: 700; color: #fff;
  width: 1.75rem; height: 1.75rem; border-radius: .55rem;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  flex-shrink: 0;
}

/* Kanban card */
.kcard { background:#fff; border:1px solid rgb(226 232 240/.9); border-radius:.7rem; padding:.6rem .7rem; box-shadow:0 1px 2px rgb(15 23 42/.04); cursor:grab; transition: box-shadow .12s ease, transform .12s ease; }
.kcard:hover { box-shadow: 0 3px 10px rgb(15 23 42/.09); }
.kcard:active { cursor:grabbing; }
.kcard.dragging { opacity:.45; box-shadow: 0 0 0 2px var(--brand); }
.kcol-drop.dragover { background: rgb(99 102 241 / .07); }

/* Inputs */
input, select, textarea {
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgb(99 102 241 / .15) !important;
  outline: none !important;
}

/* Fade-in for modals */
@keyframes pop { from { opacity:0; transform: translateY(4px) scale(.99); } to { opacity:1; transform: none; } }
.pop { animation: pop .12s ease-out; }

/* Global toasts */
.nexy-toasts {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  pointer-events: none;
  width: min(92vw, 26rem);
}

/* Persistent offline/outbox status. It stays out of the way when fully synced. */
.nexy-connectivity {
  position: fixed;
  z-index: var(--z-toast);
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.25rem;
  padding: .45rem .7rem;
  border: 1px solid rgb(203 213 225 / .9);
  border-radius: 999px;
  background: rgb(255 255 255 / .96);
  color: #475569;
  box-shadow: 0 10px 30px rgb(15 23 42 / .16);
  font-size: .75rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}
.nexy-connectivity[hidden] { display: none !important; }
.nexy-connectivity-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #64748b; }
.nexy-connectivity button { border: 0; border-left: 1px solid currentColor; padding-left: .5rem; color: inherit; font: inherit; cursor: pointer; }
.nexy-connectivity.is-offline { border-color: rgb(251 191 36 / .65); background: rgb(255 251 235 / .97); color: #92400e; }
.nexy-connectivity.is-offline .nexy-connectivity-dot { background: #f59e0b; }
.nexy-connectivity.is-syncing, .nexy-connectivity.is-pending { border-color: rgb(165 180 252 / .7); color: #4338ca; }
.nexy-connectivity.is-syncing .nexy-connectivity-dot { background: #6366f1; animation: nexy-sync-pulse 1s ease-in-out infinite; }
.nexy-connectivity.is-pending .nexy-connectivity-dot { background: #8b5cf6; }
.nexy-connectivity.is-failed { border-color: rgb(253 164 175 / .75); background: rgb(255 241 242 / .97); color: #be123c; }
.nexy-connectivity.is-failed .nexy-connectivity-dot { background: #e11d48; }
@keyframes nexy-sync-pulse { 50% { transform: scale(1.45); opacity: .55; } }
@media (max-width: 767px) {
  .nexy-connectivity {
    right: max(.75rem, env(safe-area-inset-right));
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + .7rem);
  }
}
.dark .nexy-connectivity { background: hsl(var(--surface) / .96); border-color: hsl(var(--border)); color: hsl(var(--text-muted)); }
.dark .nexy-connectivity.is-offline { background: hsl(38 92% 12% / .96); color: hsl(38 92% 68%); }
.dark .nexy-connectivity.is-syncing, .dark .nexy-connectivity.is-pending { color: hsl(239 84% 75%); }
.dark .nexy-connectivity.is-failed { background: hsl(347 77% 12% / .96); color: hsl(347 77% 72%); }
@media (min-width: 768px) {
  .nexy-toasts { bottom: 1.5rem; }
}
.nexy-toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  max-width: 100%;
  padding: .6rem 1rem;
  border-radius: .8rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: .825rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgb(15 23 42 / .25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.nexy-toast.show { opacity: 1; transform: none; }
.nexy-toast-icon {
  display: inline-grid; place-items: center;
  width: 1.15rem; height: 1.15rem; border-radius: 9999px;
  font-size: .65rem; font-weight: 700; flex-shrink: 0;
  background: #10b981; color: #fff;
}
.nexy-toast-error .nexy-toast-icon { background: #f43f5e; }
.nexy-toast-info .nexy-toast-icon { background: #6366f1; }
.nexy-toast-action {
  margin-left: .35rem;
  padding: .3rem .6rem;
  border-radius: .5rem;
  background: rgb(255 255 255 / .15);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: auto;
}
.nexy-toast-action:active { background: rgb(255 255 255 / .25); }

.nexy-ptr {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 3.6rem);
  left: 50%;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: -1.125rem;
  transform: translateY(-100%);
  opacity: 0;
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  background: #fff;
  color: #4f46e5;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgb(15 23 42 / .18);
  pointer-events: none;
}
.nexy-ptr svg { width: 1.1rem; height: 1.1rem; transition: transform .15s ease; }
.nexy-ptr.ptr-ready svg { transform: rotate(180deg); }
.nexy-ptr.ptr-spin svg { animation: nexy-ptr-spin .7s linear infinite; }
@keyframes nexy-ptr-spin { to { transform: rotate(360deg); } }
@media (min-width: 768px) { .nexy-ptr { display: none; } }
.dark .nexy-ptr { background: hsl(var(--surface)); color: var(--brand); }

.ai-action-proposals {
  border-left: 3px solid #f59e0b;
  padding-left: .65rem;
}

.wa-chat-thread {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cdc4' fill-opacity='0.35'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.wa-bubble-in { border-top-left-radius: 0.15rem; }
.wa-bubble-out { border-top-right-radius: 0.15rem; }

/* ===================================================================
   DARK MODE
   Custom-class dark variants + common Tailwind utility overrides.
   The utility overrides (higher specificity: .dark .utility = 0,2,0
   vs Tailwind's .utility = 0,1,0) let us darken ALL templates at once
   without adding dark: to every element across 11+ files.
   Use !important to win against Tailwind CDN's runtime-injected <style>.
   =================================================================== */

.dark { color-scheme: dark; }

/* ---- Custom design-system classes ---- */

.dark .card {
  background: hsl(var(--surface));
  border-color: hsl(var(--border) / 0.6);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.2);
}
.dark .card-hover:hover { box-shadow: 0 4px 14px rgb(0 0 0 / 0.4); }

.dark .nav-link { color: hsl(var(--text-muted)); }
.dark .nav-link:hover { background: hsl(var(--surface-2)); color: hsl(var(--text)); }
.dark .nav-link svg { color: hsl(var(--text-faint)); }

.dark .btn-ghost { color: hsl(var(--text-muted)); }
.dark .btn-ghost:hover { background: hsl(var(--surface-2)); }

.dark .page-title { color: hsl(var(--text)); }
.dark .page-subtitle { color: hsl(var(--text-muted)); }

.dark .empty-state-icon { background: hsl(var(--surface-2)); }
.dark .empty-state-title { color: hsl(var(--text)); }
.dark .empty-state-text { color: hsl(var(--text-faint)); }

.dark .pill { color: hsl(var(--text)); }

.dark .kcard {
  background: hsl(var(--surface));
  border-color: hsl(var(--border) / 0.8);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}
.dark .kcard:hover { box-shadow: 0 3px 10px rgb(0 0 0 / 0.4); }
.dark .kcol-drop.dragover { background: hsl(239 84% 67% / 0.1); }

.dark .mobile-bottom-nav {
  background: hsl(var(--surface) / 0.92);
  border-top-color: hsl(var(--border) / 0.9);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 0.3);
}
.dark .bottom-nav-link { color: hsl(var(--text-muted)); }
.dark .bottom-nav-link.active { color: var(--brand); background: hsl(239 84% 67% / 0.15); }

.dark input, .dark select, .dark textarea {
  background-color: hsl(var(--surface-2));
  border-color: hsl(var(--input));
  color: hsl(var(--text));
}
.dark input::placeholder, .dark textarea::placeholder { color: hsl(var(--text-faint)); }
.dark input:focus, .dark select:focus, .dark textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px hsl(239 84% 67% / 0.2) !important;
}
.dark select { background-image: none; }

.dark * { scrollbar-color: hsl(217 33% 30%) transparent; }
.dark *::-webkit-scrollbar-thumb { background: hsl(217 33% 30%); }
.dark *::-webkit-scrollbar-thumb:hover { background: hsl(217 33% 40%); }

.dark .nexy-toast { background: hsl(var(--surface)); border: 1px solid hsl(var(--border)); }

/* ---- Tailwind utility overrides (neutral surfaces) ---- */

.dark .bg-white { background-color: hsl(var(--surface)) !important; }
.dark .bg-slate-50 { background-color: hsl(var(--surface-2)) !important; }
.dark .bg-slate-100 { background-color: hsl(222 47% 14%) !important; }
.dark .bg-slate-200 { background-color: hsl(222 47% 18%) !important; }
.dark .bg-slate-800 { background-color: hsl(222 47% 20%) !important; }
.dark .bg-slate-900 { background-color: hsl(var(--bg)) !important; }

/* Opacity-modified backgrounds */
.dark .bg-white\/90 { background-color: hsl(var(--surface) / 0.9) !important; }
.dark .bg-white\/95 { background-color: hsl(var(--surface) / 0.95) !important; }
.dark .bg-white\/80 { background-color: hsl(var(--surface) / 0.8) !important; }
.dark .bg-slate-50\/70 { background-color: hsl(var(--surface-2) / 0.7) !important; }
.dark .bg-slate-50\/80 { background-color: hsl(var(--surface-2) / 0.8) !important; }
.dark .bg-slate-50\/50 { background-color: hsl(var(--surface-2) / 0.5) !important; }
.dark .bg-slate-50\/60 { background-color: hsl(var(--surface-2) / 0.6) !important; }
.dark .bg-slate-50\/40 { background-color: hsl(var(--surface-2) / 0.4) !important; }
.dark .bg-slate-100\/80 { background-color: hsl(222 47% 14% / 0.8) !important; }

/* Text colors */
.dark .text-slate-900 { color: hsl(var(--text)) !important; }
.dark .text-slate-800 { color: hsl(210 40% 90%) !important; }
.dark .text-slate-700 { color: hsl(215 16% 70%) !important; }
.dark .text-slate-600 { color: hsl(var(--text-muted)) !important; }
.dark .text-slate-500 { color: hsl(var(--text-muted)) !important; }
.dark .text-slate-400 { color: hsl(var(--text-faint)) !important; }
.dark .text-slate-300 { color: hsl(215 16% 50%) !important; }

/* Borders */
.dark .border-slate-200 { border-color: hsl(var(--border)) !important; }
.dark .border-slate-100 { border-color: hsl(222 47% 16%) !important; }
.dark .border-slate-300 { border-color: hsl(217 33% 30%) !important; }

/* Tinted backgrounds → dark variants (reduced opacity to stay subtle) */
.dark .bg-amber-50 { background-color: hsl(38 92% 50% / 0.12) !important; }
.dark .bg-amber-50\/80 { background-color: hsl(38 92% 50% / 0.1) !important; }
.dark .bg-violet-50 { background-color: hsl(258 90% 66% / 0.12) !important; }
.dark .bg-violet-50\/80 { background-color: hsl(258 90% 66% / 0.1) !important; }
.dark .bg-emerald-50 { background-color: hsl(152 76% 40% / 0.12) !important; }
.dark .bg-emerald-50\/80 { background-color: hsl(152 76% 40% / 0.1) !important; }
.dark .bg-emerald-50\/60 { background-color: hsl(152 76% 40% / 0.08) !important; }
.dark .bg-emerald-50\/50 { background-color: hsl(152 76% 40% / 0.06) !important; }
.dark .bg-sky-50 { background-color: hsl(199 89% 48% / 0.12) !important; }
.dark .bg-sky-50\/80 { background-color: hsl(199 89% 48% / 0.1) !important; }
.dark .bg-rose-50 { background-color: hsl(347 77% 50% / 0.12) !important; }
.dark .bg-green-50 { background-color: hsl(152 76% 40% / 0.12) !important; }
.dark .bg-green-50\/40 { background-color: hsl(152 76% 40% / 0.06) !important; }
.dark .bg-brand-50 { background-color: hsl(239 84% 67% / 0.12) !important; }
.dark .bg-brand-50\/80 { background-color: hsl(239 84% 67% / 0.1) !important; }

/* Tinted text — keep readable on dark surfaces */
.dark .text-amber-800 { color: hsl(38 92% 60%) !important; }
.dark .text-amber-700 { color: hsl(38 92% 60%) !important; }
.dark .text-amber-900 { color: hsl(38 92% 65%) !important; }
.dark .text-amber-600 { color: hsl(38 92% 55%) !important; }
.dark .text-amber-500 { color: hsl(38 92% 50%) !important; }
.dark .text-violet-800 { color: hsl(258 90% 75%) !important; }
.dark .text-violet-700 { color: hsl(258 90% 75%) !important; }
.dark .text-violet-600 { color: hsl(258 90% 70%) !important; }
.dark .text-emerald-700 { color: hsl(152 76% 65%) !important; }
.dark .text-emerald-600 { color: hsl(152 76% 55%) !important; }
.dark .text-emerald-900 { color: hsl(152 76% 70%) !important; }
.dark .text-sky-700 { color: hsl(199 89% 65%) !important; }
.dark .text-sky-600 { color: hsl(199 89% 60%) !important; }
.dark .text-rose-600 { color: hsl(347 77% 65%) !important; }
.dark .text-rose-700 { color: hsl(347 77% 65%) !important; }
.dark .text-green-700 { color: hsl(152 76% 65%) !important; }
.dark .text-green-600 { color: hsl(152 76% 55%) !important; }
.dark .text-indigo-700 { color: hsl(239 84% 75%) !important; }
.dark .text-brand-900 { color: hsl(239 84% 80%) !important; }
.dark .text-brand-700 { color: hsl(239 84% 75%) !important; }
.dark .text-brand-600 { color: hsl(239 84% 70%) !important; }

/* Tinted borders */
.dark .border-amber-200 { border-color: hsl(38 92% 50% / 0.3) !important; }
.dark .border-violet-200 { border-color: hsl(258 90% 66% / 0.3) !important; }
.dark .border-emerald-200 { border-color: hsl(152 76% 40% / 0.3) !important; }
.dark .border-rose-200 { border-color: hsl(347 77% 50% / 0.3) !important; }
.dark .border-rose-100 { border-color: hsl(347 77% 50% / 0.2) !important; }
.dark .border-brand-200 { border-color: hsl(239 84% 67% / 0.3) !important; }
.dark .border-sky-200 { border-color: hsl(199 89% 48% / 0.3) !important; }
.dark .border-green-200 { border-color: hsl(152 76% 40% / 0.3) !important; }
.dark .border-dashed { border-style: dashed; }

/* Gradient surfaces (dashboard hero, AI assistant header) */
.dark .from-brand-50\/80 { --tw-gradient-from: hsl(239 84% 67% / 0.1) !important; }
.dark .from-brand-50 { --tw-gradient-from: hsl(239 84% 67% / 0.1) !important; }
.dark .to-white { --tw-gradient-to: hsl(var(--surface)) !important; }
.dark .to-violet-50\/80 { --tw-gradient-to: hsl(258 90% 66% / 0.1) !important; }
.dark .from-slate-50\/50 { --tw-gradient-from: hsl(var(--surface-2) / 0.5) !important; }
.dark .from-slate-50\/40 { --tw-gradient-from: hsl(var(--surface-2) / 0.4) !important; }

/* Pipeline kanban column background */
.dark .bg-slate-200\/45 { background-color: hsl(222 47% 14% / 0.5) !important; }
.dark .bg-slate-200\/80 { background-color: hsl(222 47% 18% / 0.8) !important; }
.dark .border-slate-300\/60 { border-color: hsl(217 33% 30% / 0.6) !important; }
.dark .border-slate-200\/80 { border-color: hsl(var(--border) / 0.6) !important; }
.dark .border-slate-200\/60 { border-color: hsl(var(--border) / 0.5) !important; }

/* Modal backdrops already use bg-slate-900/50 or bg-black/40 — work in both modes */
/* WhatsApp thread — darken the chat wallpaper */
.dark .wa-chat-thread {
  background-color: hsl(var(--bg));
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23475569' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
