/* RunWithAI dashboard refresh for 4.0.12
   Append after the installed White-label Custom CSS. The original block owns
   the logo, fonts and theme colors. Keep this block separately versioned. */

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"]:has([data-tour="new-employee"], [data-tour="employee-grid"], main img + h2 + p) {
  --rwa-line: hsl(var(--border));
  --rwa-ink: hsl(var(--foreground));
  --rwa-muted: hsl(var(--muted-foreground));
  --rwa-raised: hsl(var(--card));
  --rwa-hover: hsl(var(--accent));
  --rwa-display: "RunWithAI Bricolage", var(--font-sans), sans-serif;
  --rwa-shadow: 0 1px 2px #13182b12, 0 3px 12px #13182b0a;
}

html.dark[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] {
  --rwa-shadow: 0 1px 3px #0005, 0 4px 12px #0003;
}

/* The dashboard preserves accessible control names. Radix renders the mobile
   drawer outside the desktop sidebar wrapper. */
html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) {
  --rwa-sidebar-line: hsl(var(--border));
  --rwa-sidebar-ink: hsl(var(--foreground));
  --rwa-sidebar-muted: hsl(var(--muted-foreground));
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"] {
  min-block-size: var(--rwa-sidebar-row-height, 44px);
  padding-block: 4px;
  gap: 10px;
  border-radius: 9px;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"] > span:has(> span + span) {
  min-inline-size: 0;
  white-space: normal;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"] > span:has(> span + span) > span:first-child {
  color: var(--rwa-sidebar-ink);
  font-size: .875rem;
  line-height: var(--rwa-sidebar-title-leading, 1.25rem);
  font-weight: 650;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"] > span:has(> span + span) > span:nth-child(2) {
  color: var(--rwa-sidebar-muted);
  font-size: .75rem;
  line-height: 1rem;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-group"] {
  padding-block: var(--rwa-sidebar-group-padding, 4px);
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-group-label"]:not(:has(button)) {
  color: var(--rwa-sidebar-muted);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Hide the native account menu's decorative version label. */
html[data-rwa-theme="runwithai"] [data-slot="sidebar-footer"]
  .bg-popover > .flex.items-center.gap-2 > span.shrink-0.select-none[class~="text-[10px]"] {
  display: none;
}

/* Match the native desktop employee rail density and retain the Chat styling. */
@media (min-width: 768px) {
  html[data-rwa-theme="runwithai"]
    [data-slot="sidebar-wrapper"]:has(> main[data-slot="sidebar-inset"] > .chat-page-container:not(.widget-mode))
    > [data-slot="sidebar"][data-state="expanded"] {
    --rwa-sidebar-row-height: 32px;
    --rwa-sidebar-group-padding: 8px;
  }
}

/* Nova has no tour hook in 4.0.12. Use its waveform icon within the
   sidebar button. A changed icon leaves the vendor treatment in place. */
html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"]:has(> svg > path[d="M3 10v4M7 6v12M11 3v18M15 6v12M19 10v4"]) {
  min-block-size: var(--rwa-sidebar-nova-height, 52px);
  border-color: var(--rwa-sidebar-line);
  background: hsl(var(--card));
  background-image: none;
  box-shadow: 0 1px 3px #13182b14;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"]:has(> svg > path[d="M3 10v4M7 6v12M11 3v18M15 6v12M19 10v4"]) > svg:first-child {
  inline-size: var(--rwa-sidebar-nova-icon, 34px);
  block-size: var(--rwa-sidebar-nova-icon, 34px);
  padding: var(--rwa-sidebar-nova-icon-padding, 8px);
  border-radius: 9px;
  background: #13182b;
  color: #fbf8f3;
}

html[data-rwa-theme="runwithai"] :is([data-slot="sidebar"][data-state="expanded"], [data-sidebar="sidebar"][data-mobile="true"]) [data-slot="sidebar-menu-button"]:has(> svg > path[d="M3 10v4M7 6v12M11 3v18M15 6v12M19 10v4"]) > span:last-child {
  color: hsl(var(--success));
  background: hsl(var(--success) / .12);
}

/* Scope spacing to the dashboard's roster wrapper. */
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] > div:has(> div > [data-tour="employee-grid"]) {
  max-inline-size: 80rem;
  padding: clamp(1rem, 3vw, 2.5rem);
}

