.swb-editor-section {
  margin: 12px 0;
}

// ── Status badge ────────────────────────────────────────────────────────────
.swb-status-row {
  margin: 8px 16px;
}

.swb-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.swb-status-draft       { background: #e0e0e0; color: #424242; }
.swb-status-submitted   { background: #e3f2fd; color: #1565c0; }
.swb-status-underreview { background: #fff3e0; color: #e65100; }
.swb-status-approved    { background: #e8f5e9; color: #2e7d32; }
.swb-status-rejected    { background: #ffebee; color: #c62828; }
.swb-status-executed    { background: #f3e5f5; color: #6a1b9a; }

// ── Workflow ─────────────────────────────────────────────────────────────────
.swb-workflow-section {
  margin: 12px 16px;
  padding-top: 8px;
  border-top: 1px solid var(--gb-border-color, #e0e0e0);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.swb-action-row {
  display: contents;
}

.swb-action-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.swb-submit-btn  { background: #1976d2; color: #fff; &:hover { background: #1565c0; } }
.swb-approve-btn { background: #2e7d32; color: #fff; &:hover { background: #1b5e20; } }
.swb-reject-btn  { background: #c62828; color: #fff; &:hover { background: #b71c1c; } }
.swb-return-btn  { background: #f57c00; color: #fff; &:hover { background: #e65100; } }
.swb-execute-btn { background: #6a1b9a; color: #fff; &:hover { background: #4a148c; } }
.swb-cancel-btn  { background: #e0e0e0; color: #424242; &:hover { background: #bdbdbd; } }

.swb-inline-input {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swb-comment-area {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--gb-border-color, #e0e0e0);
  border-radius: 4px;
  font-size: 13px;
  resize: vertical;

  &:focus {
    outline: none;
    border-color: #1976d2;
  }
}

.swb-inline-actions {
  display: flex;
  gap: 8px;
}

// ── Tags ─────────────────────────────────────────────────────────────────────
.swb-tags-section {
  margin: 12px 16px;
  padding-top: 8px;
  border-top: 1px solid var(--gb-border-color, #e0e0e0);
}

.swb-section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gb-text-secondary, #616161);
}

.swb-tags-loading,
.swb-timeline-loading {
  font-size: 13px;
  color: var(--gb-text-secondary, #757575);
}

.swb-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swb-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;

  &.swb-tag-chip--dark {
    color: #fff;
  }
}

.swb-tag-remove {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;

  &:hover { opacity: 1; }
}

.swb-no-tags {
  font-size: 12px;
  color: var(--gb-text-secondary, #9e9e9e);
}

// ── Timeline ──────────────────────────────────────────────────────────────────
.swb-timeline-section {
  margin: 12px 16px;
  padding-top: 8px;
  border-top: 1px solid var(--gb-border-color, #e0e0e0);
}

.swb-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.swb-timeline-item {
  display: grid;
  grid-template-columns: 120px 160px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gb-border-color, #f0f0f0);
  font-size: 13px;
  align-items: start;
}

.swb-timeline-event {
  font-weight: 600;
  color: #424242;
}

.swb-timeline-date {
  color: var(--gb-text-secondary, #757575);
  font-size: 12px;
}

.swb-timeline-comment {
  color: #616161;
}

.swb-timeline-empty {
  font-size: 12px;
  color: var(--gb-text-secondary, #9e9e9e);
  padding: 6px 0;
}

[dir="rtl"] {
  .swb-workflow-section  { flex-direction: row-reverse; }
  .swb-timeline-item     { direction: rtl; }
  .swb-tags-chips        { flex-direction: row-reverse; }
}
