/* Action plan (section page) */
.kr-action-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.kr-new-button {
  height: 48px;
  font-weight: 700;
  font-size: 16px;
  color: #3c3c3c;
  border-radius: 5px;
  text-transform: none;
}

.kr-action-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kr-action-item {
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.kr-action-item-header {
  display: grid;
  grid-template-columns: 6fr 2fr 3fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: grab;
  user-select: none;
}

.kr-action-item-header:active {
  cursor: grabbing;
}

.kr-action-item-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kr-chevron {
  display: inline-flex;
  transition: transform 0.3s ease;
  color: #637480;
}

.kr-action-item.kr-open .kr-chevron {
  transform: rotate(90deg);
}

.kr-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d9d9d9;
  color: #3c3c3c;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 28px;
}

.kr-action-item-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kr-action-item-status {
  display: flex;
  justify-content: center;
}

.kr-action-item-actions {
  display: flex;
  justify-content: flex-end;
}

.kr-icon-button {
  border: none;
  background: transparent;
  color: #828282;
  font-size: 18px;
  padding: 4px 8px;
}

.kr-icon-button:hover {
  color: #eb5757;
}

.kr-action-item-body {
  display: none;
  border-top: 1px solid #e5e8eb;
  padding: 20px 24px 24px;
}

.kr-action-item.kr-open .kr-action-item-body {
  display: block;
}

.kr-dragging,
.kr-drag-ghost {
  box-shadow: 0 4px 12px 3px rgba(0, 0, 0, 0.12);
  border-radius: 18px;
}

.kr-drag-ghost {
  opacity: 0.6;
}

.kr-empty-state {
  color: #637480;
  padding: 16px;
  text-align: center;
  border: 1px dashed #d9d9d9;
  border-radius: 12px;
}

/* Form inside the expanded row */
.kr-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.kr-status-progress-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.kr-status-progress-row.autosave-saving .kr-input-field-fieldset {
  border-color: #17a2b8;
}

.kr-status-progress-row.autosave-saved .kr-input-field-fieldset {
  border-color: #28a745;
}

.kr-status-progress-row.autosave-error .kr-input-field-fieldset {
  border-color: #dc3545;
}

.kr-action-item-files {
  margin-top: 8px;
}

@media (max-width: 992px) {
  .kr-action-item-header {
    grid-template-columns: 1fr;
  }

  .kr-form-row,
  .kr-status-progress-row {
    grid-template-columns: 1fr;
  }
}