/* The native provider setup card switches to a row based on viewport width.
   Use the card's available space so the sidebar and longer labels can fit. */
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"]
  > div > .absolute.inset-0.z-30 > .max-w-xl:has(> h1 + p) > div.mt-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"]
  > div > .absolute.inset-0.z-30 > .max-w-xl:has(> h1 + p) > div.mt-6 > button,
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"]
  > div > .absolute.inset-0.z-30 > .max-w-xl:has(> h1 + p) > button {
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 2.25rem;
  block-size: auto;
  padding-block: .5rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] {
  /* The vendor sets its grid columns inline. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)) !important;
  gap: clamp(.75rem, 1.25vw, 1rem);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] > * {
  --rwa-photo-tint: #e6eefb;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] > :nth-child(3n + 2) {
  --rwa-photo-tint: #e3f4e8;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] > :nth-child(3n + 3) {
  --rwa-photo-tint: #ffede3;
}

/* Known 4.0.12 card contract. DndKit's sortable wraps the actual card.
   Match a card only while its portrait, identity and action row exist. */
html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div:has(> div:first-child > img):has(h3):has(> div:last-child [data-slot="button"]) {
  border-color: var(--rwa-line);
  border-radius: 16px;
  box-shadow: var(--rwa-shadow);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(> img):has(h3) {
  display: flex;
  flex-direction: column;
  height: auto;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(h3) > :is(img, img + div) {
  inline-size: 100%;
  block-size: clamp(8.75rem, 25vw, 10rem);
  flex: none;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(h3) > img {
  background: var(--rwa-photo-tint);
  object-fit: contain;
  object-position: center bottom;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(h3) > img + div {
  /* Preserve the vendor's inline display switch on image failure. */
  background: radial-gradient(circle, #13182b 0 2.6rem, transparent 2.65rem) var(--rwa-photo-tint) !important;
  color: #fbf8f3;
  font: 700 2.1rem/1 var(--rwa-display);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(> img) > div:has(h3) {
  position: static;
  padding: 10px 14px 4px;
  background: none !important;

  /* These badges used to sit on the portrait's dark gradient. */
  & :is(button[title][class~="text-white"], span[title][class~="text-white/90"]) {
    color: var(--rwa-ink);
    background: hsl(var(--muted));
    border-color: var(--rwa-line);
  }

  & button[title][class~="text-white"]:hover {
    background: var(--rwa-hover);
  }

  & span[title][class~="text-white/70"] {
    color: var(--rwa-muted);
  }
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] h3 {
  color: var(--rwa-ink);
  font-size: 1rem;
  line-height: 1.375rem;
  font-weight: 700;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] div:has(> h3) + p {
  color: var(--rwa-muted);
  font-size: .8125rem;
  line-height: 1.25rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(> img) > div > div:has(> span:first-child > span):has(> span + span) {
  min-block-size: 24px;
  color: var(--rwa-ink);
  background: var(--rwa-raised);
  box-shadow: inset 0 0 0 1px var(--rwa-line), var(--rwa-shadow);
  backdrop-filter: none;
}

/* The native timer uses translucent white for the old dark status badge. */
html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:first-child:has(> img) > div > div:has(> span:first-child > span) > span[class~="text-white/60"] {
  color: var(--rwa-muted);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:last-child:has(> div > [data-slot="button"]) {
  padding: 6px 0 8px;
  margin: 5px 12px 0;
  border-block-start: 1px solid var(--rwa-line);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:last-child > div:has(> [data-slot="button"]) {
  flex-wrap: wrap;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:last-child [data-slot="button"][data-variant="outline"] {
  flex: 0 0 auto;
  margin-inline-end: auto;
  padding-inline: 8px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:last-child [data-slot="button"][data-variant="outline"]:hover {
  background: var(--rwa-hover);
}

html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div > div:last-child [data-slot="button"][data-variant="ghost"] {
  color: var(--rwa-muted);
}

/* Mobile renders separate roster rows. Match the identity and native menu
   together so unrelated dashboard lists keep their vendor styles. */
@media (max-width: 767px) {
  html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] div:has(> div:nth-child(2) > h3 + p):has(> div:last-child > [data-slot="dropdown-menu-trigger"]) {
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    box-shadow: var(--rwa-shadow);
  }

  html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] div:has(> div:nth-child(2) > h3 + p):has(> div:last-child > [data-slot="dropdown-menu-trigger"]) > div:first-child > img {
    inline-size: 3.5rem;
    block-size: 3.5rem;
    background: #e6eefb;
    object-fit: contain;
    object-position: center bottom;
  }

  html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] div:has(> div:last-child > [data-slot="dropdown-menu-trigger"]) > div:nth-child(2):has(> h3 + p) > :is(h3, p) {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Keep the vendor's empty heading, translated text and actual Hire action. */
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] div:has(> img + h2 + p) {
  max-inline-size: 32rem;
  margin-inline: auto;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px dashed var(--rwa-line);
  border-radius: 20px;
  background: var(--rwa-raised);
}

html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] div:has(> img + h2 + p) > h2 {
  font-family: var(--rwa-display);
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: -.015em;
}

@media (prefers-reduced-motion: reduce) {
  html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div {
    transition: none;
  }

  html[data-rwa-theme="runwithai"] [data-tour="employee-grid"] [aria-roledescription="sortable"] > div:hover {
    translate: none;
    transform: none;
  }
}

/* Existing 4.0.12 sheets. Icon and slot pairs identify each surface even when
   its title is translated. Keep the vendor dimensions and scroll containers. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> div > svg.lucide-settings + h2),
  :has(> [data-slot="sheet-header"] > div > div > select),
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) {
  --rwa-panel-card: hsl(var(--card));
  --rwa-panel-line: hsl(var(--border));
  --rwa-panel-muted: hsl(var(--muted-foreground));
  --rwa-panel-shadow: 0 1px 2px #13182b12, 0 3px 12px #13182b0a;
  background: hsl(var(--background));
}

html.dark[data-rwa-theme="runwithai"] [data-slot="sheet-content"] {
  --rwa-panel-shadow: 0 1px 2px #0005, 0 4px 12px #0003;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> [data-slot="sheet-header"] > div > div > select),
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) > [data-slot="sheet-header"] {
  background: var(--rwa-panel-card);
  border-color: var(--rwa-panel-line);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"] > [data-slot="sheet-title"]:has(svg.lucide-columns-3, svg.lucide-upload) {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* Settings launcher. Leave the accessible title/description and destination
   panels in place. Row styling follows their existing two lines of copy. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) > div:has(> svg.lucide-settings + h2) {
  background: var(--rwa-panel-card);
  padding-block: .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > div > svg.lucide-settings + h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) button:has(> svg:first-child + span > span + span) {
  margin-block: 2px;
  padding: 8px 10px;
  border: 1px solid var(--rwa-panel-line);
  border-radius: 12px;
  background: var(--rwa-panel-card);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) button:enabled:has(> svg:first-child + span > span + span):hover {
  background: hsl(var(--accent));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) button:has(> svg:first-child + span > span + span) > svg:first-child {
  inline-size: 28px;
  block-size: 28px;
  padding: 6px;
  border-radius: 8px;
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}

/* Hire catalog. Keep the existing select, candidate click targets and layout
   width. The portrait and identity stack also matches the missing-image card. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> [data-slot="sheet-title"]) {
  flex-wrap: wrap;
  gap: 8px 16px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] select {
  min-inline-size: min(10rem, 100%);
  border-radius: 8px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) {
  border-radius: 16px;
  box-shadow: var(--rwa-panel-shadow);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) > div:first-child {
  aspect-ratio: 4 / 3;
  background: hsl(var(--muted));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) > div:first-child > img {
  object-fit: contain;
  object-position: center bottom;
  scale: none;
  transform: none;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) > div:last-child {
  padding: 12px 14px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) h3 + p {
  color: var(--rwa-panel-muted);
}

/* Native onboarding and archive import. The vendor owns progress, validation,
   the button variants and disabled states throughout these forms. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) > [data-slot="sheet-footer"] {
  border-color: var(--rwa-panel-line);
  background: var(--rwa-panel-card);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > div:not([data-slot]) > div {
  padding: clamp(.75rem, 2vw, 1.5rem);
  border: 1px solid var(--rwa-panel-line);
  border-radius: 16px;
  background: var(--rwa-panel-card);
  box-shadow: var(--rwa-panel-shadow);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload) > div > div:has(> input[type="file"]) {
  border-radius: 16px;
  background: var(--rwa-panel-card);
}

/* Hire uses the existing catalog, setup and archive sheets. Keep the native
   filter, candidate targets, control order and disabled states. */

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) {
  --rwa-hire-gutter: clamp(1rem, 2.4vw, 2rem);
  --rwa-hire-width: 75rem;
  gap: 0;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] {
  gap: .75rem;
  padding: clamp(.875rem, 2vw, 1.5rem) var(--rwa-hire-gutter) 1rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div {
  inline-size: 100%;
  max-inline-size: var(--rwa-hire-width);
  margin-inline: auto;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> span + button) {
  padding-block: 0;
  flex-wrap: wrap;
  gap: .25rem .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> span + button) > button {
  padding: .35rem .6rem;
  border-radius: 8px;
  background: hsl(var(--muted));
  text-align: start;
  overflow-wrap: anywhere;
  max-inline-size: 100%;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) [data-slot="sheet-title"] {
  flex: 1 1 auto;
  min-inline-size: 0;
  font-family: var(--rwa-brand-font-display, "RunWithAI Bricolage", var(--font-sans)), sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> [data-slot="sheet-title"]) > div {
  flex: 0 1 auto;
  min-inline-size: 0;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] select {
  inline-size: clamp(11rem, 22vw, 16rem);
  min-inline-size: 0;
  min-block-size: 2.5rem;
  border-radius: 10px;
  background: hsl(var(--muted));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] select + button {
  flex: none;
  border: 1px solid var(--rwa-panel-line);
  border-radius: 10px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) {
  padding: clamp(.875rem, 2vw, 1.5rem) var(--rwa-hire-gutter);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) > div {
  max-inline-size: var(--rwa-hire-width);
  margin-inline: auto;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) > div:has(> div > div:last-child > h3 + p) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: clamp(.75rem, 1.35vw, 1rem);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) > div:first-child {
  block-size: clamp(8.5rem, 12vw, 10.25rem);
  aspect-ratio: auto;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) > div:last-child {
  padding: .625rem .75rem .75rem;
  border-block-start: 1px solid var(--rwa-panel-line);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) :is(h3, h3 + p) {
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) h3 {
  font-size: 1rem;
  line-height: 1.4;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > div:not([data-slot]) div:has(> div:last-child > h3 + p) h3 + p {
  margin-block-start: .25rem;
  font-size: .875rem;
}

/* Native onboarding and archive retain their scrolling and sticky actions. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) {
  --rwa-hire-gutter: clamp(1rem, 3vw, 2.5rem);
  --rwa-hire-width: 68rem;
  gap: 0;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) > :is([data-slot="sheet-header"], [data-slot="sheet-footer"], div:not([data-slot], :has(> button))) {
  padding-inline: var(--rwa-hire-gutter);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:is(
  :has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]),
  :has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload)
) [data-slot="sheet-title"] {
  min-inline-size: 0;
  font-family: var(--rwa-brand-font-display, "RunWithAI Bricolage", var(--font-sans)), sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.25;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > :is([data-slot="sheet-header"], [data-slot="sheet-footer"], div:not([data-slot])) > div {
  max-inline-size: var(--rwa-hire-width);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > [data-slot="sheet-header"] > div > div:has(> div + div) {
  max-inline-size: 26rem;
  gap: .5rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > div:not([data-slot]) > div {
  padding: clamp(1rem, 3vw, 2rem);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > div:not([data-slot]) h3 {
  color: hsl(var(--foreground));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload) > div > div:has(> input[type="file"]) {
  flex: 0 0 auto;
  min-block-size: clamp(13rem, 31vh, 19rem);
  padding: clamp(1rem, 5vw, 3rem);
  border-width: 1px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-upload) > [data-slot="sheet-header"] {
  padding-inline-end: calc(var(--rwa-hire-gutter) + 2rem);
}

@media (max-width: 767px) {
  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> [data-slot="sheet-title"]) > div {
    flex: 1 1 100%;
  }

  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] select {
    inline-size: 100%;
  }
}

/* The existing two-option gender field needs room for translated labels on
   narrow phones. Wrapping the native buttons keeps both choices reachable. */
@media (max-width: 767px) {
  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > div:not([data-slot]) div:has(> label) > div:has(> button[data-slot="button"] + button[data-slot="button"]) {
    flex-wrap: wrap;
    gap: .35rem;
  }

  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]):has(> [data-slot="sheet-footer"] > div > [data-slot="button"]) > div:not([data-slot]) div:has(> label) > div:has(> button[data-slot="button"] + button[data-slot="button"]) > button {
    min-inline-size: 0;
    min-block-size: 2.25rem;
    block-size: auto;
    padding-inline: .45rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Tasks use the live Kanban columns. Their sortable containers, scrolling and
   status names stay with the vendor. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> [data-rfd-droppable-id]) {
  background: hsl(var(--muted));
  border-radius: 12px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) [data-rfd-draggable-id] {
  border-radius: 10px;
  box-shadow: var(--rwa-panel-shadow);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) > [data-slot="sheet-header"] [data-slot="popover-trigger"] {
  max-inline-size: 100%;
  min-inline-size: 0;
  border-radius: 8px;
}

@media (max-width: 767px) {
  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> [data-slot="sheet-title"]) > div {
    flex-basis: 100%;
  }

  html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > div > div > select) > [data-slot="sheet-header"] > div:has(> span + button) {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
}

/* Nova. The close icon and composer identify the native panel without
   translated text. The transcript, toolbar, and team list keep DOM order. */
html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) {
  --rwa-nova-paper: hsl(var(--background));
  --rwa-nova-card: hsl(var(--card));
  --rwa-nova-border: hsl(var(--border));
  --rwa-nova-inverse: #13182b;
  --rwa-nova-on-inverse: #fbf8f3;
  background: var(--rwa-nova-paper);
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) > div:first-child {
  gap: 8px;
  padding: clamp(.625rem, 1.25vw, 1rem);
  background: var(--rwa-nova-paper);
  border-color: var(--rwa-nova-border);
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) > div:first-child > div:first-child {
  flex-wrap: wrap;
  gap: .5rem .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) > div:first-child > div:first-child::before {
  content: "";
  flex: 0 0 2rem;
  block-size: 2rem;
  border-radius: 10px;
  background: var(--rwa-nova-inverse) center / 1.15rem no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbf8f3' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 10v4M7 6v12M11 3v18M15 6v12M19 10v4'/%3E%3C/svg%3E");
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) > div:first-child > div:first-child > span:first-child {
  font-family: "RunWithAI Bricolage", var(--font-sans), sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -.02em;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) > div:nth-child(2) > div:has(textarea) {
  background: var(--rwa-nova-paper);
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) .va-entry > .gat-bubble-bg {
  background: var(--rwa-nova-card);
  border-color: var(--rwa-nova-border);
  padding: .55rem .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) .va-entry:has(> div:only-child) > div:not(.gat-bubble-bg):not(:has(button, a, svg)) {
  padding: .55rem .75rem;
  border-radius: 4px 14px 14px;
  background: var(--rwa-nova-inverse);
  color: var(--rwa-nova-on-inverse);
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) div:has(> textarea) {
  background: var(--rwa-nova-card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px hsl(var(--input)), 0 2px 8px #13182b0d;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) textarea + div {
  flex-wrap: wrap;
  row-gap: .25rem;
}

/* The count mirrors the native Nova scope roster, including shared employees. */
.rwa-nova-scope-count {
  color: hsl(var(--muted-foreground));
  font-size: .75rem;
  white-space: nowrap;
}

/* Nova's existing team aside becomes a narrow roster. Preserve the vendor's
   desktop and phone visibility toggles and the real status dots. */
html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:first-child {
  padding: .875rem .75rem .5rem;
  font-size: .8rem;
  color: hsl(var(--muted-foreground));
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:nth-child(2) {
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem;
  padding-inline: .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:nth-child(2) > div:has(> div:first-child > :is(img, span)):has(> div:last-child > div + div) {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  padding: .5rem;
  border: 1px solid var(--rwa-nova-border);
  border-radius: 12px;
  background: var(--rwa-nova-card);
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:nth-child(2) > div:has(> div:first-child > :is(img, span)):has(> div:last-child > div + div) > div:first-child {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: 50%;
  font-size: 1rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:nth-child(2) > div:has(> div:first-child > :is(img, span)):has(> div:last-child > div + div) > div:last-child {
  flex-flow: row wrap;
  justify-content: space-between;
  padding: 0;
}

html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside > div:nth-child(2) > div > div:last-child > div:nth-child(2):has(> span) {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
  box-shadow: none;
}

@media (min-width: 768px) {
  html[data-rwa-theme="runwithai"] [data-slot="sidebar-wrapper"] > div:has(> div:first-child > div:last-child > button > svg.lucide-x):has(textarea) aside {
    inline-size: clamp(11.5rem, 27%, 21rem);
  }
}

/* Native Chat uses its own page and composer hooks on desktop and mobile.
   The input and action buttons retain their vendor availability and focus. */
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] .chat-page-container:not(.widget-mode):not(:has(.has-chat-background, .has-chat-theme)):has([data-chat-composer]) {
  background: hsl(var(--background));
}

html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] .chat-page-container:not(.widget-mode):not(:has(.has-chat-background, .has-chat-theme)) .chat-header {
  background: hsl(var(--card));
  border-color: hsl(var(--border));
}

html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] .chat-page-container:not(.widget-mode):not(:has(.has-chat-background, .has-chat-theme)) .chat-panel [data-chat-composer] > .gat-input-box {
  background: hsl(var(--card));
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px hsl(var(--border)), 0 2px 8px #13182b0d;
}

/* Move the textarea focus indicator to the rounded shell so it cannot be clipped. */
html[data-rwa-theme="runwithai"] .chat-page-container:not(.widget-mode) [data-chat-composer] > .gat-input-box:has(> textarea:focus-visible) {
  outline: 2px solid hsl(var(--ring) / .82);
  outline-offset: -2px;
}

html[data-rwa-theme="runwithai"] .chat-page-container:not(.widget-mode) [data-chat-composer] > .gat-input-box > textarea:focus-visible {
  outline: none;
}

/* Theme the transcript surface while keeping native message styles. */
html[data-rwa-theme="runwithai"] .chat-page-container:not(.widget-mode):not(:has(.has-chat-background, .has-chat-theme)) .chat-messages {
  background: hsl(var(--background));
}

html[data-rwa-theme="runwithai"] .chat-page-container:not(.widget-mode) .file-explorer-panel > div:first-child {
  background: hsl(var(--card));
}

/* The Connectors panel is nested inside the current Settings dialog. Match
   native service markers, with a vendor fallback when they are absent. */
html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) {
  background: hsl(var(--background));
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:first-child {
  background: hsl(var(--card));
  font-family: "RunWithAI Bricolage", var(--font-sans), sans-serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:nth-child(2) {
  padding-block-start: 1rem;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:nth-child(2) > div > div:has(> button > svg.lucide-chevron-down) {
  box-shadow: var(--rwa-panel-shadow);
}

@media (max-width: 767px) {
  html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"]:has(> .chat-page-container:not(.widget-mode)) > header:has(> [data-slot="sidebar-trigger"]) {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
  }

  html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"]:has(> .chat-page-container:not(.widget-mode)) > header:has(> [data-slot="sidebar-trigger"]) > div:has(> img + span) > img {
    inline-size: 2rem;
    block-size: 2rem;
    object-fit: cover;
  }
}

/* Settings and Connectors use their existing launcher, detail sheet and rows. */
html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) {
  background: hsl(var(--muted));
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) > div:has(> svg.lucide-settings + h2) {
  padding: 1.25rem 1.25rem 1rem;
  background: transparent;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] > div > svg.lucide-settings + h2 {
  font-size: 1.5rem;
  line-height: 1.25;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) > div:has(> div > div > button) {
  padding: 0 1rem 1rem;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) button:has(> svg:first-child + span > span + span) {
  margin: 0;
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) button:has(> svg:first-child + span > span + span):is(:hover, :focus-visible) {
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:first-child {
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1rem;
  font-size: 1.5rem;
  line-height: 1.25;
  background: hsl(var(--background));
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:nth-child(2) {
  padding-inline: clamp(1rem, 3vw, 2rem);
}

html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) > div:nth-child(2) > div > div:has(> button > div > svg.lucide-chevron-down) {
  margin-block-start: .625rem;
  box-shadow: var(--rwa-panel-shadow);
}

/* Widen only the matched Connectors detail at a width where the native
   app uses two sheets. The inline start remains tied to the native sidebar. */
@media (min-width: 75rem) {
  html[data-rwa-theme="runwithai"]:has([role="dialog"][data-state="open"] > div > div > [data-slot="sheet-content"] svg.lucide-phone-call):has([role="dialog"][data-state="open"] > div > div > [data-slot="sheet-content"] img[src^="/api/auth/whitelabel/logo"]) [role="dialog"][data-slot="sheet-content"]:has(> div > svg.lucide-settings + h2) {
    inline-size: 21rem;
  }

  html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"]:has(> div > div > [data-slot="sheet-content"] svg.lucide-phone-call):has(> div > div > [data-slot="sheet-content"] img[src^="/api/auth/whitelabel/logo"]) {
    --hub-offset: 21rem;
    inset-inline-end: 0;
    inline-size: auto;
    max-inline-size: none;
    background: hsl(var(--background));
  }

  html[data-rwa-theme="runwithai"] [role="dialog"][data-slot="sheet-content"] [data-slot="sheet-content"]:has(svg.lucide-phone-call):has(img[src^="/api/auth/whitelabel/logo"]) {
    inline-size: 100%;
    max-inline-size: none;
  }
}

/* Kanban keeps the real filter, add buttons, task cards and drop areas. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"]:has(> [data-slot="sheet-title"] > svg.lucide-columns-3) {
  gap: .625rem;
  padding: clamp(.875rem, 1.8vw, 1.5rem);
  padding-inline-end: 3rem;
  border-block-end: 0;
  background: hsl(var(--background));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"] > [data-slot="sheet-title"]:has(> svg.lucide-columns-3) {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.15;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"]:has(> [data-slot="sheet-title"] > svg.lucide-columns-3) > [data-slot="sheet-description"] {
  max-inline-size: 65ch;
  font-size: .875rem;
  line-height: 1.5;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"]:has(> [data-slot="sheet-title"] > svg.lucide-columns-3) > div:has(> [data-slot="popover-trigger"]) {
  flex-wrap: wrap;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] > [data-slot="sheet-header"]:has(> [data-slot="sheet-title"] > svg.lucide-columns-3) [data-slot="popover-trigger"] {
  inline-size: min(100%, 11rem);
  min-block-size: 2.25rem;
  border-radius: 999px;
  background: hsl(var(--card));
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> div > div > [data-rfd-droppable-id]) {
  padding-inline: clamp(.875rem, 1.8vw, 1.5rem);
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> div > [data-rfd-droppable-id]) {
  align-items: start;
  gap: 1rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> [data-rfd-droppable-id]) {
  block-size: auto;
  min-block-size: min(12.5rem, 100%);
  max-block-size: 100%;
  border-radius: 16px;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> [data-rfd-droppable-id]) > div:first-child {
  padding: .625rem .75rem .375rem;
  border-block-end: 0;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> [data-rfd-droppable-id]) > div:first-child > div > span:first-child {
  font-size: .875rem;
  letter-spacing: normal;
  text-transform: none;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) div:has(> [data-rfd-droppable-id]) > div:first-child > div > span:nth-child(2) {
  min-inline-size: 1.25rem;
  padding-inline: .25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--card));
  text-align: center;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) [data-rfd-droppable-id] {
  padding: .5rem .75rem .75rem;
}

html[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has(> [data-slot="sheet-header"] > [data-slot="sheet-title"] > svg.lucide-columns-3) [data-rfd-draggable-id] {
  padding: .75rem;
  background: hsl(var(--card));
}

/* Strengthen the light-theme status colors on the new card surface. */
html:not(.dark)[data-rwa-theme="runwithai"] [data-slot="sheet-content"]:has([data-rfd-droppable-id]) {
  & span[class~="bg-primary/10"][class~="text-primary"] {
    color: hsl(var(--signal-text));
  }

  & span[class~="bg-emerald-500/10"][class~="text-emerald-700"] {
    color: #04644b;
  }
}

/* Keep selectable dates in adjacent months readable while still muted. */
html[data-rwa-theme="runwithai"] [data-slot="sheet-content"] button:enabled[class~="aspect-square"][class~="text-muted-foreground/40"] {
  color: hsl(var(--muted-foreground));
}

/* The native language selector sits above the sign-in fields. */
[data-rwa-login-language] {
  justify-content: flex-end;
  margin-block: 0 .875rem;
  padding: 0;
  border: 0;
}
[data-rwa-login-language] > button[title]:has(> svg):not([role="combobox"]) {
  display: none;
}
[data-rwa-login-language] > button[role="combobox"] {
  min-inline-size: 0;
  min-block-size: 2.25rem;
  padding: .375rem .625rem;
  border-color: hsl(var(--border));
  border-radius: .625rem;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-size: .8125rem;
  font-weight: 600;
}
[data-rwa-login-language] > button[role="combobox"]:hover {
  background: hsl(var(--accent));
}
[data-rwa-login-language] > button[role="combobox"] > svg:last-child {
  inline-size: .875rem;
  block-size: .875rem;
}

/* Sign-in verification. Keep native digit inputs, validation, and actions. */
[data-rwa-mfa-code] {
  gap: 1rem;
  padding-block: 1.25rem;
}
[data-rwa-mfa-code] > [data-slot="card-header"] {
  text-align: start;
  gap: .375rem;
}
[data-rwa-mfa-code] > [data-slot="card-header"] > div:first-child:has(> img) {
  justify-content: flex-start;
  padding-block-end: .75rem;
  border-block-end: 1px solid hsl(var(--border));
}
[data-rwa-mfa-code] > [data-slot="card-header"] > [data-slot="card-description"] {
  color: hsl(var(--foreground));
  font: 650 1.375rem/1.25 "RunWithAI Bricolage", var(--font-sans), sans-serif;
}
[data-rwa-mfa-code] > [data-slot="card-header"] > p {
  margin-block-start: .25rem;
  overflow-wrap: anywhere;
}
[data-rwa-mfa-code] form > div:has(> input[autocomplete="one-time-code"]) {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.25rem, 1.25vw, .5rem);
}
[data-rwa-mfa-code] form input[inputmode="numeric"][maxlength="1"] {
  inline-size: 100%;
  min-inline-size: 0;
  block-size: 2.85rem;
  border-radius: .625rem;
  font-size: clamp(1rem, 4.2vw, 1.35rem);
}
[data-rwa-mfa-code] form label:has(input[type="checkbox"]) {
  padding: .625rem .75rem;
  border: 1px solid hsl(var(--border));
}
[data-rwa-mfa-code] form + div:has(> button) {
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
  gap: .375rem;
  margin-block-start: .75rem;
  padding-block-start: .5rem;
  border-block-start: 1px solid hsl(var(--border));
}
[data-rwa-mfa-code] form + div > button {
  inline-size: auto;
  min-block-size: 2.25rem;
}

/* The email link has its own inline-styled card. Apply the same brand surfaces. */
#root div:has(> [data-rwa-mfa-link]) {
  background: hsl(var(--background)) !important;
}
[data-rwa-mfa-link] {
  padding: clamp(1rem, 4vw, 1.5rem) !important;
  background: hsl(var(--card)) !important;
  border-color: hsl(var(--border)) !important;
}
[data-rwa-mfa-link] > div:first-child {
  margin-block-end: 1rem !important;
  padding-block-end: .75rem;
  border-block-end: 1px solid hsl(var(--border));
}
[data-rwa-mfa-link] > div:first-child > div {
  justify-content: flex-start !important;
  margin-block-end: 0 !important;
}
[data-rwa-mfa-link] > div:first-child img {
  inline-size: 2.5rem !important;
  block-size: 2.5rem !important;
}
[data-rwa-mfa-link] > div:first-child h1 {
  font-size: 1.25rem !important;
}
[data-rwa-mfa-link] > :is(h2, p) {
  text-align: start !important;
}
[data-rwa-mfa-link]:has(> label > input[type="checkbox"]) > div:has(> svg > rect) {
  inline-size: 2.5rem !important;
  block-size: 2.5rem !important;
  margin: 0 0 .75rem !important;
  border-radius: .75rem !important;
  background: #13182b !important;
  box-shadow: none !important;
}
[data-rwa-mfa-link] > div > svg:has(> rect) {
  inline-size: 1.3rem;
  block-size: 1.3rem;
}
[data-rwa-mfa-link] > label {
  padding: .625rem .75rem !important;
  background: hsl(var(--muted)) !important;
  border: 1px solid hsl(var(--border));
}
[data-rwa-mfa-link]:has(> label > input[type="checkbox"]) > button:enabled {
  background: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
  box-shadow: none !important;
}

/* Claude's Home composition, rendered only when the isolated layout module
   recognizes the native roster. The rest of the app keeps its normal markup. */
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] > div:has(> [data-rwa-home]) {
  max-inline-size: 80rem;
  padding: clamp(1rem, 2.4vw, 2rem);
}

[data-rwa-home] {
  --rwa-home-ink: hsl(var(--foreground));
  --rwa-home-muted: hsl(var(--muted-foreground));
  display: grid;
  gap: clamp(.75rem, 1.5vw, 1.25rem);
  margin-block-end: .875rem;
  color: var(--rwa-home-ink);
}

[data-rwa-home] :is(h1, h2, p) { margin: 0; }
[data-rwa-home] h1 {
  margin-block: .15em;
  font: 650 clamp(1.85rem, 2.75vw, 2.5rem)/1.12 "RunWithAI Bricolage", var(--font-sans), sans-serif;
  letter-spacing: -.035em;
}
[data-rwa-home] h2 { font-size: 1.125rem; line-height: 1.4; font-weight: 700; }
[data-rwa-home] .rwa-home-date, [data-rwa-home] .rwa-home-help {
  color: var(--rwa-home-muted);
  font-size: .9rem;
  line-height: 1.5;
}
[data-rwa-home] .rwa-home-team { display: grid; gap: .25rem; scroll-margin-block-start: 1rem; }
html[data-rwa-theme="runwithai"] main[data-slot="sidebar-inset"] > div:has(> [data-rwa-home]) [data-tour="employee-grid"]:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)) !important;
}

/* The Home link sits alongside native workspace groups. */
[data-rwa-rail] {
  --rwa-rail-ink: hsl(var(--foreground));
  --rwa-rail-muted: hsl(var(--muted-foreground));
  --rwa-rail-card: hsl(var(--card));
  --rwa-rail-line: hsl(var(--border));
}
[data-rwa-rail] :is(a, button):focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: -2px;
}
.rwa-rail-home > a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-block-size: 2.85rem;
  padding: .35rem .6rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--rwa-rail-ink);
  text-decoration: none;
}
.rwa-rail-home > a[aria-current="page"] {
  border-color: var(--rwa-rail-line);
  background: var(--rwa-rail-card);
  box-shadow: inset 3px 0 hsl(var(--primary));
}
.rwa-rail-home :is(strong, small) { display: block; }
[data-rwa-rail] strong { font-size: .875rem; line-height: 1.3; }
[data-rwa-rail] small { color: var(--rwa-rail-muted); font-size: .75rem; line-height: 1.35; }
.rwa-rail-home a:hover { background: var(--rwa-rail-card); }
.rwa-rail-home svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The original Nova button stays in its native group for its handler and
   lifecycle. Its single visible entry is next to the native search. */
