/* Root scrollbar: floating + hover-to-show (do NOT force a gutter on all elements) */
html {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html:hover {
  scrollbar-color: var(--wd-border) transparent;
}

html::-webkit-scrollbar {
  width: 0.25rem;
  height: 0.25rem;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 1rem;
}

html:hover::-webkit-scrollbar-thumb {
  background-color: var(--wd-border);
}

/* Prevent accidental horizontal overflow in main content (keep header sticky stable) */
main[role="main"] {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  main[role="main"] {
    overflow-x: clip;
  }
}

/* Fix z-index for NextUI global settings popover */
.sx-global-settings-container,
.sx-popover,
[data-popper-placement] {
    z-index: 9999 !important;
}

/* Fix: When sidebar has an open menu dropdown, elevate sidebar's stacking context
   above main content area (which has z-index: 200) to allow clicks on the menu */
.sx-shell-sidebar:has(.sx-menu-dropdown) {
    z-index: 300 !important;
}

/* Ensure the menu dropdown and overlay are above everything when in sidebar */
.sx-shell-sidebar .sx-menu-dropdown,
.sx-shell-sidebar .sx-menu-overlay {
    z-index: 9999 !important;
}

.wd-nextui-shell .sx-sidebar-nav-content .sx-nav-menu {
    --sx-nav-menu-indent: 1rem;
}

.sx-nav-menu-group-header[data-wd-workspace-icon="true"] > .sx-nav-menu-icon-slot .sx-nav-menu-icon-button,
.sx-nav-menu-group-header[data-wd-workspace-icon="true"] > .sx-nav-menu-icon-slot .sx-nav-menu-context-trigger-icon {
    display: none !important;
}

.sx-nav-menu-group-header[data-wd-workspace-icon="true"] > .sx-nav-menu-icon-slot:not(:has(.sx-nav-menu-context-trigger))::before,
.sx-nav-menu-group-header[data-wd-workspace-icon="true"] .sx-nav-menu-context-trigger::before {
    content: var(--wd-workspace-icon-content, "?");
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wd-workspace-icon-bg, var(--sx-colorBrandBackground2, var(--wd-muted-bg)));
    color: var(--wd-workspace-icon-fg, var(--sx-colorBrandForeground1, var(--wd-primary)));
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wd-workspace-icon-fg, var(--wd-primary)) 14%, transparent);
    text-transform: uppercase;
}

.sx-nav-menu-group-header[data-wd-workspace-icon="true"] .sx-nav-menu-context-trigger {
    isolation: isolate;
}

.sx-nav-menu-group-header[data-wd-workspace-shared="true"] > .sx-nav-menu-icon-slot:not(:has(.sx-nav-menu-context-trigger))::before,
.sx-nav-menu-group-header[data-wd-workspace-shared="true"] .sx-nav-menu-context-trigger::before {
    content: "";
}

.sx-nav-menu-group-header[data-wd-workspace-shared="true"] > .sx-nav-menu-icon-slot:not(:has(.sx-nav-menu-context-trigger))::after,
.sx-nav-menu-group-header[data-wd-workspace-shared="true"] .sx-nav-menu-context-trigger::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 0.875rem;
    border-radius: 999px;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 20%, var(--wd-workspace-icon-fg, var(--wd-primary)) 0 0.125rem, transparent 0.15625rem),
        radial-gradient(circle at 22% 80%, var(--wd-workspace-icon-fg, var(--wd-primary)) 0 0.125rem, transparent 0.15625rem),
        radial-gradient(circle at 78% 80%, var(--wd-workspace-icon-fg, var(--wd-primary)) 0 0.125rem, transparent 0.15625rem),
        linear-gradient(34deg, transparent 0 46%, var(--wd-workspace-icon-fg, var(--wd-primary)) 47% 53%, transparent 54%),
        linear-gradient(-34deg, transparent 0 46%, var(--wd-workspace-icon-fg, var(--wd-primary)) 47% 53%, transparent 54%);
}

/* Keep Cupertino switches on the active NextUI brand token instead of the upstream green default. */
[data-sx-style="cupertino"] input:checked + .sx-switch__track {
    background-color: var(--sx-colorBrandBackground1, var(--wd-primary)) !important;
    border-color: var(--sx-colorBrandBackground1, var(--wd-primary)) !important;
}

/* Hide scrollbars when not hovered on some containers */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--wd-border) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 0.375rem;
}

/* Floating scrollbar that doesn't occupy space and shows on hover */
.floating-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.floating-scrollbar:hover {
    scrollbar-color: var(--wd-border) transparent;
}

.floating-scrollbar::-webkit-scrollbar {
    width: 0.25rem;
}

.floating-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.floating-scrollbar::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 1rem;
}

.floating-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: var(--wd-border);
}

/* Desk Pool Content Fixed Height */
.wd-desk-pool-content {
    height: 12rem;
    overflow-y: auto;
}

/* Global page sizing & gutters (keep Header/Body/Footer aligned) */
:root {
  --wd-page-max-width: 120rem;
  --wd-page-gutter-x: 1rem;
  --wd-page-gutter-y: 1.5rem;
}

@media (min-width: 48rem) {
  :root {
    --wd-page-gutter-x: 1.5rem;
  }
}

.wd-page-shell {
  /* Use visual viewport width to avoid "layout viewport < visual viewport" gaps */
  width: 100vw;
  max-width: min(var(--wd-page-max-width), 100vw);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  /* Fallback first (in case env() is unsupported) */
  padding-left: var(--wd-page-gutter-x);
  padding-right: var(--wd-page-gutter-x);
  /* Safe-area aware override */
  --wd-safe-x: max(env(safe-area-inset-left), env(safe-area-inset-right));
  padding-left: calc(var(--wd-page-gutter-x) + var(--wd-safe-x));
  padding-right: calc(var(--wd-page-gutter-x) + var(--wd-safe-x));
}

/* Desk shell: Desk-specific vertical spacing only (x-gutters are handled by wd-page-shell) */
.wd-desk-shell {
  padding-top: var(--wd-page-gutter-y);
}

.wd-desk-work-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2.5rem;
}

.wd-workspace-overview-page {
  min-height: 100%;
  padding: 1rem;
}

.wd-desk-kicker {
  margin: 0 0 0.25rem;
  color: var(--wd-muted-fg);
  font-size: 0.6875rem;
  font-weight: var(--sx-font-weight-semibold, 600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wd-desk-icon-button {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wd-border);
  border-radius: 0.5rem;
  color: var(--wd-muted-fg);
  background: var(--wd-card-bg);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.wd-desk-icon-button:hover {
  border-color: color-mix(in srgb, var(--wd-primary) 35%, var(--wd-border));
  color: var(--wd-primary);
  background: color-mix(in srgb, var(--wd-primary) 6%, var(--wd-card-bg));
}

.wd-desk-nav-action {
  flex-shrink: 0;
}

.wd-insights-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid color-mix(in srgb, #10b981 26%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, #10b981 10%, transparent);
  color: #047857;
  font-size: var(--sx-font-size-xs, 0.75rem);
  font-weight: var(--sx-font-weight-semibold, 600);
  white-space: nowrap;
}

.wd-insights-live-pill i {
  font-size: 0.9375rem;
}

.wd-desk-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(8.75rem, 100%), 1fr));
  gap: 0.75rem;
}

.wd-desk-metric,
.wd-desk-panel,
.wd-desk-focus-card {
  border: 1px solid var(--wd-border);
  border-radius: 0.5rem;
  background: var(--wd-card-bg);
}

.wd-desk-metric {
  min-height: 4.875rem;
  padding: 0.75rem;
}

.wd-desk-metric-label,
.wd-desk-metric-hint {
  color: var(--wd-muted-fg);
  font-size: var(--sx-font-size-xs, 0.75rem);
  font-weight: var(--sx-font-weight-medium, 500);
}

.wd-desk-metric-value {
  margin-top: 0.375rem;
  color: var(--wd-fg);
  font-size: var(--sx-font-size-xl, 1.5rem);
  line-height: 1;
  font-weight: var(--sx-font-weight-bold, 700);
  letter-spacing: 0;
}

.wd-desk-metric-hint {
  margin-top: 0.5rem;
  font-weight: 600;
}

.wd-desk-focus-card {
  padding: 1rem;
  border-color: color-mix(in srgb, var(--wd-primary) 35%, var(--wd-border));
  box-shadow: 0 16px 42px color-mix(in srgb, var(--wd-primary) 10%, transparent);
}

.wd-desk-section-head,
.wd-desk-panel-head,
.wd-desk-task-row,
.wd-desk-task-card,
.wd-desk-action-row,
.wd-desk-feed-row,
.wd-desk-doc-row,
.wd-overview-node-row {
  display: flex;
}

.wd-desk-section-head,
.wd-desk-panel-head {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wd-desk-section-title {
  margin: 0;
  color: var(--sx-group-title-color, var(--wd-fg));
  font-size: var(--sx-group-title-font-size, 0.875rem);
  line-height: var(--sx-group-title-line-height, 1.4);
  font-weight: var(--sx-group-title-font-weight, 800);
  letter-spacing: 0;
}

.wd-desk-focus-count,
.wd-desk-panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 1.625rem;
  padding: 0 0.625rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wd-primary) 10%, transparent);
  color: var(--wd-primary);
  font-size: 0.75rem;
  font-weight: var(--sx-font-weight-semibold, 600);
  font-variant-numeric: tabular-nums;
}

.wd-desk-focus-count-warn {
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  color: #b45309;
}

.wd-desk-focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.wd-desk-section-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.wd-desk-text-button {
  border: 0;
  background: transparent;
  color: var(--wd-primary);
  padding: 0.25rem 0.375rem;
  font-size: 0.75rem;
  font-weight: var(--sx-font-weight-semibold, 600);
}

.wd-desk-empty-focus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 7.5rem;
  margin-top: 1rem;
  border: 1px dashed color-mix(in srgb, var(--wd-primary) 30%, var(--wd-border));
  border-radius: 0.5rem;
  color: var(--wd-muted-fg);
  font-weight: var(--sx-font-weight-medium, 500);
}

.wd-desk-empty-focus i {
  color: var(--wd-primary);
  font-size: 1.25rem;
}

.wd-desk-focus-overflow {
  margin-top: 0.75rem;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: var(--sx-font-weight-semibold, 600);
}

.wd-desk-quick-add,
.wd-desk-inline-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.wd-desk-quick-add input,
.wd-desk-inline-add input {
  min-width: 0;
  flex: 1;
  height: 2.25rem;
  border: 1px solid var(--wd-border);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--wd-muted-bg) 45%, transparent);
  color: var(--wd-fg);
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: var(--sx-font-weight-normal, 400);
}

.wd-desk-quick-add button,
.wd-desk-inline-add button {
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--wd-primary);
  color: var(--wd-primary-fg);
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: var(--sx-font-weight-semibold, 600);
}

.wd-desk-quick-add button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wd-desk-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.wd-desk-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.wd-desk-panel {
  overflow: hidden;
}

.wd-desk-panel-head {
  min-height: 2.875rem;
  padding: 0 0.875rem;
  border-bottom: 1px solid var(--wd-border);
  background: color-mix(in srgb, var(--wd-muted-bg) 52%, transparent);
}

.wd-desk-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--sx-group-title-color, var(--wd-fg));
  font-size: var(--sx-group-title-font-size, 0.875rem);
  line-height: var(--sx-group-title-line-height, 1.4);
  font-weight: var(--sx-group-title-font-weight, 800);
}

.wd-desk-panel-title i {
  color: var(--wd-muted-fg);
}

.wd-desk-panel-count {
  min-width: 1.75rem;
  height: 1.375rem;
  color: var(--wd-muted-fg);
  background: color-mix(in srgb, var(--wd-muted-bg) 80%, transparent);
  font-size: 0.6875rem;
}

.wd-desk-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem;
}

