/* Floweave */

.floweave-main {
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: #f5f7f9;
}

.floweave-shell {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.floweave-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.floweave-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.floweave-search {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.floweave-search input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.floweave-content {
  flex: 1 1 auto;
  min-height: 0;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.floweave-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.floweave-panel-heading h3 {
  margin: 0;
  font-size: 14px;
}

.floweave-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.floweave-index {
  display: grid;
  gap: 14px;
}

.floweave-definition-grid,
.floweave-run-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.floweave-definition-card,
.floweave-run-card {
  display: grid;
  gap: 8px;
  align-content: start;
  width: 100%;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.floweave-run-card {
  min-height: 96px;
}

.floweave-definition-card:hover,
.floweave-run-card:hover {
  border-color: #99d6c8;
  box-shadow: var(--shadow);
}

.floweave-definition-card strong,
.floweave-run-card strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.floweave-definition-card span,
.floweave-run-card span,
.floweave-task-row span {
  color: var(--muted);
  font-size: 12px;
}

.floweave-definition-card small,
.floweave-run-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.floweave-run-detail {
  display: grid;
  gap: 24px;
}

.floweave-run-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.floweave-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.floweave-detail-actions .primary-button,
.floweave-detail-actions .secondary-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1;
}

.floweave-run-detail .text-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.floweave-run-detail .text-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.floweave-run-detail h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.floweave-run-detail h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.floweave-run-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.floweave-context-policy,
.floweave-run-detail > section {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.floweave-context-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 13px;
}

.floweave-context-grid span {
  color: var(--muted);
}

.floweave-settings-form {
  display: grid;
  gap: 16px;
}

.floweave-settings-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.floweave-settings-single,
.floweave-task-model-form label {
  display: grid;
  gap: 8px;
}

.floweave-settings-single > span,
.floweave-task-model-form label > span {
  color: var(--muted);
  font-weight: 700;
}

.floweave-settings-single input,
.floweave-settings-single select,
.floweave-task-model-form select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.floweave-settings-fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.floweave-settings-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 800;
}

.floweave-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.floweave-checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.floweave-workspace-dropdown {
  position: relative;
}

.floweave-workspace-dropdown summary {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.floweave-workspace-dropdown summary::-webkit-details-marker {
  display: none;
}

.floweave-workspace-dropdown summary::after {
  content: "v";
  float: right;
  color: var(--muted);
  font-weight: 800;
}

.floweave-workspace-dropdown[open] summary::after {
  content: "^";
}

.floweave-workspace-options {
  display: grid;
  gap: 8px;
  max-height: 220px;
  margin-top: 8px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.floweave-task-model-form {
  display: grid;
  gap: 16px;
}

.floweave-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.floweave-task-list {
  display: grid;
  gap: 8px;
}

.floweave-definition-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.floweave-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

button.floweave-task-row {
  cursor: pointer;
}

button.floweave-task-row:hover,
button.floweave-task-row.active {
  border-color: #99d6c8;
  background: #f1fbf8;
}

.floweave-task-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.floweave-task-row strong {
  overflow-wrap: anywhere;
}

.floweave-task-row-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.floweave-settings-button,
.floweave-task-settings-button {
  font-weight: 800;
  letter-spacing: 1px;
}

.floweave-task-settings-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
}

.floweave-task-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.floweave-task-detail-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.floweave-task-detail {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.floweave-task-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.floweave-task-detail h3 {
  margin: 0;
}

.floweave-output-section {
  display: grid;
  gap: 8px;
}

.floweave-output-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.floweave-output-message {
  width: 100%;
  max-width: 100%;
}

.floweave-output-message .chat-message-content {
  overflow-wrap: anywhere;
}

.floweave-output-message .chat-message-content pre,
.floweave-output-message .chat-message-content .markdown-table-wrap {
  max-width: 100%;
}

.floweave-structured-output {
  display: grid;
  gap: 12px;
}

.floweave-structured-object,
.floweave-structured-items {
  display: grid;
  gap: 10px;
}

.floweave-structured-group,
.floweave-structured-field,
.floweave-structured-item {
  border: 1px solid #dfe4dd;
  border-radius: 11px;
  background: #f8faf7;
}

.floweave-structured-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}

.floweave-structured-group > summary::-webkit-details-marker {
  display: none;
}

.floweave-structured-group > summary::after {
  content: "+";
  color: #6f7b72;
  font-size: 16px;
  line-height: 1;
}

.floweave-structured-group[open] > summary::after {
  content: "−";
}

.floweave-structured-group > summary strong {
  flex: 1;
  font-size: 12px;
}

.floweave-structured-group > summary span {
  color: var(--muted);
  font-size: 10px;
}

.floweave-structured-group-body {
  padding: 0 12px 12px;
}

.floweave-structured-field {
  padding: 11px 12px;
}

.floweave-structured-field h4,
.floweave-structured-item h5 {
  margin: 0 0 7px;
  color: #425047;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.floweave-structured-help {
  margin: -2px 0 8px !important;
  color: var(--muted);
}

.floweave-structured-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.floweave-structured-list li {
  padding-left: 3px;
  font-size: 11px;
  line-height: 1.55;
}

.floweave-structured-item {
  padding: 11px 12px;
  background: #fff;
}

.floweave-structured-text > :first-child {
  margin-top: 0;
}

.floweave-structured-text > :last-child {
  margin-bottom: 0;
}

.floweave-structured-value-pill,
.floweave-structured-number {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf0e7;
  color: #52654f;
  font-size: 10px;
  font-weight: 750;
}

.floweave-raw-output {
  padding-top: 2px;
}

.floweave-raw-output > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.floweave-raw-output pre {
  max-height: 420px;
  overflow: auto;
}

.floweave-orchestrator-thread {
  gap: 14px;
}

.floweave-orchestrator-message {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.floweave-message-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.floweave-task-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.floweave-task-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.floweave-task-form form {
  display: grid;
  gap: 14px;
}

.floweave-human-fields {
  display: grid;
  gap: 16px;
}

.floweave-human-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.floweave-human-fields-decision {
  gap: 18px;
}

.floweave-form-field-wide {
  grid-column: 1 / -1;
}

.floweave-form-field {
  display: grid;
  gap: 6px;
}

.floweave-form-field > span,
.floweave-field-label > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.floweave-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.floweave-field-label b {
  color: #a74f32;
}

.floweave-field-label em {
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecefe9;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.floweave-form-field > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.floweave-form-field textarea,
.floweave-form-field select,
.floweave-form-field input[type="text"],
.floweave-form-field input[type="number"],
.floweave-form-field input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.floweave-form-field textarea {
  resize: vertical;
}

.floweave-choice-grid,
.floweave-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.floweave-choice-card,
.floweave-chip {
  position: relative;
  cursor: pointer;
}

.floweave-choice-card input,
.floweave-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.floweave-choice-card > span,
.floweave-chip > span {
  display: grid;
  gap: 3px;
  min-height: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.floweave-choice-card input:checked + span,
.floweave-chip input:checked + span {
  border-color: #71905f;
  background: #eef5e8;
  box-shadow: 0 0 0 2px rgba(113, 144, 95, .12);
}

.floweave-choice-card input:focus-visible + span,
.floweave-chip input:focus-visible + span {
  outline: 2px solid #71905f;
  outline-offset: 2px;
}

.floweave-choice-card strong {
  font-size: 13px;
}

.floweave-choice-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.floweave-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
}

.floweave-slider-row input {
  width: 100%;
  accent-color: #71905f;
}

.floweave-slider-row output {
  text-align: right;
  font-size: 13px;
  font-weight: 750;
}

.floweave-form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.floweave-form-errors {
  color: #984329;
  font-size: 12px;
}

.floweave-form-errors:empty {
  display: none;
}

.floweave-form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.floweave-draft-status {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.floweave-review-context summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.floweave-revision-section {
  display: grid;
  gap: 12px;
}

.floweave-revision-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 6px;
}

.floweave-revision-card {
  display: grid;
  flex: 0 0 180px;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.floweave-revision-card.active {
  border-color: #71905f;
  background: #eef5e8;
  box-shadow: 0 0 0 2px rgba(113, 144, 95, .12);
}

.floweave-revision-card strong {
  font-size: 12px;
}

.floweave-revision-card span,
.floweave-revision-card small {
  color: var(--muted);
  font-size: 10px;
}

.floweave-revision-card small {
  margin-top: 3px;
  line-height: 1.35;
}

.floweave-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.floweave-modal::backdrop {
  background: rgb(15 23 42 / 0.32);
}

.floweave-task-definition-modal {
  width: min(980px, calc(100vw - 32px));
}

.floweave-modal-shell {
  position: relative;
  display: grid;
  gap: 16px;
  max-height: min(760px, calc(100vh - 32px));
  padding: 22px;
  overflow: auto;
}

.floweave-modal-close {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-self: end;
  margin: -10px -10px -42px 0;
  background: var(--surface);
}

.floweave-modal-header {
  display: grid;
  gap: 4px;
  padding-right: 36px;
}

.floweave-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.floweave-modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.floweave-design-history {
  display: grid;
  gap: 18px;
}

.floweave-design-thread {
  display: grid;
  gap: 14px;
}

.floweave-design-message {
  max-width: none;
}

.floweave-design-message .chat-message-content {
  display: grid;
  gap: 10px;
}

.floweave-design-message header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.floweave-design-message header strong {
  font-size: 14px;
}

.floweave-design-message header span {
  color: var(--muted);
  font-size: 12px;
}

.floweave-empty {
  display: grid;
  gap: 8px;
  max-width: 520px;
  padding: 32px 0;
}

.floweave-empty h3 {
  margin: 0;
  font-size: 18px;
}

.floweave-empty p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .floweave-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .floweave-content {
    padding: 18px 16px 28px;
  }

  .floweave-run-detail > header,
  .floweave-detail-actions,
  .floweave-task-detail > header {
    align-items: stretch;
    flex-direction: column;
  }

  .floweave-detail-actions .primary-button,
  .floweave-detail-actions .secondary-button {
    width: 100%;
  }

  .floweave-task-detail-layout,
  .floweave-definition-task-row,
  .floweave-settings-row,
  .floweave-context-grid {
    grid-template-columns: 1fr;
  }

  .floweave-task-row,
  .floweave-task-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .floweave-task-settings-button {
    align-self: flex-end;
  }
}

/* ── Floweave operations workspace ── */

.floweave-main {
  background:
    radial-gradient(circle at 82% -12%, rgba(154, 194, 182, .16), transparent 30%),
    #f2f3ef;
}

.floweave-shell {
  min-height: 100%;
  color: #202722;
}

.floweave-toolbar {
  gap: 8px;
  height: 48px;
  margin-left: auto;
}

.floweave-kicker {
  display: block;
  color: #748078;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}


.floweave-search {
  width: min(300px, 28vw);
  height: 39px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #daddd7;
  border-radius: 11px;
  background: #fff;
  color: #7e8981;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.floweave-search:focus-within {
  border-color: #9eaaa0;
  box-shadow: 0 5px 18px rgba(24, 34, 27, .07);
}

.floweave-search .shell-icon {
  width: 16px;
  height: 16px;
}

.floweave-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263029;
  font-size: 11px;
}

.floweave-icon-action {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid #daddd7;
  border-radius: 11px;
  background: #fff;
  color: #68746b;
  cursor: pointer;
}

.floweave-icon-action:hover { background: #edf0eb; color: #273129; }
.floweave-icon-action .shell-icon { width: 17px; height: 17px; }

.floweave-create-button,
.floweave-run-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  background: #24332b;
  font-size: 11px;
}

.floweave-create-button:hover,
.floweave-run-button:hover { background: #31453a; }
.floweave-create-button .shell-icon,
.floweave-run-button .shell-icon { width: 15px; height: 15px; }

.floweave-view-nav {
  position: sticky;
  z-index: 12;
  top: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(22px, 3vw, 40px);
  border-bottom: 1px solid #dce0da;
  background: rgba(248, 249, 246, .94);
  backdrop-filter: blur(16px);
}

.floweave-view-nav nav {
  display: flex;
  align-items: stretch;
  gap: 18px;
  height: 48px;
}

.floweave-view-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 1px;
  border: 0;
  background: transparent;
  color: #6f7a72;
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}

.floweave-view-nav button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.floweave-view-nav button:hover { color: #243029; }
.floweave-view-nav button.active { color: #1e2c24; font-weight: 720; }
.floweave-view-nav button.active::after { background: #527e6c; }

.floweave-view-nav small {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e5e9e3;
  color: #667168;
  font-size: 8px;
  text-align: center;
}

.floweave-view-nav button.active small {
  background: #dcebdc;
  color: #315a46;
}

.floweave-content {
  width: min(1320px, 100%);
  padding: 30px clamp(20px, 3vw, 40px) 70px;
}

.floweave-main > .account-notice,
.floweave-shell > .account-notice {
  width: min(1240px, calc(100% - 48px));
  margin: 18px auto 0;
}

.floweave-index { gap: 24px; }

.floweave-overview-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: -3px;
}

.floweave-overview-heading h2 {
  margin: 3px 0 0;
  color: #1e2621;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 660;
  letter-spacing: -.04em;
}

.floweave-overview-heading > p {
  max-width: 430px;
  margin: 0;
  color: #747e76;
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.floweave-collection-heading { margin-bottom: 0; }

.floweave-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.floweave-stat {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 9px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #dfe3dd;
  border-radius: 14px;
  background: rgba(251, 252, 249, .86);
  box-shadow: inset 0 1px rgba(255,255,255,.8);
}

.floweave-stat-indicator {
  grid-row: 1 / 3;
  align-self: start;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #8c9890;
  box-shadow: 0 0 0 4px #edf0ec;
}

.floweave-stat.active .floweave-stat-indicator,
.floweave-stat.healthy .floweave-stat-indicator { background: #4f8a6a; box-shadow: 0 0 0 4px #e0eee4; }
.floweave-stat.running .floweave-stat-indicator { background: #527fac; box-shadow: 0 0 0 4px #e1eaf3; }
.floweave-stat.attention .floweave-stat-indicator { background: #c17938; box-shadow: 0 0 0 4px #f5e8d9; }

.floweave-stat > strong {
  color: #1c251f;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -.04em;
  line-height: 1;
}

.floweave-stat > span:not(.floweave-stat-indicator) {
  grid-column: 2;
  margin-top: 4px;
  color: #3b463e;
  font-size: 11px;
  font-weight: 680;
}

.floweave-stat small {
  grid-column: 1 / -1;
  margin-top: 13px;
  overflow: hidden;
  color: #7a847c;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floweave-panel-heading {
  margin: 10px 0 -10px;
}

.floweave-panel-heading > div { display: grid; gap: 2px; }
.floweave-panel-heading h3,
.floweave-section-heading h3 {
  margin: 0;
  color: #232c26;
  font-size: 15px;
  font-weight: 670;
  letter-spacing: -.02em;
}

.floweave-count {
  color: #7b857d;
  font-size: 10px;
  font-weight: 620;
}

.floweave-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #486a59;
  font-size: 10px;
  font-weight: 690;
  cursor: pointer;
}

.floweave-inline-action:hover { color: #243c30; }
.floweave-inline-action .shell-icon { width: 13px; height: 13px; }

.floweave-definition-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 11px;
}

.floweave-definition-card {
  min-height: 222px;
  gap: 17px;
  padding: 16px;
  border-color: #dfe3dd;
  border-radius: 15px;
  background: rgba(252, 253, 250, .92);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.floweave-definition-card:hover {
  transform: translateY(-2px);
  border-color: #bbc9bf;
  box-shadow: 0 16px 34px rgba(24, 33, 27, .08);
}

.floweave-card-topline,
.floweave-card-footer,
.floweave-run-card-main,
.floweave-run-card-meta {
  display: flex;
  align-items: center;
}

.floweave-card-topline { justify-content: space-between; gap: 12px; }

.floweave-card-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #dbece7;
  color: #36675d;
}

.floweave-card-icon .shell-icon { width: 18px; height: 18px; }

.floweave-card-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.floweave-definition-card .floweave-card-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #202923;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.floweave-definition-card .floweave-card-copy > span {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #747f76;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.floweave-card-footer {
  gap: 14px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid #e8ebe6;
}

.floweave-card-footer small { color: #7a847c; font-size: 9px; font-weight: 560; }
.floweave-card-footer small strong { color: #344039; font-size: 10px; }
.floweave-card-arrow { margin-left: auto; color: #7d8980; }
.floweave-card-arrow .shell-icon { width: 15px; height: 15px; }

.floweave-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid #d8ddd7;
  border-radius: 999px;
  background: #f0f2ee;
  color: #69736c;
  font-size: 8px;
  font-weight: 730;
  letter-spacing: .025em;
  white-space: nowrap;
}

.floweave-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.floweave-status.status-active,
.floweave-status.status-completed { border-color: #c7dfce; background: #eaf5ed; color: #3f7454; }
.floweave-status.status-running,
.floweave-status.status-in_progress { border-color: #cbdbea; background: #edf4fa; color: #46739b; }
.floweave-status.status-draft,
.floweave-status.status-planned { border-color: #d9ddd8; background: #f1f2ef; color: #737c75; }
.floweave-status.status-failed,
.floweave-status.status-blocked { border-color: #edcbc7; background: #faecea; color: #a75149; }
.floweave-status.status-paused,
.floweave-status.status-waiting,
.floweave-status.status-waiting_for_input { border-color: #ead8b9; background: #f9f1e3; color: #9b6a2d; }

.floweave-run-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.floweave-runs-heading { margin-top: 16px; }

.floweave-run-card {
  min-height: 138px;
  gap: 14px;
  padding: 14px;
  border-color: #dfe3dd;
  border-radius: 14px;
  background: rgba(252, 253, 250, .88);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.floweave-run-card:hover {
  transform: translateY(-1px);
  border-color: #bac7bd;
  box-shadow: 0 12px 28px rgba(24, 33, 27, .07);
}

.floweave-run-card-main { gap: 10px; min-width: 0; }
.floweave-run-card-main > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.floweave-run-card-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-run-card-main small { overflow: hidden; color: #7b857d; font-size: 9px; font-weight: 520; text-overflow: ellipsis; white-space: nowrap; }

.floweave-run-status-dot,
.floweave-task-node:not(.definition) {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #929b94;
  box-shadow: 0 0 0 4px #ecefeb;
}

.floweave-run-status-dot.status-running,
.floweave-task-node.status-running,
.floweave-task-node.status-in_progress { background: #4e7fa7; box-shadow: 0 0 0 4px #e4edf5; }
.floweave-run-status-dot.status-completed,
.floweave-task-node.status-completed { background: #4e8664; box-shadow: 0 0 0 4px #e2eee6; }
.floweave-run-status-dot.status-failed,
.floweave-task-node.status-failed,
.floweave-task-node.status-blocked { background: #b65c52; box-shadow: 0 0 0 4px #f4e5e3; }

.floweave-run-progress { display: grid; gap: 5px; }
.floweave-run-progress > span {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e8e2;
}
.floweave-run-progress > span > span { display: block; height: 100%; border-radius: inherit; background: #5f8d79; }
.floweave-run-progress small { color: #818b83; font-size: 8px; font-weight: 570; }

.floweave-run-card-meta { gap: 9px; }
.floweave-run-card-meta > small {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #8a938c;
  font-size: 8px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floweave-run-card-meta > .shell-icon { width: 14px; height: 14px; color: #7c8780; }

.floweave-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -8px;
}

.floweave-filter-bar button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #dce0da;
  border-radius: 9px;
  background: rgba(251, 252, 249, .72);
  color: #68736b;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.floweave-filter-bar button:hover { background: #fff; color: #273129; }
.floweave-filter-bar button.active { border-color: #304c3d; background: #304c3d; color: #fff; }
.floweave-filter-bar small { min-width: 15px; font-size: 8px; opacity: .72; }

.floweave-attention-grid,
.floweave-attention-list {
  display: grid;
  gap: 9px;
}

.floweave-attention-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.floweave-attention-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #e0d8c8;
  border-radius: 13px;
  background: #f9f5ec;
  color: #2b302b;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.floweave-attention-card.recovery { border-color: #ead2ce; background: #faf0ef; }
.floweave-attention-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(36, 31, 23, .07); }

.floweave-attention-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eee0c4;
  color: #8c622d;
}
.floweave-attention-card.recovery .floweave-attention-icon { background: #efdcd8; color: #9d5149; }
.floweave-attention-icon .shell-icon { width: 17px; height: 17px; }

.floweave-attention-copy { min-width: 0; display: grid; gap: 2px; }
.floweave-attention-copy small { color: #a07033; font-size: 8px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.floweave-attention-card.recovery .floweave-attention-copy small { color: #a4544c; }
.floweave-attention-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-attention-copy > span { overflow: hidden; color: #7b7d77; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-attention-action { display: inline-flex; align-items: center; gap: 5px; color: #7a6b50; font-size: 8px; font-weight: 680; white-space: nowrap; }
.floweave-attention-action .shell-icon { width: 12px; height: 12px; }

/* Scheduled execution */
.floweave-schedules-view { display: grid; gap: 22px; }
.floweave-schedule-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 26px 28px; border: 1px solid #d9ded7; border-radius: 18px; background: radial-gradient(circle at 88% 15%, rgba(143, 174, 151, .22), transparent 34%), linear-gradient(135deg, #f7faf6, #f5f2e9); }
.floweave-schedule-hero h2 { margin: 5px 0 7px; font: 650 25px/1.1 var(--font-display, inherit); color: #29332d; }
.floweave-schedule-hero p { max-width: 620px; margin: 0; color: #68736c; font-size: 11px; line-height: 1.55; }
.floweave-schedule-hero .primary-button { flex: 0 0 auto; gap: 7px; }
.floweave-schedule-hero .shell-icon { width: 15px; height: 15px; }
.floweave-schedule-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.floweave-schedule-metrics article { display: grid; gap: 5px; min-height: 94px; padding: 16px 18px; border: 1px solid #dde1db; border-radius: 13px; background: rgba(255,255,255,.78); }
.floweave-schedule-metrics article.issue { border-color: #e8cbc7; background: #fff7f5; }
.floweave-schedule-metrics small { color: #768078; font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.floweave-schedule-metrics strong { color: #2f3e36; font-size: 18px; }
.floweave-schedule-metrics span { color: #8a928c; font-size: 9px; }
.floweave-schedule-list { display: grid; gap: 12px; }
.floweave-schedule-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 17px; border: 1px solid #dce1db; border-radius: 14px; background: rgba(255,255,255,.83); box-shadow: 0 5px 18px rgba(42, 53, 46, .035); }
.floweave-schedule-card.error { border-color: #e8cbc7; background: #fff9f7; }
.floweave-schedule-card.paused { background: #f8f8f6; }
.floweave-schedule-card-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #e7efe8; color: #426653; }
.floweave-schedule-card.error .floweave-schedule-card-icon { background: #f1dedb; color: #a34f48; }
.floweave-schedule-card-icon .shell-icon { width: 18px; height: 18px; }
.floweave-schedule-card-main { min-width: 0; display: grid; gap: 12px; }
.floweave-schedule-card-heading { display: flex; justify-content: space-between; gap: 14px; }
.floweave-schedule-card-heading > div { min-width: 0; }
.floweave-schedule-card-heading span:first-child { display: block; margin-bottom: 4px; color: #718078; font-size: 8px; font-weight: 720; letter-spacing: .045em; text-transform: uppercase; }
.floweave-schedule-card-heading h3 { overflow: hidden; margin: 0; color: #2c3730; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-schedule-timeline { display: grid; grid-template-columns: minmax(140px, 1.3fr) 18px minmax(140px, 1fr) 75px; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 10px; background: #f5f7f4; }
.floweave-schedule-timeline > span { color: #a2aaa4; }
.floweave-schedule-timeline .shell-icon { width: 13px; height: 13px; }
.floweave-schedule-timeline div { display: grid; gap: 3px; }
.floweave-schedule-timeline small { color: #8a928c; font-size: 7.5px; font-weight: 710; letter-spacing: .05em; text-transform: uppercase; }
.floweave-schedule-timeline strong { overflow: hidden; color: #4b5850; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-schedule-card-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; color: #7c867f; font-size: 8.5px; }
.floweave-schedule-card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.floweave-schedule-card-meta .shell-icon { width: 12px; height: 12px; }
.floweave-schedule-error { margin: 0; color: #9b4e47; font-size: 9px; }
.floweave-schedule-actions { display: flex; gap: 6px; align-items: center; }
.floweave-schedule-actions .secondary-button { gap: 5px; padding: 8px 10px; font-size: 9px; }
.floweave-schedule-actions .shell-icon { width: 13px; height: 13px; }
.floweave-schedule-modal { width: min(720px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-height: calc(100vh - 32px); }
.floweave-schedule-modal .floweave-modal-shell { display: block; width: auto; height: 100%; max-height: none; padding: 0; overflow: hidden; }
.floweave-schedule-modal .floweave-modal-close { position: absolute; top: 18px; right: 18px; z-index: 3; margin: 0; }
.floweave-schedule-modal #floweaveScheduleModalContent { height: 100%; }
.floweave-schedule-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; padding: 0; }
.floweave-schedule-form-header { padding: 22px 68px 17px 24px; border-bottom: 1px solid #e2e6e0; background: #fbfcf9; }
.floweave-schedule-form header h2 { margin: 4px 0 6px; color: #29342d; font-size: 20px; }
.floweave-schedule-form header p { max-width: 540px; margin: 0; color: #768078; font-size: 10px; line-height: 1.5; }
.floweave-schedule-form-body { display: grid; gap: 18px; min-height: 0; padding: 19px 24px 22px; overflow-y: auto; overscroll-behavior: contain; }
.floweave-schedule-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.floweave-schedule-form .span-2 { grid-column: 1 / -1; }
.floweave-schedule-form label > span,
.floweave-schedule-weekdays > span { display: block; margin-bottom: 6px; color: #58655d; font-size: 9px; font-weight: 700; }
.floweave-schedule-form input:not([type="radio"]):not([type="checkbox"]),
.floweave-schedule-form select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #d8ddd7; border-radius: 9px; background: #fff; color: #36433b; font: inherit; font-size: 10px; }
.floweave-schedule-form input:focus-visible,
.floweave-schedule-form select:focus-visible,
.floweave-schedule-frequency input:focus-visible + span,
.floweave-schedule-weekdays input:focus-visible + span { outline: 2px solid #6f957e; outline-offset: 2px; }
.floweave-schedule-selected-workflow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid #d5e0d7; border-radius: 11px; background: #f2f7f3; }
.floweave-schedule-selected-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #dfece3; color: #456b55; }
.floweave-schedule-selected-icon .shell-icon { width: 17px; height: 17px; }
.floweave-schedule-selected-workflow > span:nth-child(3) { min-width: 0; display: grid; gap: 2px; }
.floweave-schedule-selected-workflow small { color: #7d8980; font-size: 7.5px; font-style: normal; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
.floweave-schedule-selected-workflow strong { overflow: hidden; color: #35443a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.floweave-schedule-selected-workflow em { overflow: hidden; color: #7c887f; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.floweave-schedule-selected-workflow .floweave-schedule-locked { display: inline-flex; grid-template-columns: none; align-items: center; gap: 5px; min-width: auto; color: #557361; font-size: 8px; font-weight: 680; white-space: nowrap; }
.floweave-schedule-locked .shell-icon { width: 12px; height: 12px; }
.floweave-schedule-frequency,
.floweave-schedule-alert-policy { margin: 0; padding: 0; border: 0; }
.floweave-schedule-frequency legend,
.floweave-schedule-alert-policy legend { margin-bottom: 8px; color: #58655d; font-size: 9px; font-weight: 700; }
.floweave-schedule-frequency { display: flex; flex-wrap: wrap; gap: 7px; }
.floweave-schedule-frequency legend { flex: 0 0 100%; }
.floweave-schedule-frequency label { cursor: pointer; }
.floweave-schedule-frequency input { position: absolute; opacity: 0; pointer-events: none; }
.floweave-schedule-frequency label > span { margin: 0; padding: 8px 11px; border: 1px solid #d7dcd6; border-radius: 999px; background: #fff; color: #6f7972; font-size: 9px; }
.floweave-schedule-frequency input:checked + span { border-color: #71937e; background: #e8f1eb; color: #365d49; }
.floweave-schedule-weekdays > div { display: flex; gap: 6px; }
.floweave-schedule-weekdays label { flex: 1; cursor: pointer; }
.floweave-schedule-weekdays input { position: absolute; opacity: 0; pointer-events: none; }
.floweave-schedule-weekdays label span { display: grid; place-items: center; margin: 0; height: 34px; border: 1px solid #d7dcd6; border-radius: 8px; background: #fff; color: #707a73; font-size: 8px; }
.floweave-schedule-weekdays input:checked + span { border-color: #71937e; background: #e8f1eb; color: #365d49; }
.floweave-schedule-alert-policy { display: grid; gap: 8px; padding: 14px; border: 1px solid #dce1db; border-radius: 12px; background: #f8faf7; }
.floweave-schedule-alert-policy legend { padding: 0 5px; }
.floweave-schedule-alert-policy > p { margin: -4px 0 3px; color: #849088; font-size: 9px; }
.floweave-schedule-alert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.floweave-schedule-alert-policy label { display: flex; align-items: start; gap: 9px; min-height: 58px; padding: 9px; border: 1px solid #e7ebe5; border-radius: 9px; background: rgba(255,255,255,.82); }
.floweave-schedule-alert-policy label > span { display: grid; gap: 2px; margin: 0; }
.floweave-schedule-alert-policy strong { color: #4b5850; font-size: 9px; }
.floweave-schedule-alert-policy small { color: #89928c; font-size: 8px; font-weight: 400; }
.floweave-schedule-preview { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: #edf3ee; color: #476653; }
.floweave-schedule-preview .shell-icon { width: 17px; height: 17px; }
.floweave-schedule-preview div { display: grid; gap: 2px; }
.floweave-schedule-preview small { font-size: 7.5px; font-weight: 740; letter-spacing: .06em; text-transform: uppercase; }
.floweave-schedule-preview strong { font-size: 9px; }
.floweave-schedule-form footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid #dfe4de; background: rgba(251, 252, 249, .97); box-shadow: 0 -8px 22px rgba(29, 40, 32, .045); }

@media (max-width: 760px) {
  .floweave-schedule-hero { align-items: stretch; flex-direction: column; }
  .floweave-schedule-metrics { grid-template-columns: 1fr; }
  .floweave-schedule-card { grid-template-columns: 38px minmax(0, 1fr); }
  .floweave-schedule-actions { grid-column: 2; flex-wrap: wrap; }
  .floweave-schedule-timeline { grid-template-columns: 1fr; }
  .floweave-schedule-timeline > span { display: none; }
  .floweave-schedule-form-grid { grid-template-columns: 1fr; }
  .floweave-schedule-form .span-2 { grid-column: auto; }
  .floweave-schedule-weekdays > div { flex-wrap: wrap; }
  .floweave-schedule-weekdays label { flex: 0 0 calc(25% - 6px); }
  .floweave-schedule-alert-grid { grid-template-columns: 1fr; }
  .floweave-schedule-selected-workflow { grid-template-columns: 38px minmax(0, 1fr); }
  .floweave-schedule-selected-workflow .floweave-schedule-locked { grid-column: 2; }
}

.floweave-healthy-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid #cfe0d2;
  border-radius: 14px;
  background: #edf5ef;
}
.floweave-healthy-state > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: #d9eadc; color: #477258; }
.floweave-healthy-state h3 { margin: 0; font-size: 13px; }
.floweave-healthy-state p { margin: 3px 0 0; color: #6d796f; font-size: 10px; }

/* Definition and run detail */

.floweave-run-detail { gap: 14px; }

.floweave-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid #dce1da;
  border-radius: 17px;
  background:
    radial-gradient(circle at 88% -20%, rgba(169, 210, 196, .22), transparent 33%),
    rgba(252, 253, 250, .95);
  box-shadow: 0 12px 34px rgba(24, 33, 27, .055);
}

.floweave-detail-title { min-width: 0; }

.floweave-run-detail .text-button {
  gap: 3px;
  margin-bottom: 13px;
  color: #68776d;
  font-size: 9px;
  font-weight: 670;
  text-decoration: none;
}
.floweave-run-detail .text-button .shell-icon { width: 14px; height: 14px; }
.floweave-run-detail .text-button:hover { color: #2d4436; text-decoration: none; }

.floweave-detail-labels { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.floweave-detail-labels .eyebrow { color: #6f7a72; font-size: 8px; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }

.floweave-run-detail .floweave-detail-hero h2 {
  max-width: 760px;
  margin: 0;
  color: #1c241f;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 660;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.floweave-run-detail .floweave-detail-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #68736b;
  font-size: 11px;
  line-height: 1.6;
}

.floweave-detail-metrics { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 17px; }
.floweave-detail-metrics span { color: #7c867e; font-size: 9px; }
.floweave-detail-metrics strong { color: #344039; }

.floweave-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  max-width: 430px;
}

.floweave-detail-actions .secondary-button,
.floweave-detail-actions .primary-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 10px;
}

.floweave-action-menu { position: relative; flex: 0 0 auto; }
.floweave-action-menu > summary { display: grid; place-items: center; list-style: none; cursor: pointer; }
.floweave-action-menu > summary::-webkit-details-marker { display: none; }
.floweave-action-menu > summary .shell-icon { width: 17px; height: 17px; }
.floweave-action-menu > .floweave-action-menu-trigger { border: 0; background: transparent; box-shadow: none; }
.floweave-action-menu > .floweave-action-menu-trigger:hover { background: rgba(72, 100, 83, .08); color: #355544; }
.floweave-action-menu[open] > .floweave-action-menu-trigger { border: 0; background: #e8efea; color: #355544; }
.floweave-action-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: grid; width: min(280px, calc(100vw - 32px)); padding: 7px; border: 1px solid #d7ded8; border-radius: 13px; background: rgba(252, 253, 250, .98); box-shadow: 0 18px 48px rgba(23, 32, 26, .18); }
.floweave-action-menu-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; align-items: center; width: 100%; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: #354139; text-align: left; cursor: pointer; }
.floweave-action-menu-item:hover { background: #eef3ef; }
.floweave-action-menu-item:focus-visible { outline: 2px solid #6f957e; outline-offset: -1px; }
.floweave-action-menu-item:disabled { cursor: not-allowed; opacity: .48; }
.floweave-action-menu-item.separated { margin-top: 6px; padding-top: 12px; border-top: 1px solid #e4e8e3; border-radius: 0 0 9px 9px; }
.floweave-action-menu-item.danger { color: #a44740; }
.floweave-action-menu-item.danger:hover { background: #faecea; }
.floweave-action-menu-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #edf2ee; color: #587062; }
.floweave-action-menu-item.danger .floweave-action-menu-icon { background: #f7e7e5; color: #a44740; }
.floweave-action-menu-icon .shell-icon { width: 15px; height: 15px; }
.floweave-action-menu-item > span:last-child { min-width: 0; display: grid; gap: 2px; }
.floweave-action-menu-item strong { overflow: hidden; font-size: 10px; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.floweave-action-menu-item small { overflow: hidden; color: #7d8880; font-size: 8px; font-weight: 450; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.floweave-cost-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #cbd8ce;
  border-radius: 999px;
  background: #edf4ef;
  color: #42604d;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.floweave-cost-pill[hidden] { display: none; }

.floweave-settings-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}
.floweave-settings-button .shell-icon { width: 16px; height: 16px; }

.floweave-run-progress.large { width: min(480px, 100%); margin-top: 20px; }
.floweave-run-progress.large > span { height: 6px; }
.floweave-run-progress.large small { font-size: 9px; }

.floweave-detail-section,
.floweave-context-policy,
.floweave-run-detail > section {
  padding: 20px;
  border: 1px solid #dfe3dd;
  border-radius: 15px;
  background: rgba(251, 252, 249, .82);
}

.floweave-section-heading { display: grid; gap: 2px; margin-bottom: 15px; }

.floweave-context-grid {
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  gap: 9px 18px;
  font-size: 10px;
}
.floweave-context-grid span { color: #7d877f; }
.floweave-context-grid strong { color: #313b34; overflow-wrap: anywhere; }

.floweave-task-detail-layout {
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
  gap: 12px;
}

.floweave-task-list { gap: 6px; }

.floweave-task-row {
  min-height: 58px;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border-color: #dfe3dd;
  border-radius: 11px;
  background: #fbfcf9;
  cursor: pointer;
}

button.floweave-task-row:hover,
button.floweave-task-row.active {
  border-color: #a8bcae;
  background: #edf3ee;
}

.floweave-task-row div { flex: 1; }
.floweave-task-row strong { font-size: 10px; font-weight: 680; }
.floweave-task-row span:not(.floweave-status):not(.floweave-task-node) { color: #818a83; font-size: 8px; }
.floweave-task-row .floweave-status { margin-left: auto; }

.floweave-task-node.definition {
  width: 31px;
  height: 31px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #e5ece7;
  color: #527060;
}
.floweave-task-node.definition .shell-icon { width: 15px; height: 15px; }

.floweave-task-detail-panel {
  border-color: #dfe3dd;
  border-radius: 13px;
  background: #fbfcf9;
}

.floweave-task-detail { gap: 15px; padding: 18px; }
.floweave-task-detail > header { padding-bottom: 13px; border-bottom: 1px solid #e6e9e4; }
.floweave-task-detail h3 { font-size: 14px; font-weight: 680; letter-spacing: -.02em; }
.floweave-task-detail p { font-size: 10px; }

.floweave-output-section {
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #e5e8e3;
}
.floweave-output-section h3 { font-size: 11px; }

.floweave-task-form {
  padding: 17px;
  border-color: #ddcfb7;
  border-radius: 13px;
  background: #faf6ed;
}

.floweave-modal {
  border-color: #d9ded7;
  border-radius: 16px;
  background: #fbfcf9;
  box-shadow: 0 28px 90px rgba(18, 27, 21, .25);
}
.floweave-modal::backdrop { background: rgba(20, 27, 23, .4); backdrop-filter: blur(3px); }
.floweave-modal-shell { padding: 24px; }
.floweave-modal-close { border-radius: 9px; background: #eef1ec; }

.floweave-empty {
  max-width: none;
  padding: 26px;
  border: 1px dashed #ced5cd;
  border-radius: 14px;
  background: rgba(251, 252, 249, .55);
}
.floweave-empty.compact { padding: 19px; }

@media (max-width: 980px) {
  .floweave-search { width: min(420px, 100%); }
  .floweave-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floweave-attention-grid { grid-template-columns: 1fr; }
  .floweave-detail-hero { flex-direction: column; }
  .floweave-detail-actions { max-width: none; justify-content: flex-start; }
}

@media (max-width: 700px) {
  .floweave-toolbar { width: 100%; height: auto; margin-left: 0; padding: 12px 0; flex-wrap: wrap; }
  .floweave-search { flex: 1 1 100%; width: 100%; }
  .floweave-view-nav { display: grid; padding: 0 16px; overflow: visible; }
  .floweave-view-nav nav { min-width: max-content; overflow-x: auto; }
  .floweave-content { padding: 22px 14px 52px; }
  .floweave-overview-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .floweave-overview-heading > p { text-align: left; }
  .floweave-stats-grid { grid-template-columns: 1fr; }
  .floweave-definition-grid,
  .floweave-run-grid { grid-template-columns: 1fr; }
  .floweave-human-fields-grid { grid-template-columns: 1fr; }
  .floweave-attention-card { grid-template-columns: 37px minmax(0, 1fr); }
  .floweave-attention-action { grid-column: 2; }
  .floweave-detail-section,
  .floweave-context-policy,
  .floweave-run-detail > section,
  .floweave-detail-hero { padding: 16px; }
  .floweave-task-detail-layout,
  .floweave-context-grid { grid-template-columns: 1fr; }
  .floweave-context-grid span { margin-top: 7px; }
}