[data-slot="sidebar-menu-item"]:has(> [data-rwa-nova-source]) {
  display: none;
}
.rwa-rail-nova {
  padding-inline: .75rem;
  margin-block: .5rem .25rem;
}
.rwa-rail-nova > button {
  inline-size: 100%;
  border-radius: 12px;
}
[data-slot="sidebar-content"]:has(.rwa-rail-nova) {
  scroll-padding-block-end: 5rem;
}
[data-slot="sidebar-content"]:has(.rwa-rail-nova) > [data-slot="sidebar-group"]:has([data-tour="config-section"]) {
  position: sticky;
  inset-block-end: 0;
  z-index: 1;
  margin-block-start: auto;
  border-block-start: 1px solid hsl(var(--border));
  background: hsl(var(--sidebar));
}

/* Sidebar artboard proportions, scoped to a recognized dashboard rail. */
[data-rwa-sidebar] [data-slot="sidebar-header"] {
  padding: 17px 12px 13px 20px;
  gap: 0;
}
[data-rwa-sidebar] [data-slot="sidebar-header"] > div:nth-child(2) {
  margin-block-start: 0;
}
[data-rwa-sidebar] [data-slot="sidebar-header"] div:has(> .rwa-rail-wordmark) {
  position: relative;
}
[data-rwa-sidebar] [data-slot="sidebar-header"] div:has(> .rwa-rail-wordmark) > :is(img, span) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.rwa-rail-wordmark {
  display: block;
  inline-size: 143px;
  block-size: 22px;
  color: hsl(var(--foreground));
}
[data-rwa-sidebar] [data-slot="sidebar-header"] button > svg {
  inline-size: 18px;
  block-size: 18px;
}
[data-rwa-sidebar] [data-slot="sidebar-content"] > [data-slot="sidebar-group"]:has(input[type="text"]) {
  padding: 4px 12px 0;
}
[data-rwa-sidebar] [data-slot="sidebar-content"] div:has(> svg.lucide-search + input[type="text"]) {
  padding-inline: 0;
}
[data-rwa-sidebar] [data-slot="sidebar-content"] svg.lucide-search + input[type="text"] {
  border-radius: 8px;
  background: hsl(var(--card));
}
[data-rwa-sidebar] [data-slot="sidebar-content"] svg.lucide-search {
  inset-inline-start: 10px;
}
[data-rwa-sidebar] [data-rwa-nova-top] > span:has(> span + span) > span {
  white-space: normal;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) {
  padding: 8px 12px 0;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) [data-slot="sidebar-group-label"] {
  block-size: 24px;
  padding-inline: 10px;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) [data-slot="sidebar-menu"] {
  gap: 2px;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) [data-slot="sidebar-menu-button"],