.wd-desk-task-card,
.wd-desk-task-row,
.wd-desk-action-row,
.wd-desk-feed-row,
.wd-desk-doc-row,
.wd-overview-node-row {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wd-desk-task-card:hover,
.wd-desk-task-row:hover,
.wd-desk-action-row:hover,
.wd-desk-feed-row:hover,
.wd-desk-doc-row:hover,
.wd-overview-node-row:hover {
  border-color: color-mix(in srgb, var(--wd-primary) 24%, var(--wd-border));
  background: color-mix(in srgb, var(--wd-primary) 5%, transparent);
}

.wd-desk-task-card {
  flex-direction: column;
  justify-content: space-between;
  min-height: 10rem;
  padding: 0.875rem;
  background: color-mix(in srgb, var(--wd-card-bg) 80%, var(--wd-muted-bg));
}

.wd-desk-task-card-focus {
  border-color: color-mix(in srgb, var(--wd-primary) 18%, var(--wd-border));
}

.wd-desk-task-main,
.wd-desk-row-main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.wd-desk-task-id {
  display: block;
  color: var(--wd-primary);
  font-size: 0.6875rem;
  font-weight: var(--sx-font-weight-semibold, 600);
  font-variant-numeric: tabular-nums;
}

.wd-desk-task-title,
.wd-desk-row-title {
  display: block;
  margin-top: 0.25rem;
  color: var(--wd-fg);
  font-size: 0.9375rem;
  line-height: 1.35;
  font-weight: var(--sx-font-weight-semibold, 600);
  overflow-wrap: anywhere;
}

.wd-desk-task-meta,
.wd-desk-row-meta,
.wd-desk-row-foot {
  display: block;
  margin-top: 0.25rem;
  color: var(--wd-muted-fg);
  font-size: 0.71875rem;
  line-height: 1.3;
  font-weight: var(--sx-font-weight-normal, 400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-desk-row-foot {
  font-size: 0.6875rem;
  opacity: 0.82;
}

.wd-desk-task-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.875rem;
}

.wd-desk-task-row {
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem;
}

.wd-desk-row-main {
  flex: 1;
}

.wd-desk-row-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.wd-desk-action-row,
.wd-desk-feed-row,
.wd-desk-doc-row,
.wd-overview-node-row {
  flex-direction: column;
  padding: 0.625rem;
}

.wd-desk-action-type,
.wd-desk-chip,
.wd-desk-importance {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  font-weight: var(--sx-font-weight-semibold, 600);
}

.wd-desk-action-type {
  color: #7c2d12;
  background: color-mix(in srgb, #f97316 14%, transparent);
}

.wd-desk-chip,
.wd-desk-importance-normal {
  color: var(--wd-muted-fg);
  background: color-mix(in srgb, var(--wd-muted-bg) 75%, transparent);
}

.wd-desk-chip-warn {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 14%, transparent);
}

.wd-desk-importance-important {
  color: #a16207;
  background: color-mix(in srgb, #eab308 16%, transparent);
}

.wd-desk-importance-focus {
  color: var(--sx-colorBrandForeground1, var(--wd-primary));
  background: color-mix(in srgb, var(--sx-colorBrandBackground1, var(--wd-primary)) 14%, transparent);
}

.wd-desk-empty {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--wd-muted-fg);
  font-size: 0.8125rem;
  font-weight: var(--sx-font-weight-medium, 500);
}

.wd-desk-inline-add {
  margin: 0 0 0.375rem;
}

.wd-desk-inline-add button {
  width: 2.25rem;
  padding: 0;
}

@media (max-width: 72rem) {
  .wd-desk-focus-list,
  .wd-desk-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .wd-desk-focus-list,
  .wd-desk-work-grid {
    grid-template-columns: 1fr;
  }

  .wd-desk-quick-add {
    align-items: stretch;
    flex-direction: column;
  }

  .wd-desk-quick-add button {
    width: 100%;
  }
}

/* Header: prevent overflowing children from increasing page scrollWidth */
.wd-header-clip {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .wd-header-clip {
    overflow-x: hidden;
  }
}

/* Header: allow horizontal scroll when content overflows */
.wd-header-scroll {
  overflow-x: auto;
  /* Allow dropdowns/popovers to overflow vertically from the sticky header */
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Ensure the header row can exceed container width and be scrolled */
.wd-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  gap: 2rem;
  min-width: max-content;
  width: 100%;
}

/* Perfect Day modal: stable 50/50 layout (avoid Tailwind breakpoint issues) */
.wd-perfectday-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 64rem) {
  .wd-perfectday-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.wd-perfectday-col {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Safe area for mobile devices */
.safe-pb {
    padding-bottom: env(safe-area-inset-bottom);
}

.safe-pt {
    padding-top: env(safe-area-inset-top);
}

/* Title bar color for mobile PWA */
:root {
    --wd-header-height: 4rem;
}

html {
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  html {
    font-size: 1rem;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Removed: html { position: relative; min-height: 100%; }
   This was an old sticky-footer pattern that conflicts with the AppShell layout.
   The app shell now handles height via 100vh. */

/* AppShell layout: prevent document-level scrolling, let shell content scroll independently */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

/* Shell content receives the same inset contract that NextUI internal routes use. */
.wd-shell-route {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--sx-shell-content-top-inset, 0px);
  padding-bottom: var(--sx-shell-content-bottom-inset, 0px);
  box-sizing: border-box;
  position: relative;
}

/* SxAppShell internal routes already apply the shell top/bottom inset. */
.sx-shell-route > .wd-shell-route {
  padding-top: 0;
  padding-bottom: 0;
}

/* Task details inject their metadata/actions into the NextUI navbar. Suppress
   generic workspace actions on task pages so the page-level controls stay clear. */
.wd-nextui-shell:has(.wd-task-route-page) .sx-navbar .wd-navbar-actions,
.sx-global-page-layer:has(.wd-task-route-page) .sx-navbar .wd-navbar-actions {
  display: none !important;
}

.sx-global-page-surface-dialog:has(.wd-task-route-page) .sx-shell-surface-route,
.sx-global-page-layer:has(.wd-task-route-page) .sx-shell-content,
.wd-shell-route .sx-shell-viewport__content:has(> .wd-task-route-page),
.wd-task-route-page {
  height: 100%;
  min-height: 0;
}

/* Full-height workspace surfaces own their internal scrolling, such as Kanban lanes. */
.wd-shell-route .sx-shell-viewport__content:has(> #workspace-container) {
  height: 100%;
  min-height: 0 !important;
  width: 100%;
  max-width: none;
}

.wd-shell-route.wd-shell-route--workspace .sx-shell-viewport,
.wd-shell-route.wd-shell-route--workspace .sx-shell-viewport__scroller,
.wd-shell-route.wd-shell-route--workspace .sx-shell-viewport__content {
  width: 100%;
  max-width: none;
}

.wd-shell-route.wd-shell-route--workspace .sx-shell-viewport__content {
  height: 100%;
  min-height: 0 !important;
}

.wd-kanban-scrollport {
  --wd-kanban-collapsed-column-width: calc(var(--sx-spacing-xl, 2rem) + var(--sx-spacing-xxs, 0.25rem));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wd-kanban-scrollport::-webkit-scrollbar {
  display: none;
}

.wd-kanban-lane,
.wd-kanban-lane-scroll,
.wd-task-card {
  min-width: 0;
  max-width: 100%;
}

.wd-kanban-lane-scroll {
  overflow-x: hidden;
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-x pan-y;
}

.wd-kanban-lane--expanded {
  min-inline-size: var(--wd-kanban-min-column-width);
  max-inline-size: var(--wd-kanban-max-column-width);
}

.wd-kanban-lane--collapsed {
  inline-size: var(--wd-kanban-collapsed-column-width);
  min-inline-size: var(--wd-kanban-collapsed-column-width);
  max-inline-size: var(--wd-kanban-collapsed-column-width);
}

.wd-kanban-collapsed-rail {
  padding-inline: var(--sx-spacing-xxs, 0.25rem);
  padding-block: 0 var(--sx-spacing-xxs, 0.25rem);
}

.wd-kanban-collapsed-toggle {
  inline-size: calc(var(--sx-spacing-lg, 1.5rem) + var(--sx-spacing-xxs, 0.25rem));
  block-size: calc(var(--sx-spacing-lg, 1.5rem) + var(--sx-spacing-xxs, 0.25rem));
}

/* Razor pages mount their server-rendered body into the shell viewport. */
#app-body-slot {
  width: 100%;
  min-width: 0;
}

.wd-content-full {
  min-height: 100%;
}

/* Public layout (unauthenticated): full viewport without sidebar */
.wd-public-layout {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--sx-colorNeutralBackground1, var(--wd-bg));
}

.wd-login-page {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  box-sizing: border-box;
  padding: calc(var(--sx-spacing-xl) + var(--sx-spacing-xl)) var(--sx-spacing-lg) calc(var(--sx-spacing-xl) + var(--sx-spacing-xl) + var(--sx-spacing-xl));
  background: var(--sx-colorNeutralBackground3, var(--wd-page-bg));
}

.wd-login-panel {
  width: min(100%, 26rem);
}

.wd-login-panel > .wd-login-panel-body {
  display: flex;
  flex-direction: column;
  gap: var(--sx-spacing-lg);
  padding: var(--sx-spacing-xl);
  color: var(--sx-colorNeutralForeground1, var(--wd-fg));
}

.wd-login-header > h1 {
  margin: 0;
  color: var(--sx-colorNeutralForeground1, var(--wd-fg));
  font-size: var(--sx-font-size-xl, 1.5rem);
  font-weight: var(--sx-font-weight-semibold, 600);
  line-height: 1.2;
}

.wd-login-error {
  padding: var(--sx-spacing-sm) var(--sx-spacing-md);
  border: var(--sx-border-width-thin, 1px) solid var(--sx-colorStatusDangerBorder, #d13438);
  border-radius: var(--sx-borderRadiusMedium, 0.5rem);
  background: var(--sx-colorStatusDangerBackground, #fde7e9);
  color: var(--sx-colorStatusDangerForeground, #d13438);
  font-size: var(--sx-font-size-sm, 0.875rem);
}

.wd-login-auth-choice,
.wd-login-form {
  display: flex;
  flex-direction: column;
  gap: var(--sx-spacing-md);
}

.wd-login-section-label,
.wd-login-label {
  color: var(--sx-colorNeutralForeground2, var(--wd-muted-fg));
  font-size: var(--sx-font-size-xs, 0.75rem);
  font-weight: var(--sx-font-weight-semibold, 600);
  line-height: 1.2;
}

.wd-login-auth-form {
  display: flex;
  justify-content: flex-start;
}

.wd-login-divider {
  display: flex;
  align-items: center;
  gap: var(--sx-spacing-sm);
  color: var(--sx-colorNeutralForeground3, var(--wd-muted-fg));
  font-size: var(--sx-font-size-xs, 0.75rem);
  font-weight: var(--sx-font-weight-semibold, 600);
  line-height: 1;
}

.wd-login-divider > span {
  flex: 1 1 auto;
  height: var(--sx-border-width-thin, 1px);
  background: var(--sx-colorNeutralStroke2, var(--wd-border));
}

.wd-login-divider > strong {
  font: inherit;
}

.wd-login-field {
  gap: var(--sx-spacing-xs);
}

.wd-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sx-spacing-sm);
}

.wd-login-actions {
  display: flex;
  justify-content: flex-end;
}

.wd-login-submit,
.wd-login-external-button {
  width: auto;
  max-width: 100%;
  min-width: 8.75rem;
  white-space: normal;
}

.wd-login-link {
  min-width: auto;
  flex: 0 0 auto;
}

@media (max-width: 36rem) {
  .wd-login-page {
    align-items: flex-start;
    padding: var(--sx-spacing-xl) var(--sx-spacing-md);
  }

  .wd-login-panel > .wd-login-panel-body {
    padding: var(--sx-spacing-lg);
  }

  .wd-login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Enable elastic/rubber-band scrolling globally for all scrollable elements (macOS/iOS) */
* {
  -webkit-overflow-scrolling: touch;
}

/* Ensure overscroll bounce effect is enabled for scrollable containers */
[style*="overflow: auto"],
[style*="overflow-y: auto"],
[style*="overflow: scroll"],
[style*="overflow-y: scroll"] {
  overscroll-behavior: auto;
}

/* Common scrollable patterns */
.sx-sidebar-nav-content,
.sx-shell-route,
#app-body-slot,
[class*="overflow-y-auto"],
[class*="overflow-auto"] {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

.wd-kanban-lane-scroll {
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
}

.wd-task-card {
  cursor: grab;
  overflow-x: hidden;
  box-shadow: none;
}

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

.wd-maestro-card-badge {
  inline-size: 1.5rem;
  block-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--wd-border);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  background: var(--wd-muted-bg);
  color: var(--wd-muted-fg);
}

.wd-maestro-card-badge--running,
.wd-maestro-card-badge--succeeded {
  border-color: color-mix(in srgb, #16a34a 32%, transparent);
  background: color-mix(in srgb, #16a34a 10%, transparent);
  color: #16a34a;
}

.wd-maestro-card-badge--bridged {
  border-color: color-mix(in srgb, var(--wd-primary) 32%, transparent);
  background: color-mix(in srgb, var(--wd-primary) 10%, transparent);
  color: var(--wd-primary);
}

.wd-maestro-card-badge--waiting {
  border-color: color-mix(in srgb, #2563eb 32%, transparent);
  background: color-mix(in srgb, #2563eb 10%, transparent);
  color: #2563eb;
}

.wd-maestro-card-badge--failed {
  border-color: color-mix(in srgb, #dc2626 32%, transparent);
  background: color-mix(in srgb, #dc2626 10%, transparent);
  color: #dc2626;
}

.wd-maestro-card-badge--canceled,
.wd-maestro-card-badge--blocked {
  border-color: color-mix(in srgb, #d97706 32%, transparent);
  background: color-mix(in srgb, #d97706 10%, transparent);
  color: #d97706;
}

.wd-maestro-card-badge--joined,
.wd-maestro-card-badge--scheduled {
  border-color: color-mix(in srgb, var(--wd-primary) 28%, transparent);
  background: color-mix(in srgb, var(--wd-primary) 8%, transparent);
  color: var(--wd-primary);
}

.wd-drag-handle {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  font-weight: 700;
  line-height: 1;
}

.wd-drag-handle:active {
  cursor: grabbing;
}

.wd-drag-ghost {
  position: fixed;
  z-index: 10000;
  pointer-events: none !important;
  opacity: 0.8;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.1);
  transform: rotate(2deg);
  transition: transform 0.1s;
}

/* Global lock to prevent text selection during any drag operation */
.wd-dragging-active, 
.wd-dragging-active *,
[draggable="true"]:active,
[draggable="true"]:active * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

.wd-drag-ghost * {
  /* Ensure all content is visible in the ghost */
  visibility: visible !important;
}

.wd-nextui-shell [data-wd-nav-drop="true"].drag-over {
  background-color: color-mix(in srgb, var(--wd-primary), transparent 85%) !important;
  outline: 2px solid var(--wd-primary) !important;
  outline-offset: -2px;
}

.wd-toast {
  position: fixed;
  left: 50%;
  bottom: 1.375rem;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(220, 53, 69, 0.95);
  color: #fff;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out;
  max-width: 70vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-toast--show {
  opacity: 1;
}

.wd-task-card--dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.wd-task-card--selected {
  border-color: var(--wd-primary) !important;
  background-color: var(--wd-muted-bg) !important;
  box-shadow: none !important;
}

.wd-task-card--preview {
  outline: 0.125rem dashed var(--wd-primary);
  outline-offset: 0.125rem;
  background: var(--wd-muted-bg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.wd-task-card--preview * {
  visibility: hidden;
}

.wd-task-placeholder {
  pointer-events: none;
  margin-bottom: 0.75rem;
  transition: all 0.15s ease;
}

.wd-dropzone {
  min-height: 2rem;
  padding-bottom: 0.5rem;
}

.wd-dropzone--over {
  background: rgba(13, 110, 253, 0.06);
  border-radius: 0.75rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dropdowns and Popovers */
.wd-popover {
    background-color: var(--wd-card-bg) !important;
    border: 0.0625rem solid var(--wd-border) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--wd-popover-shadow) !important;
    padding: 0.5rem 0 !important;
    opacity: 1 !important;
}

[data-theme='dark'] .wd-popover {
    background-color: #1f2937 !important;
}

.wd-menu-item, .wd-popover-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg) !important;
    transition: all 0.2s;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
}

.wd-menu-item:hover, .wd-popover-item:hover {
    background-color: var(--wd-hover-bg) !important;
}

details[data-wd-dropdown] > summary {
    list-none: none;
}

details[data-wd-dropdown] > summary::-webkit-details-marker {
    display: none;
}

details[data-wd-dropdown][open] > .wd-popover {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromTop {
    from { transform: translateY(-0.5rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-in {
    animation-duration: 200ms;
    animation-fill-mode: both;
}

.fade-in {
    animation-name: fadeIn;
}

.slide-in-from-top-1 {
    animation-name: slideInFromTop;
}

/* Breathing animation for paused state */
@keyframes wdBreathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

.wd-animate-breathe {
    animation: wdBreathe 2s ease-in-out infinite;
}

@keyframes wdSpinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: wdSpinSlow 3s linear infinite;
}

/* Task Checklist Styling */
.prose ul > li input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--wd-primary);
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: middle;
}

.prose ul > li:has(input[type="checkbox"]:checked) {
    text-decoration: line-through;
    opacity: 0.6;
}

.prose ul {
    list-style-type: none;
    padding-left: 0.5rem;
}

.prose li {
    padding-left: 0;
}

/* NextUI notification bell styles */
.wd-notification {
    position: relative;
}

.wd-notification-trigger {
    position: relative;
}

.wd-notification-badge-right,
.wd-notification-badge-left {
    position: absolute;
    top: -2px;
}

.wd-notification-badge-right {
    right: -2px;
}

.wd-notification-badge-left {
    left: -2px;
}

.wd-notification-panel {
    width: 20rem;
    max-height: 28rem;
    overflow: hidden;
}

.wd-notification-header {
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wd-border);
    background: var(--wd-muted-bg);
}

.wd-notification-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wd-notification-body {
    max-height: 24rem;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.wd-notification-section {
    padding: 0 0.75rem 0.75rem;
    border-bottom: 1px solid var(--wd-border);
}

.wd-notification-section-header {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.wd-notification-section-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wd-notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wd-notification-item {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.wd-notification-item-text {
    flex: 1;
    min-width: 0;
}

.wd-notification-item-title {
    font-weight: 700;
    text-transform: uppercase;
}

.wd-notification-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    margin-top: 0.25rem;
}

.wd-notification-muted {
    color: var(--wd-muted-fg);
}

.wd-notification-read {
    opacity: 0.6;
}

.wd-notification-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--wd-muted-fg);
}

.wd-footer {
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
}

.wd-footer-meta {
    align-items: center;
}

/* NextUI navbar layout helpers */
.wd-navbar-title {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.wd-navbar-title-text {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.wd-navbar-title-actions {
    align-items: center;
    flex-shrink: 0;
}

.wd-navbar-left {
    align-items: center;
    min-width: 0;
}

.wd-navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sx-spacing-xs, 0.5rem);
    flex: 0 0 auto;
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 4rem);
}

.wd-navbar-actions--workspace {
    max-width: min(34rem, calc(100vw - 7rem));
}

.wd-navbar-actions--compact {
    flex: 0 0 auto;
    width: max-content;
}

.wd-navbar-actions__task-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sx-spacing-xs, 0.5rem);
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
}

.wd-navbar-task-search-inline {
    flex: 0 0 auto;
    width: 18rem;
    max-width: 18rem;
}

.wd-navbar-task-search-trigger,
.wd-navbar-create-task--icon {
    display: none !important;
}

.wd-navbar-create-task {
    flex: 0 0 auto;
    white-space: nowrap;
}

.wd-global-search-results-popover {
    visibility: hidden;
}

.wd-navbar-search-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5000;
    width: min(28rem, calc(100vw - 3rem));
    visibility: hidden;
    padding: 0.5rem;
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-radius-xl, 1rem);
    background: var(--wd-card-bg);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
}

.wd-navbar-search-popover__row {
    display: flex;
    align-items: center;
    gap: var(--sx-spacing-xs, 0.5rem);
    min-width: 0;
}

.wd-navbar-search-popover__search {
    flex: 1 1 auto;
}

@media (max-width: 48rem) {
    .wd-navbar-create-task--full {
        display: none !important;
    }

    .wd-navbar-create-task--icon {
        display: inline-flex !important;
    }

    .wd-navbar-task-search-inline {
        display: none !important;
    }

    .wd-navbar-task-search-trigger {
        display: inline-flex !important;
        flex: 0 0 auto;
    }
}

/* Quick task creation */
.wd-quick-task-dialog-overlay .sx-dialog {
    border: 1px solid var(--wd-border);
    background: var(--wd-card-bg);
}

.wd-quick-task-dialog-overlay .sx-dialog-body {
    padding: 0;
}

.wd-quick-task-dialog-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.wd-quick-task-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sx-spacing-xs, 0.5rem);
    min-width: 0;
}

.wd-quick-task-action-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-quick-task-card-head,
.wd-quick-task-card-title,
.wd-quick-task-section__head,
.wd-quick-task-meta-row,
.wd-quick-task-attachment-list {
    display: flex;
    align-items: center;
}

.wd-quick-task-location-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
}

.wd-quick-task-location-path {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.wd-quick-task-location-trigger {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 0.35rem;
    min-width: 0;
    max-width: 13rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--sx-radius-md, 0.5rem);
    color: var(--wd-muted-fg);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 700;
}

.wd-quick-task-location-trigger:hover,
.wd-quick-task-location-trigger--open {
    border-color: color-mix(in srgb, var(--wd-primary) 34%, var(--wd-border));
    color: var(--wd-primary);
    background: color-mix(in srgb, var(--wd-primary) 7%, transparent);
}

.wd-quick-task-location-trigger:disabled {
    cursor: default;
    opacity: 0.45;
}

.wd-quick-task-location-trigger > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-quick-task-location-trigger--icon {
    flex: 0 0 auto;
    justify-content: center;
    width: 2rem;
    padding: 0;
}

.wd-quick-task-location-trigger__chevron {
    flex: 0 0 auto;
    font-size: 0.7rem;
    opacity: 0.72;
}

.wd-quick-task-location-menu {
    min-width: 14rem;
    max-width: min(28rem, calc(100vw - 2rem));
    max-height: min(22rem, calc(100vh - 8rem));
    overflow-y: auto;
}

.wd-quick-task-location-menu__empty {
    padding: var(--sx-spacing-sm, 0.75rem) var(--sx-spacing-md, 1rem);
    color: var(--wd-muted-fg);
    font-size: 0.8rem;
}

.sx-dialog-overlay.wd-quick-task-discard-dialog {
    z-index: 100010;
}

.wd-quick-task-discard-content {
    display: grid;
    gap: var(--sx-spacing-lg, 1.5rem);
}

.wd-quick-task-discard-content > p {
    margin: 0;
    color: var(--wd-muted-fg);
    line-height: 1.55;
}

.wd-quick-task-discard-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--sx-spacing-sm, 0.75rem);
    flex-wrap: wrap;
}

.wd-quick-task-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--sx-spacing-sm, 0.75rem);
    min-height: 0;
    overflow-y: auto;
    padding: 0.35rem var(--sx-spacing-lg, 1.5rem) var(--sx-spacing-md, 1rem);
}

.wd-quick-task-loading {
    display: flex;
    min-height: 18rem;
    align-items: center;
    justify-content: center;
    gap: var(--sx-spacing-sm, 0.75rem);
    color: var(--wd-muted-fg);
    font-weight: 700;
}

.wd-quick-task-spinner {
    color: var(--wd-primary);
    animation: wd-spin 0.9s linear infinite;
}

.wd-quick-task-section {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-sm, 0.75rem);
    flex: 0 0 auto;
    min-width: 0;
}

.wd-quick-task-section--description {
    flex: 1 0 12rem;
    min-height: 12rem;
    min-width: 0;
}

.wd-quick-task-section--attachments {
    flex-shrink: 0;
}

.wd-quick-task-section__head,
.wd-quick-task-card-head {
    justify-content: space-between;
    gap: var(--sx-spacing-sm, 0.75rem);
}

.wd-quick-task-section__head {
    color: var(--wd-muted-fg);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.wd-quick-task-attachment-pill {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--wd-border);
    border-radius: 999px;
    color: var(--wd-muted-fg);
    background: var(--wd-card-bg);
}

.wd-quick-task-attachment-pill > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-quick-task-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    flex: 0 0 auto;
    gap: var(--sx-spacing-sm, 0.75rem);
}

.wd-quick-task-title-input {
    min-width: 0;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--wd-border);
    outline: 0;
    padding: 0.35rem 0;
    color: var(--wd-fg);
    background: transparent;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.wd-quick-task-title-input:focus {
    border-color: var(--wd-primary);
}

.wd-quick-task-title-input::placeholder {
    color: color-mix(in srgb, var(--wd-muted-fg) 42%, transparent);
}

.wd-quick-task-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(8rem, 0.8fr) minmax(9rem, 0.8fr);
    flex: 0 0 auto;
    gap: var(--sx-spacing-sm, 0.75rem);
}

.wd-quick-task-card-head {
    min-height: 2.25rem;
}

.wd-quick-task-card-title {
    gap: var(--sx-spacing-xs, 0.5rem);
    color: var(--wd-fg);
    font-weight: 750;
}

.wd-quick-task-description {
    flex: 1 1 auto;
    width: 100%;
    min-height: 8rem;
    padding: var(--sx-spacing-sm, 0.75rem) var(--sx-spacing-md, 1rem);
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-radius-lg, 0.75rem);
    color: var(--wd-fg);
    background: var(--wd-input-bg);
    resize: vertical;
    outline: none;
    line-height: 1.55;
}

.wd-quick-task-description:focus {
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wd-primary) 18%, transparent);
}

.wd-quick-task-description::placeholder {
    color: var(--wd-muted-fg);
}

.wd-quick-task-attachment-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sx-spacing-sm, 0.75rem);
    min-height: 6.5rem;
    padding: var(--sx-spacing-md, 1rem);
    border: 2px dashed color-mix(in srgb, var(--wd-border) 86%, var(--wd-muted-fg));
    border-radius: var(--sx-radius-xl, 1rem);
    color: var(--wd-muted-fg);
    background: color-mix(in srgb, var(--wd-muted-bg) 18%, transparent);
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.wd-quick-task-attachment-zone--dragging {
    border-color: color-mix(in srgb, var(--wd-primary) 72%, var(--wd-border));
    color: var(--wd-primary);
    background: color-mix(in srgb, var(--wd-primary) 8%, var(--wd-card-bg));
}

.wd-quick-task-attachment-zone__icon {
    flex: 0 0 auto;
    font-size: 1.6rem;
}

.wd-quick-task-attachment-zone strong,
.wd-quick-task-attachment-zone span {
    display: block;
}

.wd-quick-task-attachment-zone strong {
    color: var(--wd-fg);
    font-size: 0.9rem;
}

.wd-quick-task-attachment-zone span {
    margin-top: 0.15rem;
    font-size: 0.78rem;
}

.wd-quick-task-attachment-list {
    flex-wrap: wrap;
    gap: var(--sx-spacing-xs, 0.5rem);
}

.wd-quick-task-attachment-pill {
    gap: 0.35rem;
    max-width: 18rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 650;
}

.wd-quick-task-attachment-pill small {
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--wd-muted-fg) 72%, transparent);
    font-size: 0.65rem;
}

@media (max-width: 48rem) {
    .wd-quick-task-body {
        padding-inline: var(--sx-spacing-md, 1rem);
    }

    .wd-quick-task-action-label {
        display: none;
    }

    .wd-quick-task-location-path {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .wd-quick-task-location-path::-webkit-scrollbar {
        display: none;
    }

    .wd-quick-task-location-trigger {
        flex: 0 0 auto;
        max-width: 10rem;
    }

    .wd-quick-task-title-input {
        font-size: 1.35rem;
    }

    .wd-quick-task-meta-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .wd-quick-task-header-actions {
        gap: 0.25rem;
    }
}

/* Maestro run detail */
.wd-run-detail-page {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-md, 1rem);
    min-width: 0;
    padding: var(--sx-spacing-md, 1rem);
}

.wd-run-detail-cancel-action {
    color: #dc2626 !important;
}

.wd-run-detail-stats > .wd-card {
    min-width: 0;
    overflow: hidden;
}

.wd-run-detail-stat-label,
.wd-run-detail-stat-subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
}

.wd-run-detail-stat-subtitle {
    margin-top: 0.25rem;
}

.wd-run-detail-stat-value {
    min-width: 0;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 2rem;
}

.wd-run-detail-task-link {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-run-detail-path-row {
    display: flex;
    align-items: center;
    gap: var(--sx-spacing-xxs, 0.25rem);
    min-width: 0;
}

.wd-run-detail-path {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-run-policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--sx-spacing-sm, 0.75rem);
    min-width: 0;
}

.wd-run-policy-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.wd-run-policy-label {
    min-width: 0;
    overflow: hidden;
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-run-policy-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--wd-fg);
    font-size: 0.875rem;
    line-height: 1.35;
}

.wd-run-policy-section {
    min-width: 0;
    margin-top: var(--sx-spacing-md, 1rem);
}

.wd-run-policy-section--warning {
    padding: var(--sx-spacing-sm, 0.75rem);
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-radius-sm, 0.375rem);
    background: var(--wd-card-bg);
}

.wd-run-policy-section--context {
    padding-top: var(--sx-spacing-md, 1rem);
    border-top: 1px solid var(--wd-border);
}

.wd-run-policy-section-title {
    margin-bottom: var(--sx-spacing-sm, 0.75rem);
    color: var(--wd-fg);
    font-size: 0.875rem;
    font-weight: 600;
}

.wd-run-policy-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xxs, 0.25rem);
    min-width: 0;
    margin-top: 0.25rem;
}

.wd-run-policy-chip {
    max-width: 100%;
    overflow: hidden;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-radius-sm, 0.375rem);
    background: var(--wd-card-bg);
    color: var(--wd-fg);
    font-size: 0.75rem;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-run-policy-muted {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
}

.wd-run-policy-pre {
    min-width: 0;
    margin-top: 0.25rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    color: var(--wd-fg);
    font-size: 0.75rem;
    line-height: 1.35;
}

.wd-maestro-event-list {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-xs, 0.5rem);
}

.wd-maestro-event-row {
    min-width: 0;
    padding: var(--sx-spacing-xs, 0.5rem) 0;
    border-bottom: 1px solid var(--wd-border);
}

.wd-maestro-event-row:last-child {
    border-bottom: 0;
}

.wd-maestro-event-row__meta {
    display: flex;
    align-items: baseline;
    gap: var(--sx-spacing-xs, 0.5rem);
    min-width: 0;
    font-size: 0.75rem;
}

.wd-maestro-event-row__time {
    flex: 0 0 auto;
    color: var(--wd-fg-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.wd-maestro-event-row__kind {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.wd-maestro-event-row__text {
    min-width: 0;
    margin-top: 0.25rem;
    overflow: visible;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--wd-fg);
    font-size: 0.75rem;
    line-height: 1.35;
}

.wd-maestro-event-row__text--collapsed {
    max-height: 4.1em;
    overflow: hidden;
}

.wd-run-list-diagnostic {
    align-items: center;
    color: var(--wd-fg-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-left: 0.25rem;
}

.wd-run-list-diagnostic span,
.wd-run-list-diagnostic strong {
    border: 1px solid var(--wd-border);
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
}

.wd-run-list-diagnostic strong {
    color: var(--wd-fg);
    font-weight: 600;
}

.wd-run-list-diagnostic em {
    font-size: 0.75rem;
    font-style: normal;
    overflow-wrap: anywhere;
}

.wd-run-diagnostic-summary {
    display: grid;
    gap: var(--sx-spacing-sm, 0.75rem);
    margin-bottom: var(--sx-spacing-md, 1rem);
}

.wd-run-diagnostic-group {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-run-diagnostic-group--warning {
    border-color: color-mix(in srgb, #d97706 44%, var(--wd-border));
    background: color-mix(in srgb, #d97706 8%, transparent);
}

.wd-maestro-inline-link {
    margin-top: 0.25rem;
    color: var(--wd-primary);
    font-size: 0.75rem;
}

.wd-maestro-inline-link:hover {
    text-decoration: underline;
}

.wd-maestro-events-dialog {
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: var(--sx-spacing-md, 1rem);
}

.wd-activity-dialog-body {
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: var(--sx-spacing-md, 1rem);
}

.wd-activity-panel {
    --wd-activity-inline-padding: var(--sx-spacing-md, 1rem);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    background: var(--wd-bg);
}

.wd-activity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem var(--wd-activity-inline-padding) 0.5rem;
    flex: 0 0 auto;
}

.wd-activity-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.wd-activity-panel-title h3 {
    margin: 0;
    color: var(--sx-card-title-color, var(--wd-fg));
    font-size: var(--sx-card-title-font-size, var(--sx-type-body-strong-font-size));
    font-weight: var(--sx-card-title-font-weight, 600);
    line-height: var(--sx-card-title-line-height, 1.25);
    white-space: nowrap;
}

.wd-activity-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.wd-activity-filter-tabs {
    box-sizing: border-box;
    width: 100%;
    padding: 0 var(--wd-activity-inline-padding) 0.625rem;
    flex: 0 0 auto;
}

.wd-activity-filter-tabs > .sx-tabs-header,
.wd-activity-filter-tabs > .sx-tabs-header > .sx-tabs-list {
    width: 100%;
}

.wd-activity-filter-tabs.sx-tabs > .sx-tabs-header {
    display: flex;
}

.wd-activity-filter-tabs > .sx-tabs-header > .sx-tabs-list {
    flex: 1 1 auto;
    gap: 0.125rem;
    margin-inline: calc(var(--sx-spacing-micro, 0.0625rem) * -2);
    padding: 0.1875rem;
    border: 1px solid var(--sx-colorNeutralStroke2, var(--wd-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)) 74%, transparent);
}

.wd-activity-filter-tabs > .sx-tabs-header > .sx-tabs-list > .sx-tabs-item {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 999px !important;
}

.wd-activity-filter-tabs--dialog {
    max-width: 24rem;
    padding: 0;
}

.wd-activity-stream-wrap {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
}

.wd-activity-stream {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--wd-activity-inline-padding);
}

.wd-activity-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    min-width: 0;
}

.wd-activity-avatar {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0.125rem;
    min-width: 0;
}

.wd-activity-avatar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 2px solid var(--wd-bg);
    border-radius: 999px;
    background: var(--sx-colorBrandBackground1, var(--wd-primary));
    color: var(--sx-colorNeutralForegroundOnBrand, #fff);
    box-shadow: 0 0.125rem 0.375rem color-mix(in srgb, #000 14%, transparent);
    cursor: pointer;
    transition:
        box-shadow 120ms ease,
        transform 120ms ease;
}

.wd-activity-avatar-button:hover {
    box-shadow: 0 0.25rem 0.75rem color-mix(in srgb, #000 18%, transparent);
    transform: translateY(-1px);
}

.wd-activity-avatar-button--agent,
.wd-activity-avatar-button--system {
    background: color-mix(in srgb, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)) 64%, white);
    box-shadow: none;
}

.wd-activity-avatar-button--agent {
    border-color: color-mix(in srgb, var(--sx-colorBrandStroke1, var(--wd-primary)) 42%, var(--sx-colorNeutralStroke2, var(--wd-border)));
    color: var(--sx-colorBrandForeground1, var(--wd-primary));
}

.wd-activity-avatar-button--system {
    border-color: var(--sx-colorNeutralStroke2, var(--wd-border));
    color: var(--sx-colorNeutralForeground2, var(--wd-muted-fg));
}

.wd-activity-avatar-button--agent:hover {
    border-color: color-mix(in srgb, var(--sx-colorBrandStroke1, var(--wd-primary)) 58%, var(--sx-colorNeutralStroke2, var(--wd-border)));
    background: color-mix(in srgb, var(--sx-colorBrandBackground1, var(--wd-primary)) 8%, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)));
    box-shadow: 0 0.125rem 0.5rem color-mix(in srgb, #000 10%, transparent);
}

.wd-activity-avatar-button--system:hover {
    background: color-mix(in srgb, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)) 78%, white);
    box-shadow: 0 0.125rem 0.5rem color-mix(in srgb, #000 10%, transparent);
}

.wd-activity-avatar-symbol {
    font-size: 0.875rem;
}

.wd-activity-avatar-initials {
    color: inherit;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.wd-activity-actor-card {
    width: min(17rem, calc(100vw - 2rem));
    color: var(--sx-colorNeutralForeground1, var(--wd-fg));
}

.wd-activity-actor-floating-card {
    position: fixed;
    z-index: 100000;
    max-width: calc(100vw - 1rem);
    padding: var(--sx-spacing-md, 1rem);
    border: 1px solid var(--sx-colorNeutralStroke1, var(--wd-border));
    border-radius: var(--sx-borderRadiusMedium, 0.75rem);
    background: var(--sx-colorNeutralBackground1, var(--wd-card-bg));
    box-shadow: var(--sx-shadow16, 0 1rem 2.5rem color-mix(in srgb, #000 24%, transparent));
}

.wd-activity-actor-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.wd-activity-actor-card-header > .wd-activity-avatar-button {
    pointer-events: none;
}

.wd-activity-actor-card-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-activity-actor-card-title > strong {
    overflow: hidden;
    color: var(--sx-colorNeutralForeground1, var(--wd-fg));
    font-size: var(--sx-font-size-sm, 0.875rem);
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-activity-actor-card-title > span {
    color: var(--sx-colorNeutralForeground3, var(--wd-muted-fg));
    font-size: var(--sx-font-size-xs, 0.75rem);
    line-height: 1.25;
}

.wd-activity-actor-card-details {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}

.wd-activity-actor-card-details > div {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: baseline;
}

.wd-activity-actor-card-details dt {
    color: var(--sx-colorNeutralForeground3, var(--wd-muted-fg));
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 500;
}

.wd-activity-actor-card-details dd {
    min-width: 0;
    margin: 0;
    color: var(--sx-colorNeutralForeground1, var(--wd-fg));
    font-size: var(--sx-font-size-xs, 0.75rem);
    overflow-wrap: anywhere;
}

.wd-activity-item-main {
    display: contents;
}

.wd-activity-item-header {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2rem;
    margin-bottom: 0.125rem;
}

.wd-activity-actor-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.wd-activity-item-name,
.wd-activity-time {
    font-size: var(--sx-font-size-xs, 0.75rem);
    line-height: 1.25;
}

.wd-activity-reply-context,
.wd-activity-item-content,
.wd-activity-expand-button,
.wd-activity-meta-row {
    grid-column: 1 / -1;
}

.wd-activity-item-content {
    padding-left: 0;
}

.wd-activity-content {
    color: var(--sx-colorNeutralForeground2, var(--wd-fg));
    font-size: var(--sx-font-size-sm, 0.875rem);
    font-weight: var(--sx-fontWeightRegular, 400);
    line-height: 1.6;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-activity-content :where(p, ul, ol) {
    margin-top: 0;
    margin-bottom: 0.5rem;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-activity-content :where(p:last-child, ul:last-child, ol:last-child) {
    margin-bottom: 0;
}

.wd-activity-content :where(p, li, blockquote, code, pre, a, td, th) {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-activity-content :where(pre) {
    overflow-x: hidden;
    white-space: pre-wrap;
}

.wd-activity-content :where(table) {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.wd-activity-log-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    color: var(--wd-muted-fg);
    transition: color 120ms ease, background-color 120ms ease;
}

.wd-activity-log-button:hover {
    color: var(--wd-primary);
    background: color-mix(in srgb, var(--wd-primary) 10%, transparent);
}

.wd-activity-content-collapsed {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    max-height: 4.75em;
}

.wd-activity-expand-button {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 0.25rem;
    width: fit-content;
    margin: 0.25rem auto 0;
    color: var(--wd-primary);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 550;
    line-height: 1.25;
    transition: color 120ms ease;
}

.wd-activity-expand-button:hover {
    color: var(--sx-colorBrandForeground1, var(--wd-primary));
    text-decoration: underline;
}

.wd-activity-expand-button-icon {
    font-size: 0.75rem;
}

.wd-activity-neutral-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sx-colorNeutralStroke2, var(--wd-border));
    border-radius: 999px;
    background: var(--sx-colorNeutralBackground3, var(--wd-muted-bg));
    color: var(--sx-colorNeutralForeground2, var(--wd-fg));
    font-size: 0.625rem;
    font-weight: 550;
    line-height: 1.2;
    padding: 0.125rem 0.375rem;
}

.wd-activity-old-group {
    display: flex;
    justify-content: center;
}

.wd-activity-old-group-button {
    display: inline-grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    border: 1px solid var(--sx-colorNeutralStroke2, var(--wd-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)) 74%, transparent);
    color: var(--sx-colorNeutralForeground2, var(--wd-fg));
    font-size: var(--sx-font-size-xs, 0.75rem);
    line-height: 1.25;
    padding: 0.35rem 0.625rem;
}

.wd-activity-old-group-button:hover {
    background: color-mix(in srgb, var(--sx-colorNeutralBackground3, var(--wd-muted-bg)) 92%, transparent);
}

.wd-activity-old-group-title,
.wd-activity-old-group-range {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-activity-old-group-title {
    font-weight: 600;
}

.wd-activity-old-group-range {
    color: var(--sx-colorNeutralForeground3, var(--wd-muted-fg));
}

.wd-activity-old-group-icon {
    color: var(--sx-colorNeutralForeground3, var(--wd-muted-fg));
    font-size: 0.75rem;
}

.wd-activity-scroll-button {
    position: absolute !important;
    left: 50% !important;
    z-index: 5 !important;
    transform: translateX(-50%) !important;
    opacity: 0;
    pointer-events: none;
    background: color-mix(in srgb, var(--sx-colorNeutralBackground1, var(--wd-card-bg)) 86%, transparent) !important;
    border: 1px solid var(--sx-colorNeutralStroke2, var(--wd-border)) !important;
    box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, #000 18%, transparent);
    backdrop-filter: blur(8px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.wd-activity-stream-wrap--can-scroll-top .wd-activity-scroll-top-button,
.wd-activity-stream-wrap--can-scroll-bottom .wd-activity-scroll-bottom-button {
    opacity: 1;
    pointer-events: auto;
}

.wd-activity-scroll-top-button {
    top: 0.625rem !important;
    bottom: auto !important;
}

.wd-activity-scroll-bottom-button {
    top: auto !important;
    bottom: 0.625rem !important;
}

.wd-activity-input-area {
    flex: 0 0 auto;
    border-top: 1px solid var(--wd-border);
    background: color-mix(in srgb, var(--wd-muted-bg) 20%, transparent);
    padding: 0.625rem var(--wd-activity-inline-padding) 0.75rem;
}

.wd-activity-input-shell {
    overflow: hidden;
    border: 1px solid var(--wd-border);
    border-radius: 0.75rem;
    background: var(--wd-card-bg);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.wd-activity-input-shell:focus-within {
    border-color: var(--wd-border);
    box-shadow: none;
}

.wd-activity-input {
    display: block;
    width: 100%;
    min-height: 3.5rem;
    max-height: 8rem;
    resize: vertical;
    border: 0;
    background: transparent;
    color: var(--wd-fg);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 650;
    line-height: 1.5;
    outline: none;
    padding: 0.5rem 0.75rem 0.375rem;
}

.wd-activity-input:focus {
    outline: none;
    box-shadow: none;
}

.wd-activity-input-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    container: wd-activity-toolbar / inline-size;
    border-top: 1px solid color-mix(in srgb, var(--wd-border) 40%, transparent);
    background: color-mix(in srgb, var(--wd-muted-bg) 10%, transparent);
    padding: 0.375rem 0.75rem;
}

.wd-activity-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1.75rem;
    height: 1.75rem;
    gap: 0.375rem;
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    background: var(--wd-primary);
    color: var(--sx-colorNeutralForegroundOnBrand, #fff);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 600;
    line-height: 1;
    padding: 0 0.75rem;
    white-space: nowrap;
    transition:
        box-shadow 120ms ease,
        opacity 120ms ease,
        transform 120ms ease;
}

.wd-activity-send-button--ready {
    box-shadow: 0 0.5rem 1rem color-mix(in srgb, var(--wd-primary) 20%, transparent);
}

.wd-activity-send-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.wd-activity-send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.wd-activity-send-button:disabled,
.wd-activity-send-button--disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.wd-activity-send-icon {
    flex: 0 0 auto;
    font-size: 0.75rem;
}

.wd-activity-send-label {
    min-width: 0;
    white-space: nowrap;
    word-break: keep-all;
}

@container wd-activity-toolbar (max-width: 16rem) {
    .wd-activity-send-button {
        width: 1.75rem;
        padding-inline: 0;
    }

    .wd-activity-send-label {
        display: none;
    }
}

.wd-node-settings-page {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-md, 1rem);
    min-height: 100%;
    max-width: 64rem;
    padding: var(--sx-spacing-md, 1rem);
}

.wd-maestro-full-window-dialog.sx-dialog-overlay {
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.wd-task-maestro-log-dialog.sx-dialog-overlay {
    z-index: 5000 !important;
}

.wd-task-edit-label {
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.25;
    opacity: 0.75;
    text-transform: none;
}

.wd-task-edit-field {
    color: var(--wd-fg);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.wd-task-edit-section-title {
    color: var(--wd-muted-fg);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.wd-task-external-metadata-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wd-border);
}

.wd-task-external-metadata-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-external-metadata-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.42rem;
    width: 100%;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 76%, transparent);
    border-radius: 0.75rem;
    padding: 0.78rem 0.85rem 0.7rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 24%, var(--wd-card-bg));
    color: inherit;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.wd-task-external-metadata-row:hover {
    border-color: color-mix(in srgb, var(--wd-primary) 36%, var(--wd-border));
    background: color-mix(in srgb, var(--wd-muted-bg) 38%, var(--wd-card-bg));
    box-shadow: 0 0.35rem 1.1rem color-mix(in srgb, var(--wd-fg) 6%, transparent);
}

.wd-task-external-metadata-row__key,
.wd-task-external-metadata-row__value {
    min-width: 0;
}

.wd-task-external-metadata-row__key {
    display: block;
    width: fit-content;
    max-width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--wd-fg);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.32;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}

.wd-task-external-metadata-row__key:hover {
    color: var(--wd-primary);
}

.wd-task-external-metadata-row__key:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--wd-primary) 54%, transparent);
    outline-offset: 0.15rem;
}

.wd-task-external-metadata-row__value {
    display: -webkit-box;
    overflow: hidden;
    color: var(--wd-fg);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.48;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.wd-task-external-metadata-dialog__body {
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.wd-task-external-metadata-dialog__meta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.35rem;
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
}

.wd-task-external-metadata-dialog__tabs.sx-tabs {
    flex: 0 0 auto;
}

.wd-task-external-metadata-dialog__preview,
.wd-task-external-metadata-dialog__json,
.wd-task-external-metadata-dialog__text,
.wd-task-external-metadata-dialog__raw {
    align-self: stretch;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.625rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 20%, var(--wd-card-bg));
}

.wd-task-external-metadata-dialog__preview,
.wd-task-external-metadata-dialog__json,
.wd-task-external-metadata-dialog__text,
.wd-task-external-metadata-dialog__raw {
    flex: 1 1 auto;
    overflow: auto;
    padding: 0.85rem;
}

.wd-task-external-metadata-dialog__json,
.wd-task-external-metadata-dialog__text,
.wd-task-external-metadata-dialog__raw {
    margin: 0;
    color: var(--wd-fg);
    font-family: var(--wd-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace);
    font-size: 0.78rem;
    line-height: 1.52;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wd-task-main-pane .wd-task-card {
    min-width: 0;
    overflow: visible;
    cursor: default;
}

.wd-task-main-pane .wd-task-card > .sx-card-header {
    display: block;
    border-bottom: 0;
}

.wd-task-main-pane .wd-task-card > .sx-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    overflow: visible;
}

.wd-task-title-bar {
    padding: var(--sx-spacing-s, 0.75rem) 0 var(--sx-spacing-xs, 0.5rem);
    border-bottom: 0;
}

.wd-task-title-editor {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: var(--sx-spacing-s, 0.75rem);
    border: var(--sx-border-width-thin, 1px) solid var(--sx-colorNeutralStroke1, var(--wd-border));
    border-radius: var(--sx-card-border-radius, var(--sx-borderRadiusMedium, 0.5rem));
    background: var(--sx-colorNeutralBackground1, var(--wd-card-bg));
    padding: var(--sx-spacing-xs, 0.5rem) var(--sx-spacing-s, 0.75rem);
}

.wd-task-title-editor:focus-within {
    border-color: var(--sx-colorBrandStroke1, var(--wd-primary));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--wd-primary) 18%, transparent);
}