[data-rwa-sidebar] .rwa-rail-home a {
  min-block-size: 48px;
  padding: 5px 10px;
  gap: 10px;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) [data-slot="sidebar-menu-button"] > svg,
[data-rwa-sidebar] .rwa-rail-home svg {
  inline-size: 18px;
  block-size: 18px;
  stroke-width: 1.75px;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home)
  [data-slot="sidebar-menu-button"]:not([data-active="true"]) > svg,
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home)
  [data-slot="sidebar-menu-button"]:not([data-active="true"]) > span > span:first-child {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home)
  [data-slot="sidebar-menu-button"] > span > span:nth-child(2) {
  white-space: normal;
}
[data-rwa-sidebar] .rwa-rail-home a[aria-current="page"] {
  position: relative;
  box-shadow: none;
}
[data-rwa-sidebar] .rwa-rail-home a[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset-block: 7px;
  inset-inline-start: -12px;
  inline-size: 3px;
  border-radius: 0 4px 4px 0;
  background: hsl(var(--primary));
}
[data-rwa-sidebar] [data-slot="sidebar-group"]:has([data-tour="config-section"]) [data-slot="sidebar-group-label"] {
  display: none;
}
/* Slightly denser desktop rail. Mobile keeps its existing touch targets. */
@media (min-width: 768px) {
  [data-rwa-sidebar] {
    --rwa-sidebar-title-leading: 1.125rem;
    --rwa-sidebar-nova-height: 48px;
    --rwa-sidebar-nova-icon: 30px;
    --rwa-sidebar-nova-icon-padding: 7px;
  }
  [data-rwa-sidebar] [data-slot="sidebar-header"] {
    padding-block: 13px 10px;
  }
  [data-rwa-sidebar] .rwa-rail-nova {
    margin-block: .375rem .125rem;
  }
  [data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) {
    padding-block-start: 4px;
  }
  [data-rwa-sidebar] [data-slot="sidebar-group"]:has(.rwa-rail-home) [data-slot="sidebar-menu-button"],
  [data-rwa-sidebar] .rwa-rail-home a {
    min-block-size: 42px;
    padding-block: 3px;
  }
}
@media (min-width: 768px) and (max-height: 760px) {
  [data-rwa-sidebar] {
    overflow-y: auto;
  }
  [data-rwa-sidebar] [data-slot="sidebar-content"]:has(.rwa-rail-nova) {
    flex: none;
    overflow: visible;
  }
  [data-rwa-sidebar] [data-slot="sidebar-footer"] {
    flex: none;
  }
  [data-rwa-sidebar] [data-slot="sidebar-content"] > [data-slot="sidebar-group"]:has([data-tour="config-section"]) {
    position: static;
  }
}

/* New conversations require a human participant. The AI selections are watchers. */
button[data-rwa-watch-only] {
  cursor: not-allowed;
  opacity: .5;
}

/* Keep notifications above the native Hire wizard's sticky action row. */
html[data-rwa-theme="runwithai"]:has(
  [data-slot="sheet-content"] > [data-slot="sheet-header"] > div > div > [data-slot="sheet-title"]
):has([data-slot="sheet-content"] > [data-slot="sheet-footer"] > div > [data-slot="button"])
  [data-sonner-toaster][data-y-position="bottom"] {
  --offset-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
  --mobile-offset-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
  & [data-sonner-toast]:is([data-mounted="false"], [data-removed="true"]) {
    --y: translateY(0) !important;
  }
}