.wd-task-title-input {
    min-height: 2rem;
    color: var(--wd-fg);
}

.wd-task-title-input:focus {
    outline: none;
}

.wd-task-title-tools {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.125rem;
}

.wd-task-title-tool-button,
.wd-task-title-history-trigger {
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
}

.wd-task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-card-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-card-heading h3 {
    margin: 0;
    color: var(--sx-card-title-color, var(--wd-fg));
    font-size: var(--sx-card-title-font-size, var(--sx-type-body-strong-font-size));
    font-weight: var(--sx-card-title-font-weight, 600);
    line-height: var(--sx-card-title-line-height, 1.25);
    white-space: nowrap;
}

.wd-task-card-heading-icon {
    color: var(--sx-card-title-color, var(--sx-colorNeutralForeground2, var(--wd-fg)));
    font-size: var(--sx-card-title-font-size, 1rem);
}

.wd-task-card-header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.wd-task-inline-field {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: min(15rem, 100%);
    min-width: 0;
}

.wd-task-inline-label {
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.wd-task-header-select {
    max-width: 10rem;
}

.wd-task-header-select .sx-select-group {
    min-width: 0;
}

.wd-task-navbar-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    max-width: min(64vw, 48rem);
    overflow: hidden;
}

.wd-task-navbar-path {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    color: var(--wd-muted-fg);
}

.wd-task-navbar-separator {
    font-size: 0.625rem;
    opacity: 0.35;
}

.wd-task-navbar-parent-badge,
.wd-task-navbar-custom-id,
.wd-task-navbar-id {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 1.375rem;
    border: 1px solid var(--wd-border);
    border-radius: 0.375rem;
    padding: 0 0.375rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 55%, transparent);
    color: var(--wd-muted-fg);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.wd-task-navbar-parent-badge {
    font-size: 0.55rem;
    opacity: 0.8;
}

.wd-task-navbar-parent-button {
    max-width: 8rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.125rem 0.375rem;
    color: var(--wd-muted-fg);
    font-size: 0.625rem;
    font-weight: 600;
    text-overflow: ellipsis;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.wd-task-navbar-parent-button:hover {
    border-color: var(--wd-border);
    background: color-mix(in srgb, var(--wd-muted-bg) 50%, transparent);
    color: var(--wd-fg);
}

.wd-task-navbar-id {
    cursor: pointer;
}

.wd-task-navbar-id:hover {
    background: color-mix(in srgb, var(--wd-muted-bg) 75%, transparent);
}

.wd-task-navbar-id--copied {
    border-color: var(--wd-primary);
    background: var(--wd-primary);
    color: var(--wd-primary-fg);
}

.wd-task-navbar-custom-id {
    border-color: color-mix(in srgb, var(--wd-primary) 25%, transparent);
    background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
    color: var(--wd-primary);
}

.wd-task-navbar-maestro-status {
    --wd-task-navbar-status-fg: var(--wd-primary);
    --wd-task-navbar-status-strong: var(--wd-primary);
    --wd-task-navbar-status-bg: var(--wd-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 1.375rem;
    border: 1px solid color-mix(in srgb, var(--wd-task-navbar-status-fg) 72%, var(--wd-border));
    border-radius: 0.375rem;
    padding: 0 0.45rem;
    background: color-mix(in srgb, var(--wd-task-navbar-status-bg) 20%, var(--wd-card-bg));
    color: var(--wd-task-navbar-status-strong);
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wd-task-navbar-status-bg) 10%, transparent);
}

.wd-task-navbar-maestro-status:hover {
    background: color-mix(in srgb, var(--wd-task-navbar-status-bg) 28%, var(--wd-card-bg));
    color: var(--wd-task-navbar-status-strong);
}

.wd-task-navbar-maestro-status__icon {
    font-size: 0.7rem;
}

.wd-task-navbar-maestro-status--attention {
    --wd-task-navbar-status-fg: var(--sx-colorStatusWarning, var(--sx-colorPaletteYellowForeground1, #b45309));
    --wd-task-navbar-status-strong: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    --wd-task-navbar-status-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
}

.wd-task-navbar-maestro-status--running {
    --wd-task-navbar-status-fg: var(--wd-primary);
    --wd-task-navbar-status-strong: var(--wd-primary);
    --wd-task-navbar-status-bg: var(--wd-primary);
}

.wd-task-navbar-maestro-status--scheduled {
    --wd-task-navbar-status-fg: var(--wd-primary);
    --wd-task-navbar-status-strong: var(--wd-fg);
    --wd-task-navbar-status-bg: var(--wd-primary);
}

.wd-task-navbar-maestro-status--running .wd-task-navbar-maestro-status__icon {
    animation: wd-spin 0.9s linear infinite;
}

.wd-task-navbar-maestro-status--success {
    --wd-task-navbar-status-fg: var(--sx-colorStatusSuccess, var(--sx-colorPaletteGreenForeground1, #047857));
    --wd-task-navbar-status-strong: var(--sx-colorStatusSuccessStrong, var(--sx-colorPaletteGreenForeground2, #065f46));
    --wd-task-navbar-status-bg: var(--sx-colorStatusSuccessBackground1, #10b981);
}

.wd-task-navbar-maestro-status--danger {
    --wd-task-navbar-status-fg: var(--sx-colorStatusDanger, var(--sx-colorPaletteRedForeground1, #dc2626));
    --wd-task-navbar-status-strong: var(--sx-colorStatusDangerStrong, var(--sx-colorPaletteRedForeground2, #991b1b));
    --wd-task-navbar-status-bg: var(--sx-colorStatusDangerBackground1, #dc2626);
}

.wd-task-navbar-maestro-status--muted {
    --wd-task-navbar-status-fg: var(--wd-muted-fg);
    --wd-task-navbar-status-strong: var(--wd-fg);
    --wd-task-navbar-status-bg: var(--wd-muted-bg);
}

.wd-task-navbar-empty {
    display: block;
    width: 0;
    height: 0;
}

.wd-task-field-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
    align-items: start;
    gap: 0.875rem 1rem;
    width: 100%;
    min-width: 0;
}

.wd-task-field-wrap--plain {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.wd-task-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.wd-task-field-hint {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.wd-task-help-label {
    appearance: none;
    position: relative;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--wd-muted-fg);
    cursor: help;
    font-family: inherit;
    opacity: 1;
    outline: none;
    text-align: left;
}

.wd-task-help-label__text {
    border-bottom: 1px dotted color-mix(in srgb, var(--wd-muted-fg) 45%, transparent);
    opacity: 0.75;
}

.wd-task-help-label:focus-visible .wd-task-help-label__text {
    outline: 2px solid color-mix(in srgb, var(--wd-primary) 45%, transparent);
    outline-offset: 0.1875rem;
}

.wd-task-help-tooltip {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: max-content;
    max-width: min(18rem, calc(100vw - 2rem));
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--wd-card-bg);
    box-shadow: 0 0.75rem 2rem color-mix(in srgb, var(--wd-fg) 14%, transparent);
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.35;
    opacity: 1;
    pointer-events: none;
    text-transform: none;
    transform: translateY(0);
    visibility: visible;
}

.wd-task-help-tooltip__title {
    color: var(--wd-fg);
    font-weight: 600;
}

.wd-task-field--wide {
    min-width: 0;
    max-width: none;
}

.wd-task-field--switch {
    min-width: 0;
    max-width: none;
}

.wd-task-control-row {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    width: 100%;
    min-width: 0;
}

.wd-task-control-row .sx-select-group,
.wd-task-control-row .sx-input-group,
.wd-task-control-row .sx-textarea-group,
.wd-task-description-markdown.sx-textarea-group {
    min-width: 0;
    max-width: 100%;
}

.wd-task-control-row .sx-select-group,
.wd-task-control-row .sx-input-group,
.wd-task-control-row .sx-textarea-group,
.wd-task-description-markdown.sx-textarea-group {
    width: 100%;
}

.wd-task-control-row .sx-select-value,
.wd-task-control-row .sx-select-placeholder,
.wd-task-control-row .sx-input {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-permission-reason-textarea .sx-textarea {
    width: 100%;
    max-width: 100%;
    min-height: 2rem;
    box-sizing: border-box;
    border: var(--sx-border-width-thin, 1px) solid var(--sx-colorNeutralStroke1, var(--wd-border));
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    padding: 0.3125rem 0.625rem;
    background-color: var(--sx-colorNeutralBackground1, var(--wd-card-bg));
    color: var(--sx-colorNeutralForeground1, var(--wd-fg));
    font-size: var(--sx-font-size-sm, 0.875rem);
    line-height: 1.25rem;
    field-sizing: content;
    overflow-y: hidden;
    resize: vertical;
}

.wd-task-permission-reason-textarea .sx-textarea::placeholder {
    color: var(--sx-colorNeutralForeground4, var(--wd-muted-fg));
}

.wd-task-permission-reason-textarea .sx-textarea:focus {
    outline: none;
    border-color: var(--sx-colorBrandStroke1, var(--wd-primary));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--wd-primary) 16%, transparent);
}

.wd-task-control-icon {
    flex: 0 0 auto;
    font-size: 0.75rem;
}

.wd-task-status-dot {
    flex: 0 0 auto;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
}

.wd-task-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
    color: var(--wd-primary);
    font-size: 0.65rem;
    font-weight: 600;
}

.wd-task-switch-row {
    display: flex;
    align-items: center;
    min-height: 1.875rem;
}

.wd-task-maestro-header {
    align-items: center;
}

.wd-task-info-header,
.wd-task-execution-header {
    order: -30;
    position: sticky;
    top: 0;
    z-index: 5;
    border: var(--sx-border-width-thin, 1px) solid color-mix(in srgb, var(--wd-border) 70%, transparent);
    border-radius: var(--sx-card-border-radius, var(--sx-borderRadiusMedium, 0.5rem));
    background: color-mix(in srgb, var(--wd-card-bg) 96%, transparent);
    backdrop-filter: blur(0.75rem);
}

.wd-task-info-header .wd-task-card-header,
.wd-task-execution-header .wd-task-card-header {
    padding: var(--sx-spacing-s, 0.75rem);
}

.wd-task-main-pane .wd-task-info-card > .sx-card-header {
    display: none;
}

.wd-task-flow-item {
    order: -20;
}

.wd-task-maestro-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.625rem;
    min-width: 0;
}

.wd-task-maestro-actions {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: min(16rem, 100%);
}

.wd-task-maestro-auto-run {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    color: var(--wd-fg);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.wd-task-maestro-status-row {
    order: -10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 50%, transparent);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--wd-card-bg);
}

.wd-task-section-header-controls,
.wd-task-card-header-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-section-alert {
    min-width: 0;
    max-width: min(16rem, 45vw);
    overflow: hidden;
    color: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-run-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-run-results-empty {
    border: 1px dashed color-mix(in srgb, var(--wd-border) 82%, transparent);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: var(--wd-muted-fg);
    font-size: 0.82rem;
    line-height: 1.45;
}

.wd-task-run-cycles-header,
.wd-task-run-cycles-title,
.wd-task-run-cycles-title__text {
    display: flex;
    min-width: 0;
}

.wd-task-run-cycles-header {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
}

.wd-task-run-cycles-title {
    align-items: flex-start;
}

.wd-task-run-cycles-title > .wd-task-card-heading-icon {
    margin-top: 0.25rem;
}

.wd-task-run-cycles-title__text {
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.16rem;
}

.wd-task-run-cycles-title__text > p {
    margin: 0;
    color: var(--wd-muted-fg);
    font-size: 0.76rem;
    line-height: 1.35;
}

.wd-task-run-cycle-accordion,
.wd-task-run-cycle-heading,
.wd-task-run-cycle-heading__main,
.wd-task-run-cycle-heading__summary,
.wd-task-run-cycle-heading__footer,
.wd-task-run-cycle-heading__view-tabs,
.wd-task-run-cycle__body,
.wd-task-run-cycle__details-header,
.wd-task-run-cycle__details-copy,
.wd-task-run-cycle__details-summary,
.wd-task-run-cycle__details-actions,
.wd-task-run-cycle__stage-results,
.wd-task-run-cycle-summary,
.wd-task-run-cycle-summary__empty {
    display: flex;
    min-width: 0;
}

.wd-task-run-cycle-accordion.sx-accordion {
    border-color: color-mix(in srgb, var(--wd-border) 84%, transparent);
    border-radius: 0.625rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 22%, var(--wd-card-bg));
    overflow: hidden;
}

.wd-task-run-cycle.sx-accordion-item {
    background: transparent;
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header {
    box-sizing: border-box;
    min-height: auto;
    padding: 0.8rem 0.95rem;
    width: 100%;
    background: color-mix(in srgb, var(--wd-muted-bg) 42%, var(--wd-card-bg));
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header > .sx-accordion-trigger {
    align-items: flex-start;
    flex: 1 1 auto;
    gap: 0;
    min-width: 0;
    width: 100%;
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header > .sx-accordion-trigger > .sx-accordion-heading {
    display: block;
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header > .sx-accordion-trigger > .sx-accordion-heading > .wd-task-run-cycle-heading {
    width: 100%;
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header > .sx-accordion-trigger > .sx-accordion-arrow {
    display: none;
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-header:hover {
    background: color-mix(in srgb, var(--wd-muted-bg) 56%, var(--wd-card-bg));
}

.wd-task-run-cycle.sx-accordion-item.sx-is-expanded > .sx-accordion-header {
    border-bottom: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    background: color-mix(in srgb, var(--wd-muted-bg) 30%, var(--wd-card-bg));
}

.wd-task-run-cycle.sx-accordion-item > .sx-accordion-panel {
    padding: 0;
    background: var(--wd-card-bg);
}

.wd-task-run-cycle-heading {
    position: relative;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
    flex: 1 1 auto;
    gap: 0.9rem;
    width: 100%;
}

.wd-task-run-cycle-heading__lead,
.wd-task-run-cycle-heading__lead-meta {
    display: flex;
    min-width: 0;
}

.wd-task-run-cycle-heading__lead {
    align-self: stretch;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.45rem;
    width: auto;
    max-width: min(13rem, 42vw);
    min-height: 5rem;
    color: color-mix(in srgb, var(--wd-muted-fg) 72%, transparent);
}

.wd-task-run-cycle-heading__ordinal {
    align-self: flex-start;
    display: block;
    width: auto;
    min-width: 0;
    font-size: 2.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 0.95;
    text-align: left;
    transform: translateX(-0.04em);
    transform-origin: left center;
}

.wd-task-run-cycle-heading__lead-meta {
    flex-direction: column;
    gap: 0.12rem;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
}

.wd-task-run-cycle-heading__lead-meta > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-run-cycle-heading__main {
    align-self: stretch;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.45rem;
    justify-self: stretch;
    min-height: 5rem;
    width: 100%;
}

.wd-task-run-cycle-heading__summary {
    flex-direction: column;
    gap: 0.18rem;
    padding-top: 0.02rem;
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    line-height: 1.42;
    align-items: flex-end;
    justify-self: stretch;
    width: 100%;
    text-align: right;
}

.wd-task-run-cycle-heading__footer {
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: auto;
    width: 100%;
}

.wd-task-run-cycle-heading__view-tabs.sx-tabs {
    flex: 0 1 auto;
    height: auto !important;
    max-width: calc(100% - 1.4rem);
    width: fit-content !important;
}

.wd-task-run-cycle-heading__view-tabs > .sx-tabs-header {
    height: auto !important;
    min-height: 0 !important;
    padding: 0;
    width: fit-content !important;
}

.wd-task-run-cycle-heading__view-tabs > .sx-tabs-header > .sx-tabs-list {
    flex: 0 0 auto !important;
    align-items: center;
    gap: 0.16rem;
    height: auto !important;
    min-height: 1.42rem !important;
    width: fit-content !important;
    padding: 0.09rem !important;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--wd-card-bg) 86%, var(--wd-muted-bg));
}

.wd-task-run-cycle-heading__view-tabs.wd-task-run-cycle-heading__view-tabs > .sx-tabs-header > .sx-tabs-list > .sx-tabs-item.sx-tabs-item {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 1.12rem !important;
    min-width: 0;
    width: auto !important;
    max-width: 6.9rem;
    border-radius: 999px !important;
    padding: 0.11rem 0.42rem !important;
    padding-block: 0.11rem !important;
    padding-inline: 0.42rem !important;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-run-cycle-heading__view-tabs > .sx-tabs-header > .sx-tabs-list > .sx-tabs-item .sx-tabs-item__icon {
    font-size: 0.72rem !important;
}

.wd-task-run-cycle-heading__footer > .wd-task-run-cycle-heading__state-icon.wd-task-run-cycle-heading__state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 0.54rem !important;
    height: 0.54rem !important;
    color: var(--wd-muted-fg);
    font-size: 0.5rem !important;
    line-height: 1;
    opacity: 0.72;
    pointer-events: none;
    --fa-width: 1em;
}

.wd-task-run-cycle-heading__state-icon :where(svg) {
    width: 0.5rem;
    height: 0.5rem;
}

.wd-task-run-cycle-heading__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.wd-task-run-cycle-heading__summary > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-run-cycle__body {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem 0.95rem;
}

.wd-task-run-cycle__details-header {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.wd-task-run-cycle__details-copy {
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.22rem;
}

.wd-task-run-cycle__details-title {
    color: var(--wd-muted-fg);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.wd-task-run-cycle__details-summary {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.32rem 0.6rem;
    color: var(--wd-muted-fg);
    font-size: 0.76rem;
    line-height: 1.35;
}

.wd-task-run-cycle__details-actions {
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 0.4rem;
}

.wd-task-run-cycle__stage-results {
    flex-direction: column;
    gap: 0.625rem;
}

.wd-task-run-cycle-summary {
    flex-direction: column;
    gap: 0.65rem;
}

.wd-task-run-cycle-summary__content {
    border: 1px solid color-mix(in srgb, var(--wd-border) 74%, transparent);
    border-radius: 0.5rem;
    padding: 0.78rem 0.85rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 24%, var(--wd-card-bg));
    color: var(--wd-fg);
    font-size: 0.82rem;
    line-height: 1.56;
    white-space: normal;
}

.wd-task-markdown-content {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-markdown-content :where(p, ul, ol, blockquote, pre, table) {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.wd-task-markdown-content > :last-child {
    margin-bottom: 0;
}

.wd-task-markdown-content :where(a, code, pre, td, th) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-markdown-content pre {
    overflow: auto;
    max-width: 100%;
    border-radius: 0.45rem;
    padding: 0.65rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 48%, var(--wd-card-bg));
    white-space: pre-wrap;
}

.wd-task-markdown-content code {
    white-space: break-spaces;
}

.wd-task-run-cycle-summary__empty {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px dashed color-mix(in srgb, var(--wd-border) 82%, transparent);
    border-radius: 0.5rem;
    padding: 0.78rem 0.85rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 16%, var(--wd-card-bg));
}

.wd-task-run-cycle-summary__empty > p {
    margin: 0;
    min-width: 0;
    color: var(--wd-muted-fg);
    font-size: 0.82rem;
    line-height: 1.4;
}

.wd-task-run-cycle-summary__generate {
    flex: 0 0 auto;
}

.wd-task-run-cycle-summary__generate--running .sx-btn-icon-start,
.wd-task-run-cycle-summary__generate--running .sx-btn-spinner {
    animation: wd-spin 0.9s linear infinite;
}

@media (max-width: 760px) {
    .wd-task-run-cycle-heading {
        grid-template-columns: max-content minmax(0, 1fr);
        gap: 0.7rem;
    }

    .wd-task-run-cycle-heading__lead {
        max-width: min(9.5rem, 46vw);
        min-height: 4.5rem;
    }

    .wd-task-run-cycle-heading__ordinal {
        font-size: 2.2rem;
    }

    .wd-task-run-cycle-heading__lead-meta {
        font-size: 0.68rem;
    }

    .wd-task-run-cycle-heading__main {
        min-height: 4.5rem;
    }

    .wd-task-run-cycle-heading__view-tabs > .sx-tabs-header > .sx-tabs-list > .sx-tabs-item {
        max-width: 4.8rem;
        padding-inline: 0.34rem;
    }

    .wd-task-run-cycle__details-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wd-task-run-cycle__details-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.wd-task-completion-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--sx-colorStatusSuccessForeground1, #107c10) 32%, var(--wd-border));
    border-radius: 0.625rem;
    padding: 0.8rem 0.875rem;
    background: color-mix(in srgb, var(--sx-colorStatusSuccessBackground1, #dff6dd) 32%, var(--wd-card-bg));
}

.wd-task-completion-badge__icon {
    flex: 0 0 auto;
    color: var(--sx-colorStatusSuccessForeground1, #107c10);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.wd-task-completion-badge__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.24rem;
    min-width: 0;
}

.wd-task-completion-badge__title {
    color: var(--wd-fg);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.wd-task-completion-badge__content > p,
.wd-task-completion-badge__meta {
    margin: 0;
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    line-height: 1.4;
}

.wd-task-maestro-card > .sx-card-body > .wd-task-field-wrap {
    order: 20;
}

.wd-task-maestro-policy-preview {
    order: 30;
}

.wd-task-maestro-permission-approval,
.wd-task-maestro-human-intervention,
.wd-task-maestro-completion,
.wd-task-acceptance-milestone,
.wd-task-stage-result {
    order: -9;
}

.wd-maestro-policy-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 42%, transparent);
}

.wd-maestro-policy-preview__header,
.wd-maestro-policy-preview__title,
.wd-maestro-policy-preview__summary,
.wd-maestro-policy-preview__capabilities,
.wd-maestro-policy-preview__capability {
    display: flex;
    align-items: center;
}

.wd-maestro-policy-preview__header {
    justify-content: space-between;
    gap: 0.5rem;
}

.wd-maestro-policy-preview__title {
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg);
}

.wd-maestro-policy-preview__status {
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.wd-maestro-policy-preview__status--ready {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.wd-maestro-policy-preview__status--warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.15);
}

.wd-maestro-policy-preview__status--blocked {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
}

.wd-maestro-policy-preview__summary,
.wd-maestro-policy-preview__capabilities {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.wd-maestro-policy-preview__summary > span,
.wd-maestro-policy-preview__capability {
    border-radius: 0.375rem;
    border: 1px solid var(--wd-border);
    background: var(--wd-card-bg);
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    color: var(--wd-fg-muted);
}

.wd-maestro-policy-preview__capability {
    gap: 0.35rem;
}

.wd-maestro-policy-preview__capability small {
    color: var(--wd-muted-fg);
}

.wd-maestro-policy-preview__reasons {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #b91c1c;
}

.wd-maestro-policy-preview__next {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-maestro-policy-preview--empty {
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-maestro-capability-risk {
    border-radius: 999px;
    padding: 0.0625rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--wd-fg-muted) 10%, transparent);
    color: var(--wd-fg-muted);
}

.wd-maestro-capability-risk--medium {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.wd-maestro-capability-risk--high,
.wd-maestro-capability-risk--critical {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.wd-task-maestro-policy-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 42%, transparent);
}

.wd-task-maestro-policy-preview__header,
.wd-task-maestro-policy-preview__title,
.wd-task-maestro-policy-preview__summary,
.wd-task-maestro-policy-preview__capabilities,
.wd-task-maestro-policy-preview__capability {
    display: flex;
    align-items: center;
}

.wd-task-maestro-policy-preview__header {
    justify-content: space-between;
    gap: 0.5rem;
}

.wd-task-maestro-policy-preview__title {
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg);
}

.wd-task-maestro-policy-preview__status {
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.wd-task-maestro-policy-preview__status--ready {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.wd-task-maestro-policy-preview__status--warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.15);
}

.wd-task-maestro-policy-preview__status--blocked {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
}

.wd-task-maestro-policy-preview__summary,
.wd-task-maestro-policy-preview__capabilities {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.wd-task-maestro-policy-preview__summary > span,
.wd-task-maestro-policy-preview__capability {
    border-radius: 0.375rem;
    border: 1px solid var(--wd-border);
    background: var(--wd-card-bg);
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-preview__capability {
    gap: 0.35rem;
}

.wd-task-maestro-policy-preview__capability small {
    color: var(--wd-muted-fg);
}

.wd-task-maestro-policy-preview__reasons {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #b91c1c;
}

.wd-task-maestro-policy-preview__blocked-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-preview__next {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-preview--empty {
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-help {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.wd-task-maestro-policy-help__summary {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    color: var(--wd-fg);
}

.wd-task-maestro-policy-help__summary > .sx-icon {
    margin-top: 0.125rem;
    color: var(--sx-colorStatusDanger, #b91c1c);
}

.wd-task-maestro-policy-help__summary-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.wd-task-maestro-policy-help__summary p {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-help__items {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.wd-task-maestro-policy-help__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.625rem;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    background: var(--wd-card-bg);
}

.wd-task-maestro-policy-help__item-icon {
    color: var(--wd-primary);
    line-height: 1;
}

.wd-task-maestro-policy-help__item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg);
}

.wd-task-maestro-policy-help__item-source,
.wd-task-maestro-policy-help__item-detail {
    margin-top: 0.2rem;
    font-size: 0.78125rem;
    color: var(--wd-fg-muted);
}

.wd-task-maestro-policy-help__item-actions {
    display: flex;
    justify-content: flex-end;
}

.wd-task-maestro-human-intervention {
    --wd-task-human-alert-fg: var(--sx-colorStatusWarning, var(--sx-colorPaletteYellowForeground1, #b45309));
    --wd-task-human-alert-strong: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    --wd-task-human-alert-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--wd-task-human-alert-bg) 45%, var(--wd-border));
    border-radius: 0.75rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--wd-task-human-alert-bg) 10%, var(--wd-card-bg));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--wd-task-human-alert-bg) 12%, transparent);
}

.wd-task-maestro-human-intervention:focus {
    outline: 2px solid color-mix(in srgb, var(--wd-task-human-alert-bg) 55%, transparent);
    outline-offset: 2px;
}

.wd-task-maestro-human-intervention--pulse {
    animation: wd-human-intervention-pulse 0.9s ease-out 2;
}

.wd-task-maestro-attention--pulse {
    animation: wd-human-intervention-pulse 0.9s ease-out 2;
}

.wd-task-maestro-human-intervention__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-maestro-human-intervention__icon {
    flex: 0 0 auto;
    margin-top: 0.125rem;
    color: var(--wd-task-human-alert-fg);
    font-size: 1.25rem;
}

.wd-task-maestro-human-intervention__title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wd-task-maestro-human-intervention__title > span {
    color: var(--wd-task-human-alert-strong);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.wd-task-maestro-human-intervention__title > small {
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    line-height: 1.45;
}

.wd-task-maestro-human-intervention__next {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-task-human-alert-bg) 30%, transparent);
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--wd-task-human-alert-bg) 16%, var(--wd-card-bg));
}

.wd-task-maestro-human-intervention__next-title,
.wd-task-maestro-human-intervention__full-title {
    color: var(--wd-task-human-alert-strong);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.wd-task-maestro-human-intervention__next-steps {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    color: var(--wd-fg);
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-maestro-human-intervention__next small {
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    line-height: 1.45;
}

.wd-task-maestro-human-intervention__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wd-task-maestro-human-intervention__sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 0.5rem;
}

.wd-task-maestro-human-intervention__section {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.5rem;
    padding: 0.625rem;
    background: color-mix(in srgb, var(--wd-card-bg) 92%, var(--wd-task-human-alert-bg));
}

.wd-task-maestro-human-intervention__section h4 {
    margin: 0 0 0.35rem;
    color: var(--wd-task-human-alert-strong);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
}

.wd-task-maestro-human-intervention__section pre {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    color: var(--wd-fg);
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-maestro-human-intervention__full {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.wd-task-maestro-human-intervention__body {
    max-height: 18rem;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.5rem;
    padding: 0.875rem;
    background: var(--wd-card-bg);
    color: var(--wd-fg);
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-maestro-permission-approval,
.wd-task-maestro-attempt-limit-card,
.wd-task-maestro-completion,
.wd-task-acceptance-milestone,
.wd-task-stage-result {
    --wd-task-attention-fg: var(--sx-colorStatusWarning, var(--sx-colorPaletteYellowForeground1, #b45309));
    --wd-task-attention-strong: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    --wd-task-attention-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 45%, var(--wd-border));
    border-radius: 0.75rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--wd-task-attention-bg) 10%, var(--wd-card-bg));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--wd-task-attention-bg) 12%, transparent);
}

.wd-task-maestro-attempt-limit-card {
    --wd-task-attention-fg: var(--sx-colorStatusWarning, var(--sx-colorPaletteYellowForeground1, #b45309));
    --wd-task-attention-strong: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    --wd-task-attention-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
}

.wd-task-maestro-completion {
    --wd-task-attention-fg: var(--sx-colorStatusSuccess, var(--sx-colorPaletteGreenForeground1, #047857));
    --wd-task-attention-strong: var(--sx-colorStatusSuccessStrong, var(--sx-colorPaletteGreenForeground2, #065f46));
    --wd-task-attention-bg: var(--sx-colorStatusSuccessBackground1, #10b981);
}

.wd-task-acceptance-milestone--scheduled,
.wd-task-acceptance-milestone--running,
.wd-task-stage-result--scheduled,
.wd-task-stage-result--running {
    --wd-task-attention-fg: var(--wd-primary);
    --wd-task-attention-strong: var(--wd-primary);
    --wd-task-attention-bg: var(--wd-primary);
}

.wd-task-acceptance-milestone--success,
.wd-task-stage-result--success {
    --wd-task-attention-fg: var(--sx-colorStatusSuccess, var(--sx-colorPaletteGreenForeground1, #047857));
    --wd-task-attention-strong: var(--sx-colorStatusSuccessStrong, var(--sx-colorPaletteGreenForeground2, #065f46));
    --wd-task-attention-bg: var(--sx-colorStatusSuccessBackground1, #10b981);
}

.wd-task-acceptance-milestone--danger,
.wd-task-stage-result--danger {
    --wd-task-attention-fg: var(--sx-colorStatusDanger, var(--sx-colorPaletteRedForeground1, #b91c1c));
    --wd-task-attention-strong: var(--sx-colorStatusDangerStrong, var(--sx-colorPaletteRedForeground2, #991b1b));
    --wd-task-attention-bg: var(--sx-colorStatusDangerBackground1, #ef4444);
}

.wd-task-acceptance-milestone--muted,
.wd-task-stage-result--muted {
    --wd-task-attention-fg: var(--wd-muted-fg);
    --wd-task-attention-strong: var(--wd-fg-muted);
    --wd-task-attention-bg: var(--wd-muted-bg);
}

.wd-task-maestro-permission-approval__header,
.wd-task-maestro-completion__header,
.wd-task-acceptance-milestone__header,
.wd-task-stage-result__header,
.wd-task-result-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-result-card__heading {
    display: inline-flex;
    align-items: flex-start;
    flex: 1 1 auto;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-maestro-permission-approval__icon,
.wd-task-maestro-completion__icon,
.wd-task-acceptance-milestone__icon,
.wd-task-stage-result__icon,
.wd-task-result-card__icon {
    flex: 0 0 auto;
    margin-top: 0.125rem;
    color: var(--wd-task-attention-fg);
    font-size: 1.25rem;
}

.wd-task-maestro-permission-approval__title,
.wd-task-maestro-completion__title,
.wd-task-acceptance-milestone__title,
.wd-task-stage-result__title,
.wd-task-result-card__title {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wd-task-maestro-permission-approval__title > span,
.wd-task-maestro-completion__title > span,
.wd-task-acceptance-milestone__title > span,
.wd-task-stage-result__title > span,
.wd-task-result-card__title > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--wd-task-attention-strong);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-maestro-permission-approval__title > small,
.wd-task-maestro-completion__title > small,
.wd-task-acceptance-milestone__title > small,
.wd-task-stage-result__title > small,
.wd-task-result-card__title > small {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-result-card__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 0.35rem;
    margin-left: auto;
    white-space: nowrap;
}

.wd-task-result-card__time {
    border: 0;
    background: transparent;
    color: var(--wd-muted-fg);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    line-height: 1.25;
    padding: 0;
    text-align: right;
    white-space: nowrap;
}

.wd-task-result-card__time:hover,
.wd-task-result-card__time:focus-visible {
    color: var(--wd-task-attention-strong);
    text-decoration: underline;
}

.wd-task-result-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.wd-task-maestro-permission-approval__next,
.wd-task-maestro-completion__next,
.wd-task-acceptance-milestone__next,
.wd-task-stage-result__next {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 30%, transparent);
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--wd-task-attention-bg) 16%, var(--wd-card-bg));
}

.wd-task-maestro-permission-approval__next-title,
.wd-task-maestro-completion__next-title,
.wd-task-acceptance-milestone__next-title,
.wd-task-stage-result__next-title {
    color: var(--wd-task-attention-strong);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.wd-task-maestro-permission-approval__next p,
.wd-task-maestro-completion__next p,
.wd-task-acceptance-milestone__next p,
.wd-task-stage-result__next p {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    color: var(--wd-fg);
    font-size: 0.85rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-maestro-permission-approval__next small,
.wd-task-acceptance-milestone__next small,
.wd-task-stage-result__next small {
    max-width: 100%;
    min-width: 0;
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-stage-result__details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    border-top: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 26%, transparent);
    padding-top: 0.5rem;
}

.wd-task-stage-result__details-title {
    color: var(--wd-task-attention-strong);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

.wd-task-next-run-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    margin: 0;
    min-width: 0;
    border-top: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 24%, transparent);
    padding-top: 0.5rem;
}

.wd-task-next-run-input > div {
    display: grid;
    grid-template-columns: minmax(5rem, auto) minmax(0, 1fr);
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-next-run-input dt,
.wd-task-next-run-input dd {
    margin: 0;
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1.45;
}

.wd-task-next-run-input dt {
    color: var(--wd-muted-fg);
    font-weight: 700;
}

.wd-task-next-run-input dd {
    color: var(--wd-fg);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-human-review-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
}

.wd-task-human-review-checklist__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.wd-task-human-review-checklist__header > span {
    color: var(--wd-task-attention-strong);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.wd-task-human-review-checklist__header > small {
    color: var(--wd-muted-fg);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}

.wd-task-human-review-checklist__items {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.wd-task-human-review-checklist__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: color-mix(in srgb, var(--wd-card-bg) 88%, var(--wd-task-attention-bg));
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease;
}

.wd-task-human-review-checklist__item:hover {
    border-color: color-mix(in srgb, var(--wd-task-attention-bg) 42%, var(--wd-border));
}

.wd-task-human-review-checklist__item--checked {
    background: color-mix(in srgb, var(--wd-task-attention-bg) 12%, var(--wd-card-bg));
}

.wd-task-human-review-checklist__item--agent-passed {
    border-color: color-mix(in srgb, var(--sx-colorStatusSuccessBackground1, #10b981) 42%, var(--wd-border));
    background: color-mix(in srgb, var(--sx-colorStatusSuccessBackground1, #10b981) 10%, var(--wd-card-bg));
}

.wd-task-human-review-checklist__item--failed {
    border-color: color-mix(in srgb, var(--sx-colorStatusDangerBackground1, #ef4444) 42%, var(--wd-border));
    background: color-mix(in srgb, var(--sx-colorStatusDangerBackground1, #ef4444) 10%, var(--wd-card-bg));
}

.wd-task-human-review-checklist__item--locked {
    cursor: default;
}

.wd-task-human-review-checklist__item > input {
    margin-top: 0.15rem;
    accent-color: var(--wd-primary);
}

.wd-task-human-review-checklist__content,
.wd-task-human-review-checklist__line,
.wd-task-human-review-checklist__note,
.wd-task-human-review-checklist__reason,
.wd-task-human-review-checklist__evidence {
    min-width: 0;
}

.wd-task-human-review-checklist__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wd-task-human-review-checklist__line {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wd-task-human-review-checklist__text {
    min-width: 0;
    flex: 1 1 13rem;
    color: var(--wd-fg);
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-human-review-checklist__item--checked .wd-task-human-review-checklist__text {
    color: var(--wd-fg-muted);
}

.wd-task-human-review-checklist__source {
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 999px;
    padding: 0.0625rem 0.375rem;
    background: var(--wd-card-bg);
    color: var(--wd-muted-fg);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.wd-task-human-review-checklist__status {
    border: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 35%, transparent);
    border-radius: 999px;
    padding: 0.0625rem 0.375rem;
    background: color-mix(in srgb, var(--wd-task-attention-bg) 12%, var(--wd-card-bg));
    color: var(--wd-task-attention-strong);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.wd-task-human-review-checklist__note,
.wd-task-human-review-checklist__reason,
.wd-task-human-review-checklist__evidence {
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-human-review-checklist__reason {
    color: var(--wd-task-attention-strong);
}

.wd-task-human-review-checklist__evidence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.wd-task-human-review-checklist__evidence > span:first-child {
    font-weight: 700;
}

.wd-task-human-review-checklist__evidence-item {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
}

.wd-task-human-review-checklist__evidence-item > a,
.wd-task-human-review-checklist__evidence-item > span {
    max-width: 100%;
    overflow: hidden;
    color: var(--wd-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-human-review-checklist__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-human-review-checklist__actions > small {
    min-width: min(100%, 12rem);
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.wd-task-human-review-checklist__approve--running .sx-btn-icon-start,
.wd-task-human-review-checklist__approve--running .sx-btn-spinner {
    animation: wd-spin 0.9s linear infinite;
}

.wd-task-human-review-summary {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
    border-top: 1px solid color-mix(in srgb, var(--wd-task-attention-bg) 26%, transparent);
    padding-top: 0.5rem;
}

.wd-task-human-review-summary__items {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.wd-task-human-review-summary__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: color-mix(in srgb, var(--wd-task-attention-bg) 12%, var(--wd-card-bg));
}

.wd-task-human-review-summary__icon {
    margin-top: 0.1rem;
    color: var(--wd-task-attention-strong);
    font-size: 1rem;
}

.wd-task-human-review-summary__text {
    min-width: 0;
    color: var(--wd-fg);
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wd-task-human-review-summary__source {
    justify-self: end;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 999px;
    padding: 0.0625rem 0.375rem;
    background: var(--wd-card-bg);
    color: var(--wd-muted-fg);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.wd-task-maestro-permission-approval__actions,
.wd-task-maestro-attempt-limit__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wd-task-maestro-approval-button--running .sx-btn-icon-start,
.wd-task-maestro-approval-button--running .sx-btn-spinner {
    animation: wd-spin 0.9s linear infinite;
}

.wd-task-maestro-permission-approval__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 0.5rem;
    margin: 0;
}

.wd-task-maestro-permission-approval__detail {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 72%, transparent);
    border-radius: 0.5rem;
    padding: 0.625rem;
    background: color-mix(in srgb, var(--wd-card-bg) 92%, var(--wd-task-attention-bg));
}

.wd-task-maestro-permission-approval__detail--wide {
    grid-column: 1 / -1;
}

.wd-task-maestro-permission-approval__detail dt {
    margin: 0 0 0.35rem;
    color: var(--wd-task-attention-strong);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
}

.wd-task-maestro-permission-approval__detail dd {
    margin: 0;
    color: var(--wd-fg);
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.wd-task-maestro-permission-approval__detail pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wd-task-maestro-attempt-limit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--sx-colorStatusWarning, #f59e0b) 45%, transparent);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: color-mix(in srgb, var(--sx-colorStatusWarningBackground1, #f59e0b) 10%, transparent);
    color: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
    font-weight: 600;
}

.wd-task-maestro-cancel-run.sx-btn {
    color: var(--sx-colorStatusDanger, var(--sx-colorPaletteRedForeground1, #dc2626));
}

.wd-task-maestro-cancel-run.sx-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--sx-colorStatusDanger, #dc2626) 10%, transparent);
    color: var(--sx-colorStatusDanger, var(--sx-colorPaletteRedForeground1, #dc2626));
}

.wd-task-description-card {
    gap: 0.375rem;
}

.wd-task-description-card > .sx-card-body {
    gap: 0.375rem;
}

.wd-task-description-header {
    align-items: flex-start;
}

.wd-task-description-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-width: 0;
}

.wd-task-description-tabs {
    margin-top: -0.125rem;
    width: 100%;
}

.wd-task-description-tabs > .sx-tabs-header,
.wd-task-description-tabs > .sx-tabs-header > .sx-tabs-list {
    width: 100%;
}

.wd-task-description-tabs > .sx-tabs-header {
    padding-block: 0;
}

.wd-task-description-tabs > .sx-tabs-header > .sx-tabs-list {
    gap: 0.25rem;
}

.wd-task-description-tabs > .sx-tabs-header > .sx-tabs-list > .sx-tabs-item {
    flex: 1 1 0;
    min-height: 1.75rem;
    min-width: 0;
    padding-block: 0.125rem;
}

.wd-task-description-body {
    position: relative;
    margin-top: 0.125rem;
}

.wd-task-description-preview,
.wd-task-description-wysiwyg {
    min-height: 16rem;
    border: 1px solid var(--wd-border);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 28%, transparent);
}

.wd-task-description-preview {
    max-height: 28rem;
    overflow: auto;
    padding: 1rem;
}

.wd-task-description-wysiwyg {
    display: flex;
    flex-direction: column;
    height: clamp(16rem, 42vh, 32rem);
    overflow: hidden;
}

.wd-task-description-wysiwyg .vditor {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.wd-task-description-wysiwyg .vditor-content {
    min-height: 0;
}

.wd-task-description-empty {
    color: var(--wd-muted-fg);
    font-size: 0.875rem;
}

.wd-task-maestro-run-button--running .sx-btn-icon-start,
.wd-task-maestro-run-button--running .sx-btn-spinner {
    animation: wd-spin 0.9s linear infinite;
}

.wd-task-checklist-card > .sx-card-body {
    font-size: var(--sx-font-size-sm, 0.875rem);
    font-weight: var(--sx-fontWeightRegular, 400);
    line-height: 1.6;
}

.wd-task-checklist-flow {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
}

.wd-task-checklist-add-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-width: 0;
}

.wd-task-checklist-new-list-input {
    min-width: min(12rem, 100%);
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    padding: 0.375rem 0.625rem;
    background: var(--wd-card-bg);
    color: var(--wd-fg);
    font: inherit;
}

.wd-task-checklist-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 70%, transparent);
    border-radius: 0.625rem;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 18%, transparent);
}

.wd-task-checklist-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.wd-task-checklist-section-header h4 {
    margin: 0;
    color: var(--wd-fg);
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    white-space: nowrap;
}

.wd-task-flow-card .sx-card-body {
    gap: 0.5rem;
}

.wd-task-flow-card .wd-task-flow-header {
    align-items: flex-start;
    flex-direction: row;
    gap: 0.75rem;
}

.wd-task-flow-header-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.wd-task-flow-card .wd-task-flow-header-main .wd-task-card-heading {
    width: 100%;
}

.wd-task-flow-summary {
    width: 100%;
    color: var(--wd-muted-fg);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
}

.wd-task-flow-viewport {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.wd-task-flow-timeline.sx-timeline {
    --sx-timeline-line-color: color-mix(in srgb, var(--wd-border) 82%, transparent);
    --sx-timeline-content-gap: var(--sx-spacing-xs, 0.25rem);
    --sx-timeline-custom-point-size: 2rem;
    --sx-timeline-axis-size: 2rem;
    --sx-timeline-wrap-row-gap: var(--sx-spacing-md, 0.75rem);
    --sx-timeline-wrap-column-gap: var(--sx-spacing-md, 0.75rem);
    --sx-timeline-wrap-connector-gap: var(--sx-spacing-sm, 0.5rem);
    --sx-timeline-current-content-padding-block: 0.2rem;
    --sx-timeline-current-content-padding-inline: 0.35rem;
    --sx-timeline-current-content-radius: var(--sx-borderRadiusMedium, 0.375rem);
    --sx-timeline-current-content-border-color: color-mix(in srgb, var(--wd-primary) 62%, var(--wd-border));
    --sx-timeline-current-content-background: color-mix(in srgb, var(--wd-primary) 7%, transparent);
    --sx-timeline-current-point-ring-size: 0.1875rem;
    width: 100%;
    max-width: 100%;
    padding-block: 0.1rem;
}

.wd-task-flow-timeline.sx-timeline .sx-timeline-item {
    padding-right: var(--sx-spacing-sm, 0.5rem);
}

.wd-task-flow-timeline.sx-timeline .sx-timeline-content {
    min-width: 0;
}

.wd-task-flow-timeline.sx-timeline .sx-timeline-time {
    color: var(--wd-muted-fg);
    font-size: 0.72rem;
    line-height: 1.25;
}

.wd-task-flow-timeline.sx-timeline .sx-timeline-title {
    color: var(--wd-fg);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
}

.wd-task-flow-timeline.sx-timeline .sx-timeline-head {
    background: var(--sx-timeline-point-fill, var(--wd-card-bg));
    border: 0.125rem solid var(--wd-task-flow-point-border, var(--wd-primary));
    font-size: 0.72rem;
    font-weight: 800;
}

.wd-task-flow-point {
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--sx-timeline-point-color, var(--sx-timeline-head-color, var(--wd-primary)));
    font-size: 0.82rem;
    line-height: 1;
}

.wd-task-flow-node--completed.sx-timeline-item {
    --sx-timeline-current-color: var(--sx-colorStatusSuccess, var(--wd-primary));
    --sx-timeline-head-color: var(--sx-colorStatusSuccess, var(--wd-primary));
    --wd-task-flow-point-border: var(--sx-colorStatusSuccess, var(--wd-primary));
    --sx-timeline-point-fill: color-mix(in srgb, var(--sx-colorStatusSuccess, var(--wd-primary)) 11%, var(--wd-card-bg));
    --sx-timeline-point-color: var(--sx-colorStatusSuccess, var(--wd-primary));
}

.wd-task-flow-node--active.sx-timeline-item {
    --sx-timeline-current-color: var(--sx-colorStatusWarning, #b45309);
    --sx-timeline-head-color: var(--sx-colorStatusWarning, #b45309);
    --wd-task-flow-point-border: var(--sx-colorStatusWarning, #b45309);
    --sx-timeline-point-fill: color-mix(in srgb, var(--sx-colorStatusWarning, #b45309) 12%, var(--wd-card-bg));
    --sx-timeline-point-color: var(--sx-colorStatusWarning, #b45309);
}

.wd-task-flow-node--failed.sx-timeline-item {
    --sx-timeline-current-color: var(--sx-colorStatusDanger, #dc2626);
    --sx-timeline-head-color: var(--sx-colorStatusDanger, #dc2626);
    --wd-task-flow-point-border: var(--sx-colorStatusDanger, #dc2626);
    --sx-timeline-point-fill: color-mix(in srgb, var(--sx-colorStatusDanger, #dc2626) 12%, var(--wd-card-bg));
    --sx-timeline-point-color: var(--sx-colorStatusDanger, #dc2626);
}

.wd-task-flow-node--pending.sx-timeline-item {
    --sx-timeline-head-color: color-mix(in srgb, var(--wd-muted-fg) 55%, var(--wd-border));
    --wd-task-flow-point-border: color-mix(in srgb, var(--wd-muted-fg) 42%, var(--wd-border));
    --sx-timeline-point-border-color: color-mix(in srgb, var(--wd-muted-fg) 42%, var(--wd-border));
    --sx-timeline-point-fill: color-mix(in srgb, var(--wd-muted-bg) 35%, var(--wd-card-bg));
    --sx-timeline-point-color: var(--wd-muted-fg);
}

.wd-task-flow-meta {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wd-border) 70%, transparent);
    border-radius: 0.58rem;
    padding: 0.66rem 0.72rem;
    background: color-mix(in srgb, var(--wd-muted-bg) 24%, transparent);
}

.wd-task-flow-meta__item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: start;
    column-gap: 0.5rem;
    min-width: 0;
    color: var(--wd-muted-fg);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.42;
}

.wd-task-flow-meta__item > span {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.wd-task-flow-meta__item--current {
    color: var(--wd-fg);
    font-weight: 650;
}

.wd-task-flow-meta__icon.sx-icon {
    margin-top: 0.16rem;
    color: color-mix(in srgb, var(--wd-muted-fg) 82%, transparent);
    font-size: 0.72rem;
}

.wd-task-flow-attempt-limit {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--sx-colorStatusWarning, #f59e0b) 45%, transparent);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: color-mix(in srgb, var(--sx-colorStatusWarningBackground1, #f59e0b) 12%, transparent);
    color: var(--sx-colorStatusWarningStrong, var(--sx-colorPaletteYellowForeground2, #92400e));
}

.wd-task-flow-attempt-limit__text {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.35;
}

.wd-task-flow-attempt-limit__text > strong,
.wd-task-flow-attempt-limit__text > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-task-stage-result--running .wd-task-stage-result__icon {
    animation: wd-spin 0.9s linear infinite;
}

.wd-task-checklist-progress {
    flex: 1 1 6rem;
    height: 0.25rem;
    min-width: 3rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--wd-muted-bg);
}

progress.wd-task-checklist-progress {
    border: 0;
    appearance: none;
}

progress.wd-task-checklist-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--wd-muted-bg);
}

progress.wd-task-checklist-progress::-webkit-progress-value {
    border-radius: inherit;
    background: var(--wd-primary);
    transition: width 180ms ease;
}

progress.wd-task-checklist-progress::-moz-progress-bar {
    border-radius: inherit;
    background: var(--wd-primary);
}

.wd-task-checklist-progress > div {
    height: 100%;
    border-radius: inherit;
    background: var(--wd-primary);
    transition: width 180ms ease;
}

.wd-task-checklist-count {
    color: var(--wd-primary);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 600;
    white-space: nowrap;
}

.wd-task-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.wd-task-checklist-item {
    display: grid;
    grid-template-columns: 1.5rem 1.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    border: 1px solid var(--wd-border);
    border-radius: 0.625rem;
    padding: 0.5rem 0.625rem;
    background: var(--wd-card-bg);
    transition: border-color 120ms ease, background-color 120ms ease;
}

.wd-task-checklist-item:hover {
    border-color: color-mix(in srgb, var(--wd-primary) 30%, var(--wd-border));
}

.wd-task-checklist-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    background: var(--wd-muted-bg);
    color: var(--wd-muted-fg);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 600;
}

.wd-task-checklist-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--wd-border);
    border-radius: 0.375rem;
    color: var(--wd-primary-fg);
    transition: border-color 120ms ease, background-color 120ms ease;
}

.wd-task-checklist-toggle:hover {
    border-color: var(--wd-primary);
}

.wd-task-checklist-toggle--checked {
    border-color: var(--wd-primary);
    background: var(--wd-primary);
}

.wd-task-checklist-toggle i {
    font-size: 0.75rem;
}

.wd-task-checklist-item-input,
.wd-task-checklist-title-input,
.wd-task-checklist-add-item-input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--wd-fg);
    font: inherit;
    letter-spacing: 0;
}

.wd-task-checklist-item-input,
.wd-task-checklist-add-item-input {
    width: 100%;
}

.wd-task-checklist-title-input {
    flex: 0 1 auto;
    min-width: min(10rem, 100%);
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
}

.wd-task-checklist-item-input:focus,
.wd-task-checklist-title-input:focus,
.wd-task-checklist-add-item-input:focus {
    outline: none;
    box-shadow: none;
}

.wd-task-checklist-item-input--completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.wd-task-checklist-add-item-input {
    border-bottom: 1px dashed var(--wd-border);
    padding: 0.5rem 0.25rem;
    color: var(--wd-muted-fg);
}

.wd-task-checklist-add-item-input:focus {
    border-bottom-color: var(--wd-primary);
    color: var(--wd-fg);
}

.wd-task-checklist-item-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: opacity 120ms ease;
}

.wd-task-checklist-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    color: var(--wd-muted-fg);
    transition: color 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.wd-task-checklist-icon-button:hover {
    background: color-mix(in srgb, var(--wd-muted-bg) 60%, transparent);
    color: var(--wd-fg);
}

.wd-task-checklist-icon-button--danger:hover {
    color: var(--sx-colorStatusDanger, #dc2626);
}

.wd-task-attachment-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.wd-task-attachment-hint {
    align-items: center;
    gap: 0.375rem;
    color: var(--wd-muted-fg);
    font-size: var(--sx-font-size-xs, 0.75rem);
    font-weight: 500;
    opacity: 0.65;
}

.wd-task-attachments-content {
    min-width: 0;
}

.wd-task-attachment-file-name,
.wd-task-attachment-file-size {
    font: inherit;
}

.wd-task-attachment-empty-icon {
    margin-bottom: 0.5rem;
    font-size: var(--sx-font-size-xl, 1.5rem);
    line-height: 1;
}

.wd-task-attachment-empty-text {
    font-size: var(--sx-font-size-sm, 0.875rem);
    font-weight: var(--sx-fontWeightRegular, 400);
    line-height: 1.6;
}

.wd-task-attachment-file-name {
    color: var(--wd-fg);
    font-weight: 500;
}

.wd-task-attachment-file-size {
    color: var(--wd-muted-fg);
}

.wd-task-content-layout {
    --wd-task-activity-sidebar-width: 20rem;
    align-items: stretch;
}

.wd-task-main-pane {
    container-type: inline-size;
    order: 3;
}

.wd-task-main-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: var(--sx-spacing-xxs, 0.25rem) 0 var(--sx-spacing-l, 1.5rem);
    scroll-padding-top: var(--sx-spacing-xxs, 0.25rem);
}

.wd-task-detail-shell,
.wd-task-detail-grid,
.wd-task-detail-column {
    min-width: 0;
}

.wd-task-detail-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--sx-spacing-m, 1rem);
    min-height: 0;
    overflow: hidden;
}

.wd-task-detail-tabbar {
    flex: 0 0 auto;
    padding: 0 var(--sx-spacing-xxs, 0.25rem);
}

.wd-task-detail-grid {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--sx-spacing-m, 1rem);
    min-height: 0;
    overflow: hidden;
}

.wd-task-detail-column {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--sx-spacing-m, 1rem);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: var(--sx-spacing-l, 1.5rem);
    scrollbar-gutter: stable;
}

.wd-task-detail-divider {
    display: none;
}

.wd-task-detail-splitter {
    --sx-splitter-hit-size: var(--sx-spacing-m, 1rem);
    --sx-splitter-line-size: var(--sx-border-width-thin, 1px);
    --sx-splitter-handle-size: 0.25rem;
    --sx-splitter-handle-length: 2rem;
    --sx-splitter-visual-opacity: 0;
    position: relative;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: col-resize;
    background: transparent;
    touch-action: none;
    outline: none;
}

.wd-task-detail-splitter::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--sx-splitter-line-size);
    content: "";
    transform: translateX(-0.5px);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--sx-colorNeutralStroke2, var(--wd-border)) 15%,
        var(--sx-colorNeutralStroke2, var(--wd-border)) 85%,
        transparent 100%
    );
    opacity: var(--sx-splitter-visual-opacity);
    transition:
        background var(--sx-durationFast, 150ms) ease,
        opacity var(--sx-durationFast, 150ms) ease;
    pointer-events: none;
}

.wd-task-detail-splitter .sx-splitter-handle {
    z-index: 1;
    width: var(--sx-splitter-handle-size);
    height: var(--sx-splitter-handle-length);
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
    background: var(--sx-colorNeutralStroke2, var(--wd-border));
    opacity: var(--sx-splitter-visual-opacity);
    transition:
        background var(--sx-durationFast, 150ms) ease,
        box-shadow var(--sx-durationFast, 150ms) ease,
        opacity var(--sx-durationFast, 150ms) ease;
    pointer-events: none;
}

.wd-task-detail-splitter:hover::before,
.wd-task-detail-splitter:active::before,
body.is-resizing .wd-task-detail-splitter::before {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--sx-colorBrandBackground1, var(--wd-primary)) 15%,
        var(--sx-colorBrandBackground1, var(--wd-primary)) 85%,
        transparent 100%
    );
    opacity: 1;
}

.wd-task-detail-splitter:hover .sx-splitter-handle,
.wd-task-detail-splitter:active .sx-splitter-handle,
body.is-resizing .wd-task-detail-splitter .sx-splitter-handle {
    background: var(--sx-colorBrandBackground1, var(--wd-primary));
    opacity: 1;
    box-shadow: 0 0 0.5rem color-mix(in srgb, var(--sx-colorBrandBackground1, var(--wd-primary)) 55%, transparent);
}

.wd-task-detail-item {
    min-width: 0;
}

.wd-task-detail-item > .wd-task-card {
    width: 100%;
}

.wd-task-detail-shell--task .wd-task-detail-column--execution,
.wd-task-detail-shell--execution .wd-task-detail-column--task {
    display: none;
}

.wd-task-sidebar-splitter {
    order: 2;
}

.wd-task-sidebar-splitter,
.wd-kanban-lane-splitter {
    --sx-splitter-hit-size: var(--sx-spacing-m, 1rem);
    --sx-splitter-line-size: var(--sx-border-width-thin, 1px);
    --sx-splitter-handle-size: 0.25rem;
    --sx-splitter-handle-length: 2rem;
    --sx-splitter-visual-opacity: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    flex: 0 0 var(--sx-splitter-hit-size);
    width: var(--sx-splitter-hit-size);
    height: 100%;
    min-height: 0;
    margin: 0;
    cursor: col-resize;
    background: transparent;
    touch-action: none;
    outline: none;
}

.wd-kanban-lane-splitter {
    --sx-splitter-hit-size: var(--sx-spacing-sm, 0.5rem);
    height: auto;
}

.wd-task-sidebar-splitter::before,
.wd-kanban-lane-splitter::before {
    position: absolute;
    top: 0;
    bottom: 0;
    content: "";
    left: 50%;
    width: var(--sx-splitter-line-size);
    transform: translateX(-0.5px);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--sx-colorNeutralStroke2, var(--wd-border)) 15%,
        var(--sx-colorNeutralStroke2, var(--wd-border)) 85%,
        transparent 100%
    );
    opacity: var(--sx-splitter-visual-opacity);
    transition:
        background var(--sx-durationFast, 150ms) ease,
        opacity var(--sx-durationFast, 150ms) ease;
    pointer-events: none;
}

.wd-task-sidebar-splitter:hover::before,
.wd-task-sidebar-splitter:active::before,
.wd-kanban-lane-splitter:hover::before,
.wd-kanban-lane-splitter:active::before,
body.is-resizing .wd-task-sidebar-splitter::before,
body.wd-kanban-column-resizing .wd-kanban-lane-splitter::before {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--sx-colorBrandBackground1, var(--wd-primary)) 15%,
        var(--sx-colorBrandBackground1, var(--wd-primary)) 85%,
        transparent 100%
    );
    opacity: 1;
}

.wd-task-sidebar-splitter .sx-splitter-handle,
.wd-kanban-lane-splitter .sx-splitter-handle {
    z-index: 1;
    width: var(--sx-splitter-handle-size);
    height: var(--sx-splitter-handle-length);
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
    background: var(--sx-colorNeutralStroke2, var(--wd-border));
    opacity: var(--sx-splitter-visual-opacity);
    transition:
        box-shadow var(--sx-durationFast, 150ms) ease,
        opacity var(--sx-durationFast, 150ms) ease;
    pointer-events: none;
}

.wd-task-sidebar-splitter:hover .sx-splitter-handle,
.wd-task-sidebar-splitter:active .sx-splitter-handle,
.wd-kanban-lane-splitter:hover .sx-splitter-handle,
.wd-kanban-lane-splitter:active .sx-splitter-handle,
body.is-resizing .wd-task-sidebar-splitter .sx-splitter-handle,
body.wd-kanban-column-resizing .wd-kanban-lane-splitter .sx-splitter-handle {
    background: var(--sx-colorBrandBackground1, var(--wd-primary));
    opacity: 1;
    box-shadow: 0 0 0.5rem color-mix(in srgb, var(--sx-colorBrandBackground1, var(--wd-primary)) 55%, transparent);
}

.wd-task-route-page .sx-card.wd-task-sidebar-card {
    order: 1;
    position: relative;
    isolation: isolate;
    min-height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    background-color: var(--sx-colorNeutralBackground2);
    border: var(--sx-border-width-thin, 1px) solid transparent;
}

.wd-task-route-page .sx-card.wd-task-sidebar-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    box-sizing: border-box;
    border: var(--sx-border-width-thin, 1px) solid var(--sx-colorNeutralStroke1);
    border-radius: inherit;
    pointer-events: none;
}

.wd-task-route-page .sx-card.wd-task-sidebar-card > .sx-card-body {
    display: flex;
    flex-direction: row;
    height: 100%;
    min-width: 0;
    min-height: 0;
    background: transparent;
}

.wd-task-route-page .sx-card.wd-task-sidebar-card .wd-activity-panel {
    background: transparent;
    --wd-activity-inline-padding: var(--sx-spacing-md, 1rem);
}

.wd-task-sidebar-card--expanded {
    flex: 0 0 var(--wd-task-activity-sidebar-width);
    width: var(--wd-task-activity-sidebar-width);
    min-width: var(--wd-task-activity-sidebar-width);
    max-width: var(--wd-task-activity-sidebar-width);
}

.wd-task-sidebar-card--collapsed {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
}

.wd-task-sidebar-rail {
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
    height: 100%;
    flex: 0 0 auto;
    margin-right: 0;
    padding: 0;
}

.wd-task-sidebar-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 150px;
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 720px) {
    .wd-task-card-header,
    .wd-task-maestro-header,
    .wd-task-description-header {
        align-items: stretch;
        flex-direction: column;
    }

    .wd-task-card-header-controls,
    .wd-task-maestro-toolbar,
    .wd-task-description-actions {
        justify-content: space-between;
        width: 100%;
    }

    .wd-task-inline-label {
        display: none;
    }

    .wd-task-field-wrap {
        grid-template-columns: 1fr;
    }

    .wd-task-field,
    .wd-task-field--wide,
    .wd-task-field--switch {
        max-width: 100%;
    }
}

@container (min-width: 42rem) {
    .wd-task-detail-tabbar {
        display: none;
    }

    .wd-task-detail-grid {
        display: grid;
        grid-template-columns:
            minmax(0, var(--wd-task-detail-task-column-width, 1fr))
            var(--sx-spacing-m, 1rem)
            minmax(0, var(--wd-task-detail-execution-column-width, 1fr));
        align-items: stretch;
        column-gap: 0;
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        row-gap: 0;
    }

    .wd-task-detail-column {
        height: 100%;
    }

    .wd-task-detail-column .wd-task-card > .sx-card-header {
        position: sticky;
        top: 0;
        z-index: 3;
        background: var(--wd-card-bg);
    }

    .wd-task-detail-column--task {
        grid-column: 1;
    }

    .wd-task-detail-column--execution {
        grid-column: 3;
    }

    .wd-task-detail-divider {
        display: flex;
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: stretch;
        width: var(--sx-spacing-m, 1rem);
        min-height: 100%;
    }

    .wd-task-detail-shell--task .wd-task-detail-column--execution,
    .wd-task-detail-shell--execution .wd-task-detail-column--task {
        display: flex;
    }
}

@keyframes wd-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes wd-human-intervention-pulse {
    0% {
        box-shadow:
            0 0 0 0 color-mix(in srgb, var(--wd-task-human-alert-bg, #f59e0b) 35%, transparent),
            0 0 0 1px color-mix(in srgb, var(--wd-task-human-alert-bg, #f59e0b) 12%, transparent);
        transform: translateY(0);
    }

    45% {
        box-shadow:
            0 0 0 6px color-mix(in srgb, var(--wd-task-human-alert-bg, #f59e0b) 0%, transparent),
            0 8px 24px color-mix(in srgb, var(--wd-task-human-alert-bg, #f59e0b) 18%, transparent);
        transform: translateY(-1px);
    }

    100% {
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--wd-task-human-alert-bg, #f59e0b) 12%, transparent);
        transform: translateY(0);
    }
}

.wd-maestro-list-page,
.wd-maestro-edit-page {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-md, 1rem);
    min-width: 0;
    padding: var(--sx-spacing-md, 1rem);
}

.wd-maestro-overview-attention {
    border-bottom: 1px solid var(--wd-border);
    display: grid;
    gap: var(--sx-spacing-md, 1rem);
    padding: var(--sx-spacing-lg, 1.5rem);
}

.wd-maestro-overview-attention__header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-sm, 0.75rem);
    justify-content: space-between;
}

.wd-maestro-overview-attention__header h2 {
    color: var(--wd-fg);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.wd-maestro-overview-attention__header p,
.wd-maestro-overview-attention__card p {
    color: var(--wd-fg-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin: 0;
}

.wd-maestro-overview-attention__header p {
    margin-top: 0.25rem;
}

.wd-maestro-overview-attention__ok {
    border: 1px solid color-mix(in srgb, var(--sx-colorStatusSuccess, #047857) 38%, var(--wd-border));
    border-radius: 999px;
    color: var(--sx-colorStatusSuccess, #047857);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1875rem 0.625rem;
}

.wd-maestro-overview-attention__grid {
    display: grid;
    gap: var(--sx-spacing-sm, 0.75rem);
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.wd-maestro-overview-attention__card {
    --wd-maestro-attention-fg: var(--wd-muted-fg);
    --wd-maestro-attention-bg: var(--wd-muted-bg);
    border: 1px solid color-mix(in srgb, var(--wd-maestro-attention-fg) 20%, var(--wd-border));
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    color: inherit;
    display: grid;
    gap: var(--sx-spacing-xs, 0.5rem);
    min-width: 0;
    padding: var(--sx-spacing-sm, 0.75rem);
    text-decoration: none;
}

.wd-maestro-overview-attention__card:hover,
.wd-maestro-overview-attention__card:focus-visible {
    border-color: color-mix(in srgb, var(--wd-maestro-attention-fg) 48%, var(--wd-border));
    box-shadow: 0 0 0 0.125rem color-mix(in srgb, var(--wd-maestro-attention-bg) 18%, transparent);
}

.wd-maestro-overview-attention__card--warning {
    --wd-maestro-attention-fg: var(--sx-colorStatusWarning, var(--sx-colorPaletteYellowForeground1, #b45309));
    --wd-maestro-attention-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
}

.wd-maestro-overview-attention__card--danger {
    --wd-maestro-attention-fg: var(--sx-colorStatusDanger, var(--sx-colorPaletteRedForeground1, #dc2626));
    --wd-maestro-attention-bg: var(--sx-colorStatusDangerBackground1, #dc2626);
}

.wd-maestro-overview-attention__card--ok {
    --wd-maestro-attention-fg: var(--sx-colorStatusSuccess, var(--sx-colorPaletteGreenForeground1, #047857));
    --wd-maestro-attention-bg: var(--sx-colorStatusSuccessBackground1, #10b981);
}

.wd-maestro-overview-attention__card-head {
    align-items: center;
    color: var(--wd-fg);
    display: flex;
    gap: var(--sx-spacing-xs, 0.5rem);
    font-size: 0.8125rem;
    font-weight: 700;
    min-width: 0;
}

.wd-maestro-overview-attention__icon {
    align-items: center;
    background: color-mix(in srgb, var(--wd-maestro-attention-bg) 12%, transparent);
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
    color: var(--wd-maestro-attention-fg);
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.wd-maestro-overview-attention__count {
    color: var(--wd-maestro-attention-fg);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.wd-maestro-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.wd-maestro-row-name {
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.wd-maestro-row-name:hover,
.wd-maestro-row-name:focus-visible {
    color: var(--wd-primary);
    text-decoration: underline;
}

.wd-maestro-row-name--multiline {
    max-width: min(44rem, 62vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-maestro-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sx-spacing-xxs, 0.25rem);
    white-space: nowrap;
}

.wd-run-host-status-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    padding: var(--sx-spacing-sm, 0.75rem);
    background: color-mix(in srgb, var(--wd-muted-bg) 42%, transparent);
}

.wd-run-host-status {
    --wd-run-host-status-fg: var(--wd-muted-fg);
    --wd-run-host-status-bg: var(--wd-muted-bg);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 1.75rem;
    border: 1px solid color-mix(in srgb, var(--wd-run-host-status-fg) 45%, var(--wd-border));
    border-radius: 999px;
    padding: 0.1875rem 0.625rem;
    background: color-mix(in srgb, var(--wd-run-host-status-bg) 18%, transparent);
    color: var(--wd-run-host-status-fg);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.wd-run-host-status > i {
    font-size: 1rem;
    line-height: 1;
}

.wd-run-host-status--online {
    --wd-run-host-status-fg: var(--sx-colorStatusSuccess, #047857);
    --wd-run-host-status-bg: var(--sx-colorStatusSuccessBackground1, #10b981);
}

.wd-run-host-status--offline {
    --wd-run-host-status-fg: var(--sx-colorStatusDanger, #dc2626);
    --wd-run-host-status-bg: var(--sx-colorStatusDangerBackground1, #dc2626);
}

.wd-run-host-status--disabled {
    --wd-run-host-status-fg: var(--wd-muted-fg);
    --wd-run-host-status-bg: var(--wd-muted-bg);
}

.wd-run-host-status--unknown {
    --wd-run-host-status-fg: var(--sx-colorStatusWarning, #b45309);
    --wd-run-host-status-bg: var(--sx-colorStatusWarningBackground1, #f59e0b);
}

.wd-maestro-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--sx-spacing-xs, 0.5rem);
}

.wd-maestro-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--sx-spacing-xs, 0.5rem);
    min-width: 0;
    border: 1px solid var(--wd-border);
    border-radius: 0.5rem;
    padding: var(--sx-spacing-xs, 0.5rem);
}

.wd-maestro-checkbox span {
    display: grid;
    min-width: 0;
}

.wd-maestro-checkbox strong,
.wd-maestro-checkbox small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-maestro-checkbox small {
    color: var(--wd-fg-muted);
}

.wd-maestro-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-detail-field {
    min-width: 0;
}

.wd-maestro-detail-field--full {
    grid-column: 1 / -1;
}

.wd-maestro-detail-label {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
}

.wd-maestro-detail-value {
    min-width: 0;
    margin-top: 0.125rem;
    overflow-wrap: anywhere;
    font-size: 0.875rem;
}

.wd-maestro-kind-layout {
    display: flex;
    flex-direction: column;
    gap: var(--sx-spacing-md, 1rem);
    min-width: 0;
}

.wd-maestro-kind-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: var(--sx-spacing-xs, 0.5rem) var(--sx-spacing-sm, 0.75rem);
    min-width: 0;
}

.wd-maestro-kind-picker .sx-select-group {
    flex: 0 1 22rem;
}

.wd-maestro-kind-picker__meta {
    color: var(--wd-fg-muted);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xs, 0.5rem);
    font-size: 0.8125rem;
    padding-top: 1.45rem;
}

.wd-maestro-kind-panel {
    min-width: 0;
}

.wd-maestro-kind-section {
    min-width: 0;
}

.wd-maestro-kind-section__header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xs, 0.5rem);
    justify-content: space-between;
    margin-bottom: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-section h3 {
    color: var(--wd-fg);
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
}

.wd-maestro-kind-section > h3 {
    margin-bottom: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-flags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xxs, 0.25rem);
}

.wd-maestro-kind-flag {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
    background: transparent;
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 0.125rem 0.375rem;
}

.wd-maestro-kind-flag--button {
    cursor: pointer;
    font: inherit;
}

.wd-maestro-kind-flag--button:hover,
.wd-maestro-kind-flag--button:focus-visible {
    border-color: var(--wd-primary);
    color: var(--wd-primary);
}

.wd-maestro-detect-field {
    align-items: center;
    display: grid;
    gap: var(--sx-spacing-xs, 0.5rem);
    grid-template-columns: minmax(0, 1fr) auto;
}

.wd-maestro-kind-summary {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    background: var(--wd-surface-subtle, color-mix(in srgb, var(--wd-fg) 3%, transparent));
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-support-matrix {
    min-width: 0;
}

.wd-maestro-support-matrix--compact {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    margin-top: var(--sx-spacing-sm, 0.75rem);
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-support-matrix__summary {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xxs, 0.25rem);
    margin-top: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-support-matrix__summary span,
.wd-maestro-support-badge {
    align-items: center;
    border: 1px solid var(--wd-border);
    border-radius: 999px;
    display: inline-flex;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    color: var(--wd-fg-muted);
}

.wd-maestro-support-matrix__section {
    margin-top: var(--sx-spacing-md, 1rem);
}

.wd-maestro-support-matrix__capabilities {
    display: grid;
    gap: var(--sx-spacing-xs, 0.5rem);
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    margin-top: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-support-matrix__capability {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    min-width: 0;
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-support-matrix__capability-head {
    align-items: center;
    display: flex;
    gap: var(--sx-spacing-xxs, 0.25rem);
    min-width: 0;
}

.wd-maestro-support-matrix__capability-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-maestro-support-matrix__capability small,
.wd-maestro-support-matrix__notes {
    color: var(--wd-fg-muted);
    display: block;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: var(--sx-spacing-xs, 0.5rem);
}

.wd-maestro-support-badge--enforced,
.wd-maestro-support-badge--runnernative {
    border-color: color-mix(in srgb, #16a34a 34%, var(--wd-border));
    color: #047857;
}

.wd-maestro-support-badge--advisory {
    border-color: color-mix(in srgb, #d97706 38%, var(--wd-border));
    color: #92400e;
}

.wd-maestro-support-badge--unsupported {
    color: var(--wd-fg-muted);
}

.wd-maestro-memory-readiness {
    align-items: flex-start;
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-sm, 0.75rem);
    justify-content: space-between;
    margin-bottom: var(--sx-spacing-md, 1rem);
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-memory-readiness p {
    color: var(--wd-fg-muted);
    font-size: 0.8125rem;
    margin: 0.25rem 0 0;
}

.wd-maestro-memory-source-grid {
    display: grid;
    gap: var(--sx-spacing-xs, 0.5rem);
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    width: min(100%, 34rem);
}

.wd-maestro-memory-source-grid div {
    display: grid;
    gap: 0.125rem;
}

.wd-maestro-memory-source-grid span {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
}

.wd-maestro-memory-injection {
    border: 1px solid var(--wd-border);
    border-radius: 999px;
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    width: fit-content;
}

.wd-maestro-memory-injection--eligible {
    border-color: color-mix(in srgb, #16a34a 34%, var(--wd-border));
    color: #047857;
}

.wd-maestro-memory-injection--disabled {
    color: var(--wd-fg-muted);
}

.wd-maestro-kind-check {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-check--healthy {
    border-color: color-mix(in srgb, #16a34a 45%, var(--wd-border));
}

.wd-maestro-kind-check--warning,
.wd-maestro-kind-check--unknown {
    border-color: color-mix(in srgb, #d97706 45%, var(--wd-border));
}

.wd-maestro-kind-check--failed {
    border-color: color-mix(in srgb, #dc2626 45%, var(--wd-border));
}

.wd-maestro-kind-check--skipped {
    border-color: color-mix(in srgb, var(--wd-fg-muted) 35%, var(--wd-border));
}

.wd-maestro-kind-diagnostics,
.wd-maestro-kind-capability-list,
.wd-maestro-kind-log {
    display: grid;
    gap: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-diagnostic-item,
.wd-maestro-kind-capability,
.wd-maestro-kind-log-entry,
.wd-maestro-kind-recommendation,
.wd-maestro-kind-live-log {
    border: 1px solid var(--wd-border);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    min-width: 0;
    padding: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-recommendation {
    background: var(--wd-surface-subtle, color-mix(in srgb, var(--wd-fg) 3%, transparent));
}

.wd-maestro-kind-recommendation__header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xs, 0.5rem);
    justify-content: space-between;
}

.wd-maestro-kind-recommendation__diff {
    border-top: 1px solid var(--wd-border);
    color: var(--wd-fg-muted);
    display: grid;
    font-size: 0.8125rem;
    gap: var(--sx-spacing-xxs, 0.25rem);
    margin-top: var(--sx-spacing-sm, 0.75rem);
    padding-top: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-recommendation__diff div {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xxs, 0.25rem);
}

.wd-maestro-kind-live-log {
    align-items: center;
    color: var(--wd-fg-muted);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sx-spacing-xs, 0.5rem);
    margin-bottom: var(--sx-spacing-sm, 0.75rem);
}

.wd-maestro-kind-terminal-wrap {
    margin-bottom: var(--sx-spacing-sm, 0.75rem);
    min-width: 0;
}

.wd-maestro-kind-terminal-title {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--sx-spacing-xxs, 0.25rem);
}

.wd-maestro-kind-terminal {
    background: #0b1020;
    border: 1px solid color-mix(in srgb, #94a3b8 24%, transparent);
    border-radius: var(--sx-borderRadiusMedium, 0.5rem);
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    line-height: 1.45;
    max-height: 18rem;
    min-height: 12rem;
    overflow: auto;
    padding: var(--sx-spacing-sm, 0.75rem);
    scrollbar-width: thin;
    white-space: pre-wrap;
}

.wd-maestro-kind-terminal-line {
    display: grid;
    gap: 0.125rem 0.5rem;
    grid-template-columns: auto auto minmax(0, 1fr);
    padding: 0.125rem 0;
}

.wd-maestro-kind-terminal-time {
    color: #64748b;
    white-space: nowrap;
}

.wd-maestro-kind-terminal-level {
    color: #93c5fd;
    font-weight: 700;
    white-space: nowrap;
}

.wd-maestro-kind-terminal-line--success .wd-maestro-kind-terminal-level {
    color: #86efac;
}

.wd-maestro-kind-terminal-line--warn .wd-maestro-kind-terminal-level {
    color: #facc15;
}

.wd-maestro-kind-terminal-line--error .wd-maestro-kind-terminal-level {
    color: #fca5a5;
}

.wd-maestro-kind-terminal-message {
    color: #e2e8f0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.wd-maestro-kind-terminal pre {
    color: #bfdbfe;
    grid-column: 3;
    margin: 0.125rem 0 0;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wd-maestro-kind-log {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.wd-maestro-kind-log-entry {
    border-left: 3px solid var(--wd-border);
}

.wd-maestro-kind-status {
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.wd-maestro-kind-status--healthy {
    background: color-mix(in srgb, #16a34a 14%, transparent);
    color: #15803d;
}

.wd-maestro-kind-status--warning,
.wd-maestro-kind-status--unknown {
    background: color-mix(in srgb, #d97706 14%, transparent);
    color: #b45309;
}

.wd-maestro-kind-status--failed {
    background: color-mix(in srgb, #dc2626 14%, transparent);
    color: #b91c1c;
}

.wd-maestro-kind-status--skipped {
    background: color-mix(in srgb, var(--wd-fg-muted) 12%, transparent);
    color: var(--wd-fg-muted);
}

.wd-maestro-kind-pre {
    background: var(--wd-code-bg, color-mix(in srgb, var(--wd-fg) 6%, transparent));
    border-radius: var(--sx-borderRadiusSmall, 0.25rem);
    font-size: 0.75rem;
    margin-top: var(--sx-spacing-sm, 0.75rem);
    max-height: 8rem;
    overflow: auto;
    padding: var(--sx-spacing-xs, 0.5rem);
    white-space: pre-wrap;
}

.wd-maestro-kind-pre-label {
    color: var(--wd-fg-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: var(--sx-spacing-sm, 0.75rem);
}

@media (max-width: 760px) {
    .wd-maestro-kind-picker .sx-select-group {
        flex-basis: 100%;
        --sx-select-width: 100% !important;
    }

    .wd-maestro-kind-picker__meta {
        padding-top: 0;
    }
}

/* Sidebar content and footer */
.wd-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wd-sidebar-content > .sx-nav-menu {
    flex: 1;
    overflow-y: auto;
}

.wd-nextui-shell .sx-navbar-home {
    display: none !important;
}

.wd-sidebar-footer {
    padding: var(--sx-spacing-sm);
    border-top: 1px solid var(--wd-border);
    margin-top: auto;
}

.wd-sidebar-actions {
    justify-content: center;
}

.sx-shell-splitter {
    cursor: col-resize;
}

/* Fix NextUI nav menu group collapse bug: scoped CSS overrides hidden attribute */
/* The component sets display:flex unconditionally, ignoring the hidden attribute */
.sx-nav-menu-group-items[hidden] {
    display: none !important;
}

/* NextUI mini pomodoro styles */
.wd-mini-pomodoro {
    position: relative;
}

.wd-mini-pomodoro-trigger {
    border-radius: 999px;
}

.wd-mini-pomodoro-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.wd-mini-pomodoro-type {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-muted-fg);
}

.wd-mini-pomodoro-panel {
    width: 16rem;
    padding: 0.75rem;
}

.wd-mini-pomodoro-header {
    justify-content: space-between;
    border-bottom: 1px solid var(--wd-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.wd-mini-pomodoro-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-muted-fg);
}

.wd-mini-pomodoro-type-active {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-primary);
    font-weight: 700;
}

.wd-mini-pomodoro-action {
    width: 100%;
    justify-content: flex-start;
}

.wd-mini-pomodoro-action-active {
    background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
    color: var(--wd-primary);
}

.wd-mini-pomodoro-action-success {
    color: #16a34a;
}

.wd-mini-pomodoro-action-danger {
    color: #dc2626;
}

.wd-mini-pomodoro-settings {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-start;
    color: var(--wd-muted-fg);
}

/* NextUI desk card styles */
.wd-desk-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--wd-muted-bg);
    border-bottom: 1px solid var(--wd-border);
}

.wd-desk-card-title {
    color: var(--sx-group-title-color, var(--wd-fg));
    font-size: var(--sx-group-title-font-size, 0.875rem);
    line-height: var(--sx-group-title-line-height, 1.4);
    font-weight: var(--sx-group-title-font-weight, 800);
}

.wd-desk-card-actions {
    align-items: center;
}

.wd-desk-card-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--wd-border);
    background: color-mix(in srgb, var(--wd-muted-bg) 35%, transparent);
}

/* Standard Blazor Navigation Styles */
.wd-nav {
    padding: 0.5rem;
}

.wd-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    color: var(--wd-fg);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.wd-nav-item:hover {
    background: var(--wd-muted-bg);
    color: var(--wd-fg);
    text-decoration: none;
}

.wd-nav-item.active {
    background: color-mix(in srgb, var(--wd-primary) 15%, transparent);
    color: var(--wd-primary);
    font-weight: 600;
}

.wd-nav-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.wd-nav-item.active i {
    opacity: 1;
}

.wd-nav-group {
    margin-top: 0.25rem;
}

.wd-nav-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border: none;
    background: none;
    color: var(--wd-fg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wd-nav-group-header:hover {
    background: var(--wd-muted-bg);
}

.wd-nav-group-header i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.wd-nav-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.5;
}

.wd-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-nav-submenu .wd-nav-item {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

/* Static group header for non-interactive Razor Pages context */
.wd-nav-group-static {
    cursor: default;
}

.wd-nav-group-static:hover {
    background: transparent;
}

/* Collapsed submenu - hidden by default in Razor Pages context */
.wd-nav-submenu-collapsed {
    display: none;
}

/* ==================== */
/* UserBar Component    */
/* ==================== */
.wd-sidebar-userbar {
    margin-top: auto;
    border-top: 1px solid var(--wd-border);
    flex-shrink: 0;
}

.wd-user-bar {
    position: relative;
    padding: 0.5rem;
}

.wd-user-bar-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.wd-user-bar-trigger:hover {
    background: var(--wd-muted-bg);
}

.wd-user-bar-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.wd-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wd-primary) 0%, color-mix(in srgb, var(--wd-primary) 70%, #000) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wd-primary-fg);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.wd-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg);
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-user-chevron {
    font-size: 0.625rem;
    color: var(--wd-muted-fg);
}

.wd-user-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0.5rem;
    right: 0.5rem;
    background: var(--wd-card-bg);
    border: 1px solid var(--wd-border);
    border-radius: 0.75rem;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 100;
}

.wd-user-menu-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--wd-border);
    margin-bottom: 0.25rem;
}

.wd-user-menu-title {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wd-muted-fg);
    font-weight: 700;
    font-size: 0.625rem;
}

.wd-user-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--wd-fg);
    text-decoration: none;
    transition: all 0.15s ease;
}

.wd-user-menu-item:hover {
    background: var(--wd-muted-bg);
    text-decoration: none;
    color: var(--wd-fg);
}

.wd-user-menu-item i {
    width: 1rem;
    text-align: center;
    opacity: 0.7;
}

.wd-user-menu-item span {
    flex: 1;
    text-align: left;
}

.wd-user-menu-divider {
    height: 1px;
    background: var(--wd-border);
    margin: 0.375rem 0;
}

.wd-user-menu-item-danger {
    color: #dc2626;
}

.wd-user-menu-item-danger:hover {
    background: color-mix(in srgb, #dc2626 10%, transparent);
    color: #dc2626;
}

.wd-highlight-pulse {
    animation: wd-highlight-pulse 0.6s ease-out 3;
    box-shadow: 0 0 0 3px var(--wd-primary) !important;
    border-radius: 0.75rem;
}

@keyframes wd-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    100% { box-shadow: 0 0 0 6px transparent; }
}
